aboutsummaryrefslogtreecommitdiff
path: root/gdb/expprint.c
diff options
context:
space:
mode:
authorgdb-2.8 <gdb@fsf.org>1988-09-03 08:00:00 +0100
committerPedro Alves <palves@redhat.com>2012-06-03 15:36:31 +0100
commit3bf57d210832b28e9361990830eb722a619f031b (patch)
treeba506d293bde0f6500d0cee3e643ebf8890d9cf7 /gdb/expprint.c
parent7c75bab3d3ef344a6a0b13b9ab59ecd5855aceb5 (diff)
downloadgdb-3bf57d210832b28e9361990830eb722a619f031b.zip
gdb-3bf57d210832b28e9361990830eb722a619f031b.tar.gz
gdb-3bf57d210832b28e9361990830eb722a619f031b.tar.bz2
gdb-2.8
Diffstat (limited to 'gdb/expprint.c')
-rw-r--r--gdb/expprint.c22
1 files changed, 4 insertions, 18 deletions
diff --git a/gdb/expprint.c b/gdb/expprint.c
index 02a1ed3..b7adc29 100644
--- a/gdb/expprint.c
+++ b/gdb/expprint.c
@@ -79,9 +79,7 @@ static struct op_print op_print_tab[] =
{"&", UNOP_ADDR, PREC_PREFIX, 0},
{"sizeof ", UNOP_SIZEOF, PREC_PREFIX, 0},
{"++", UNOP_PREINCREMENT, PREC_PREFIX, 0},
- {"--", UNOP_PREDECREMENT, PREC_PREFIX, 0},
- /* C++ */
- {"::", BINOP_SCOPE, PREC_PREFIX, 0},
+ {"--", UNOP_PREDECREMENT, PREC_PREFIX, 0}
};
static void print_subexp ();
@@ -121,30 +119,18 @@ print_subexp (exp, pos, stream, prec)
opcode = exp->elts[pc].opcode;
switch (opcode)
{
- case OP_SCOPE:
- myprec = PREC_PREFIX;
- assoc = 0;
- (*pos) += 2;
- print_subexp (exp, pos, stream, (int) myprec + assoc);
- fprintf (stream, " :: ");
- nargs = strlen (&exp->elts[pc + 2].string);
- (*pos) += 1 + (nargs + sizeof (union exp_element)) / sizeof (union exp_element);
-
- fprintf (stream, &exp->elts[pc + 2].string);
- return;
-
case OP_LONG:
(*pos) += 3;
value_print (value_from_long (exp->elts[pc + 1].type,
exp->elts[pc + 2].longconst),
- stream);
+ stream, 0);
return;
case OP_DOUBLE:
(*pos) += 3;
value_print (value_from_double (exp->elts[pc + 1].type,
exp->elts[pc + 2].doubleconst),
- stream);
+ stream, 0);
return;
case OP_VAR_VALUE:
@@ -187,7 +173,7 @@ print_subexp (exp, pos, stream, prec)
(*pos) += 2 + (nargs + sizeof (union exp_element)) / sizeof (union exp_element);
fprintf (stream, "\"");
for (tem = 0; tem < nargs; tem++)
- printchar ((&exp->elts[pc + 1].string)[tem], stream);
+ printchar ((&exp->elts[pc + 1].string)[tem], stream, '"');
fprintf (stream, "\"");
return;