aboutsummaryrefslogtreecommitdiff
path: root/gdb/expprint.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/expprint.c')
-rw-r--r--gdb/expprint.c41
1 files changed, 23 insertions, 18 deletions
diff --git a/gdb/expprint.c b/gdb/expprint.c
index 966f770..adbcec7 100644
--- a/gdb/expprint.c
+++ b/gdb/expprint.c
@@ -1,27 +1,27 @@
/* Print in infix form a struct expression.
- Copyright (C) 1986 Free Software Foundation, Inc.
+ Copyright (C) 1986, 1989 Free Software Foundation, Inc.
-GDB is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY. No author or distributor accepts responsibility to anyone
-for the consequences of using it or for whether it serves any
-particular purpose or works at all, unless he says so in writing.
-Refer to the GDB General Public License for full details.
+This file is part of GDB.
-Everyone is granted permission to copy, modify and redistribute GDB,
-but only under the conditions described in the GDB General Public
-License. A copy of this license is supposed to have been given to you
-along with GDB so you can know your rights and responsibilities. It
-should be in a file named COPYING. Among other things, the copyright
-notice and this notice must be preserved on all copies.
+GDB is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 1, or (at your option)
+any later version.
-In other words, go ahead and share GDB, but don't try to stop
-anyone else from sharing it farther. Help stamp out software hoarding!
-*/
+GDB is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GDB; see the file COPYING. If not, write to
+the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#include "defs.h"
#include "symtab.h"
#include "param.h"
#include "expression.h"
+#include "value.h"
#include <stdio.h>
@@ -138,14 +138,14 @@ print_subexp (exp, pos, stream, prec)
(*pos) += 3;
value_print (value_from_long (exp->elts[pc + 1].type,
exp->elts[pc + 2].longconst),
- stream, 0);
+ stream, 0, Val_no_prettyprint);
return;
case OP_DOUBLE:
(*pos) += 3;
value_print (value_from_double (exp->elts[pc + 1].type,
exp->elts[pc + 2].doubleconst),
- stream, 0);
+ stream, 0, Val_no_prettyprint);
return;
case OP_VAR_VALUE:
@@ -155,7 +155,7 @@ print_subexp (exp, pos, stream, prec)
case OP_LAST:
(*pos) += 2;
- fprintf (stream, "$%d", exp->elts[pc + 1].longconst);
+ fprintf (stream, "$%d", (int) exp->elts[pc + 1].longconst);
return;
case OP_REGISTER:
@@ -276,6 +276,11 @@ print_subexp (exp, pos, stream, prec)
break;
}
+ case OP_THIS:
+ ++(*pos);
+ fprintf (stream, "this");
+ return;
+
default:
for (tem = 0; tem < sizeof op_print_tab / sizeof op_print_tab[0]; tem++)
if (op_print_tab[tem].opcode == opcode)