aboutsummaryrefslogtreecommitdiff
path: root/gdb/p-valprint.c
diff options
context:
space:
mode:
authorUlrich Weigand <uweigand@de.ibm.com>2009-05-18 13:45:51 +0000
committerUlrich Weigand <uweigand@de.ibm.com>2009-05-18 13:45:51 +0000
commit830bb937a1076fbaf1eae8f2a3bdce8bcf53f281 (patch)
tree072c2ac2b635aafac5244d0c2cf9f879777d57cd /gdb/p-valprint.c
parente035e3736f445850fa1372f8d2a7f403cf1cf6a7 (diff)
downloadgdb-830bb937a1076fbaf1eae8f2a3bdce8bcf53f281.zip
gdb-830bb937a1076fbaf1eae8f2a3bdce8bcf53f281.tar.gz
gdb-830bb937a1076fbaf1eae8f2a3bdce8bcf53f281.tar.bz2
* p-valprint.c (pascal_val_print): Use extract_typed_address
to extract reference value.
Diffstat (limited to 'gdb/p-valprint.c')
-rw-r--r--gdb/p-valprint.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/gdb/p-valprint.c b/gdb/p-valprint.c
index 2d1cb08..68ff54a 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);
}