Thread View: gnu.gdb.bug
1 messages
1 total messages
Started by Bryan Boreham
Tue, 15 Aug 1989 15:39
Can't display "this" in C++, with fix.
Author: Bryan Boreham
Date: Tue, 15 Aug 1989 15:39
Date: Tue, 15 Aug 1989 15:39
35 lines
1316 bytes
1316 bytes
There was no provision in print_subexp for OP_THIS in C++, so I
added it, plus the max and min operators. I'm not sure if I got
the precedences right, or if the code for OP_THIS should add
something to *pos.
kewill% diff -c expprint.c~ expprint.c
*** expprint.c~ Fri Jul 7 22:22:13 1989
--- expprint.c Tue Aug 15 16:32:12 1989
***************
*** 82,87 ****
--- 82,89 ----
{"++", UNOP_PREINCREMENT, PREC_PREFIX, 0},
{"--", UNOP_PREDECREMENT, PREC_PREFIX, 0},
/* C++ */
+ {"<?", BINOP_MIN, PREC_ORDER, 0},
+ {">?", BINOP_MAX, PREC_ORDER, 0},
{"::", BINOP_SCOPE, PREC_PREFIX, 0},
};
***************
*** 122,127 ****
--- 124,133 ----
opcode = exp->elts[pc].opcode;
switch (opcode)
{
+ case OP_THIS:
+ fprintf(stream, "this");
+ return;
+
case OP_SCOPE:
myprec = PREC_PREFIX;
assoc = 0;
Bryan.
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads