diff options
Diffstat (limited to 'gdb/p-valprint.c')
-rw-r--r-- | gdb/p-valprint.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/gdb/p-valprint.c b/gdb/p-valprint.c index 30d0650..ec90016 100644 --- a/gdb/p-valprint.c +++ b/gdb/p-valprint.c @@ -56,6 +56,7 @@ pascal_val_print (struct type *type, const gdb_byte *valaddr, struct ui_file *stream, int recurse, const struct value_print_options *options) { + struct gdbarch *gdbarch = get_type_arch (type); unsigned int i = 0; /* Number of characters printed */ unsigned len; struct type *elttype; @@ -142,7 +143,8 @@ pascal_val_print (struct type *type, const gdb_byte *valaddr, /* Print vtable entry - we only get here if we ARE using -fvtable_thunks. (Otherwise, look under TYPE_CODE_STRUCT.) */ /* Extract the address, assume that it is unsigned. */ - print_address_demangle (extract_unsigned_integer (valaddr + embedded_offset, TYPE_LENGTH (type)), + print_address_demangle (gdbarch, + extract_unsigned_integer (valaddr + embedded_offset, TYPE_LENGTH (type)), stream, demangle); break; } @@ -155,14 +157,14 @@ pascal_val_print (struct type *type, const gdb_byte *valaddr, if (TYPE_CODE (elttype) == TYPE_CODE_FUNC) { /* Try to print what function it points to. */ - print_address_demangle (addr, stream, demangle); + print_address_demangle (gdbarch, addr, stream, demangle); /* Return value is irrelevant except for string pointers. */ return (0); } if (options->addressprint && options->format != 's') { - fputs_filtered (paddress (addr), stream); + fputs_filtered (paddress (gdbarch, addr), stream); } /* For a pointer to char or unsigned char, also print the string @@ -254,7 +256,7 @@ pascal_val_print (struct type *type, const gdb_byte *valaddr, CORE_ADDR addr = extract_typed_address (valaddr + embedded_offset, type); fprintf_filtered (stream, "@"); - fputs_filtered (paddress (addr), stream); + fputs_filtered (paddress (gdbarch, addr), stream); if (options->deref_ref) fputs_filtered (": ", stream); } @@ -290,7 +292,8 @@ pascal_val_print (struct type *type, const gdb_byte *valaddr, -fvtable_thunks. (Otherwise, look under TYPE_CODE_PTR.) */ /* Extract the address, assume that it is unsigned. */ print_address_demangle - (extract_unsigned_integer (valaddr + embedded_offset + TYPE_FIELD_BITPOS (type, VTBL_FNADDR_OFFSET) / 8, + (gdbarch, + extract_unsigned_integer (valaddr + embedded_offset + TYPE_FIELD_BITPOS (type, VTBL_FNADDR_OFFSET) / 8, TYPE_LENGTH (TYPE_FIELD_TYPE (type, VTBL_FNADDR_OFFSET))), stream, demangle); } @@ -356,7 +359,7 @@ pascal_val_print (struct type *type, const gdb_byte *valaddr, type_print (type, "", stream, -1); fprintf_filtered (stream, "} "); /* Try to print what function it points to, and its address. */ - print_address_demangle (address, stream, demangle); + print_address_demangle (gdbarch, address, stream, demangle); break; case TYPE_CODE_BOOL: |