From 830bb937a1076fbaf1eae8f2a3bdce8bcf53f281 Mon Sep 17 00:00:00 2001 From: Ulrich Weigand Date: Mon, 18 May 2009 13:45:51 +0000 Subject: [PATCH] * p-valprint.c (pascal_val_print): Use extract_typed_address to extract reference value. --- gdb/ChangeLog | 5 +++++ gdb/p-valprint.c | 7 +++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 55cace361fa..5e9931b7221 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2009-05-18 Ulrich Weigand + + * p-valprint.c (pascal_val_print): Use extract_typed_address + to extract reference value. + 2009-05-18 Ulrich Weigand * doublest.c (NAN): Remove unused define. diff --git a/gdb/p-valprint.c b/gdb/p-valprint.c index 2d1cb08d455..68ff54a25dc 100644 --- a/gdb/p-valprint.c +++ b/gdb/p-valprint.c @@ -251,11 +251,10 @@ pascal_val_print (struct type *type, const gdb_byte *valaddr, elttype = check_typedef (TYPE_TARGET_TYPE (type)); if (options->addressprint) { + CORE_ADDR addr + = extract_typed_address (valaddr + embedded_offset, type); fprintf_filtered (stream, "@"); - /* Extract the address, assume that it is unsigned. */ - fputs_filtered (paddress ( - extract_unsigned_integer (valaddr + embedded_offset, - gdbarch_ptr_bit (current_gdbarch) / HOST_CHAR_BIT)), stream); + fputs_filtered (paddress (addr), stream); if (options->deref_ref) fputs_filtered (": ", stream); } -- 2.30.2