aboutsummaryrefslogtreecommitdiff
path: root/gdb/f-valprint.c
diff options
context:
space:
mode:
authorKlee Dienes <kdienes@apple.com>2002-10-12 01:48:17 +0000
committerKlee Dienes <kdienes@apple.com>2002-10-12 01:48:17 +0000
commit0d540cdfe73cd76ebf5f3b855a4962e590052728 (patch)
tree8721de060b2170d3be9fedbd30d8c1dad32a50d0 /gdb/f-valprint.c
parent52019e89e2a84debee68874bc1c6d5014e537c1a (diff)
downloadgdb-0d540cdfe73cd76ebf5f3b855a4962e590052728.zip
gdb-0d540cdfe73cd76ebf5f3b855a4962e590052728.tar.gz
gdb-0d540cdfe73cd76ebf5f3b855a4962e590052728.tar.bz2
2002-10-11 Klee Dienes <kdienes@apple.com>
* findvar.c (read_memory_typed_address): New function. * gdbcore.h (read_memory_typed_address): Add prototype. * blockframe.c (sigtramp_saved_pc): Use read_memory_typed_address to read a value destined for a CORE_ADDR, not read_memory_integer. * f-valprint.c (f77_get_dynamic_upperbound): Ditto. (f77_get_dynamic_lowerbound): Ditto.
Diffstat (limited to 'gdb/f-valprint.c')
-rw-r--r--gdb/f-valprint.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/gdb/f-valprint.c b/gdb/f-valprint.c
index 48c5113..4bd01cc 100644
--- a/gdb/f-valprint.c
+++ b/gdb/f-valprint.c
@@ -102,9 +102,9 @@ f77_get_dynamic_lowerbound (struct type *type, int *lower_bound)
if (current_frame_addr > 0)
{
ptr_to_lower_bound =
- read_memory_integer (current_frame_addr +
- TYPE_ARRAY_LOWER_BOUND_VALUE (type),
- 4);
+ read_memory_typed_address (current_frame_addr +
+ TYPE_ARRAY_LOWER_BOUND_VALUE (type),
+ builtin_type_void_data_ptr);
*lower_bound = read_memory_integer (ptr_to_lower_bound, 4);
}
else
@@ -165,9 +165,9 @@ f77_get_dynamic_upperbound (struct type *type, int *upper_bound)
if (current_frame_addr > 0)
{
ptr_to_upper_bound =
- read_memory_integer (current_frame_addr +
- TYPE_ARRAY_UPPER_BOUND_VALUE (type),
- 4);
+ read_memory_typed_address (current_frame_addr +
+ TYPE_ARRAY_UPPER_BOUND_VALUE (type),
+ builtin_type_void_data_ptr);
*upper_bound = read_memory_integer (ptr_to_upper_bound, 4);
}
else