From 0534816df0a7ed7671a70d587c2c7cb6ce0954f6 Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Mon, 7 Aug 2006 03:30:54 +0000 Subject: [PATCH] * expprint.c (print_subexp_standard, dump_subexp_body_standard): Add support for member pointers. --- gdb/ChangeLog | 5 +++++ gdb/expprint.c | 16 ++++++++++++++-- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 99beeee611e..fb6e84ab1bd 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2006-08-06 Daniel Jacobowitz + + * expprint.c (print_subexp_standard, dump_subexp_body_standard): Add + support for member pointers. + 2006-08-02 Mark Kettenis * arm-tdep.h: Add multiple inclusion protection. diff --git a/gdb/expprint.c b/gdb/expprint.c index 77493b012ee..c7633b5af1b 100644 --- a/gdb/expprint.c +++ b/gdb/expprint.c @@ -346,6 +346,18 @@ print_subexp_standard (struct expression *exp, int *pos, fputs_filtered (&exp->elts[pc + 2].string, stream); return; + case STRUCTOP_MEMBER: + print_subexp (exp, pos, stream, PREC_SUFFIX); + fputs_filtered (".*", stream); + print_subexp (exp, pos, stream, PREC_SUFFIX); + return; + + case STRUCTOP_MPTR: + print_subexp (exp, pos, stream, PREC_SUFFIX); + fputs_filtered ("->*", stream); + print_subexp (exp, pos, stream, PREC_SUFFIX); + return; + case BINOP_SUBSCRIPT: print_subexp (exp, pos, stream, PREC_SUFFIX); fputs_filtered ("[", stream); @@ -873,6 +885,8 @@ dump_subexp_body_standard (struct expression *exp, case BINOP_IN: case BINOP_RANGE: case BINOP_END: + case STRUCTOP_MEMBER: + case STRUCTOP_MPTR: elt = dump_subexp (exp, stream, elt); case UNOP_NEG: case UNOP_LOGICAL_NOT: @@ -1026,8 +1040,6 @@ dump_subexp_body_standard (struct expression *exp, break; default: case OP_NULL: - case STRUCTOP_MEMBER: - case STRUCTOP_MPTR: case MULTI_SUBSCRIPT: case OP_F77_UNDETERMINED_ARGLIST: case OP_COMPLEX: -- 2.30.2