aboutsummaryrefslogtreecommitdiff
path: root/gdb/expprint.c
diff options
context:
space:
mode:
authorDaniel Jacobowitz <drow@false.org>2006-08-07 03:30:54 +0000
committerDaniel Jacobowitz <drow@false.org>2006-08-07 03:30:54 +0000
commit0534816df0a7ed7671a70d587c2c7cb6ce0954f6 (patch)
treed47e2179813c8552218f3d27cce5904826d8afc7 /gdb/expprint.c
parent5a2fdac0e2d2519188c16b24cf0390bbbff6558c (diff)
downloadgdb-0534816df0a7ed7671a70d587c2c7cb6ce0954f6.zip
gdb-0534816df0a7ed7671a70d587c2c7cb6ce0954f6.tar.gz
gdb-0534816df0a7ed7671a70d587c2c7cb6ce0954f6.tar.bz2
* expprint.c (print_subexp_standard, dump_subexp_body_standard): Add
support for member pointers.
Diffstat (limited to 'gdb/expprint.c')
-rw-r--r--gdb/expprint.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/gdb/expprint.c b/gdb/expprint.c
index 77493b0..c7633b5 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: