diff options
author | Peter Schauer <Peter.Schauer@mytum.de> | 1997-08-03 15:24:55 +0000 |
---|---|---|
committer | Peter Schauer <Peter.Schauer@mytum.de> | 1997-08-03 15:24:55 +0000 |
commit | 153da921f315635189ec05bd6946491f0f04bada (patch) | |
tree | 15c50f8aa6996fd8c6cffa4786dcf2cdc8dff33a /gdb/c-valprint.c | |
parent | e6071dc57fa4e692186b9dd0fe8a6ab726348a59 (diff) | |
download | gdb-153da921f315635189ec05bd6946491f0f04bada.zip gdb-153da921f315635189ec05bd6946491f0f04bada.tar.gz gdb-153da921f315635189ec05bd6946491f0f04bada.tar.bz2 |
* c-valprint.c (c_val_print): Use extract_address to retrieve
the address of the virtual function.
From Peter Bloecher (Peter.Bloecher@eedn.ericsson.se).
* eval.c (evaluate_subexp_standard), valarith.c (value_x_unop):
Handle C++ operator *.
Diffstat (limited to 'gdb/c-valprint.c')
-rw-r--r-- | gdb/c-valprint.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/gdb/c-valprint.c b/gdb/c-valprint.c index 7901a5f..ee620dc 100644 --- a/gdb/c-valprint.c +++ b/gdb/c-valprint.c @@ -1,5 +1,5 @@ /* Support for printing C values for GDB, the GNU debugger. - Copyright 1986, 1988, 1989, 1991, 1992, 1993, 1994, 1995, 1996 + Copyright 1986, 1988, 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1997 Free Software Foundation, Inc. This file is part of GDB. @@ -286,9 +286,10 @@ c_val_print (type, valaddr, address, stream, format, deref_ref, recurse, /* Print the unmangled name if desired. */ /* Print vtable entry - we only get here if NOT using -fvtable_thunks. (Otherwise, look under TYPE_CODE_PTR.) */ - print_address_demangle(*((int *) (valaddr + /* FIXME bytesex */ - TYPE_FIELD_BITPOS (type, VTBL_FNADDR_OFFSET) / 8)), - stream, demangle); + print_address_demangle (extract_address ( + valaddr + TYPE_FIELD_BITPOS (type, VTBL_FNADDR_OFFSET) / 8, + TYPE_LENGTH (TYPE_FIELD_TYPE (type, VTBL_FNADDR_OFFSET))), + stream, demangle); } else cp_print_value_fields (type, valaddr, address, stream, format, |