summaryrefslogtreecommitdiffstats
path: root/gdb/corefile.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/corefile.c
parent52019e89e2a84debee68874bc1c6d5014e537c1a (diff)
downloadppe42-binutils-0d540cdfe73cd76ebf5f3b855a4962e590052728.tar.gz
ppe42-binutils-0d540cdfe73cd76ebf5f3b855a4962e590052728.zip
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/corefile.c')
-rw-r--r--gdb/corefile.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/gdb/corefile.c b/gdb/corefile.c
index 4f6eef2ce7..be0ecf0e3b 100644
--- a/gdb/corefile.c
+++ b/gdb/corefile.c
@@ -356,6 +356,14 @@ read_memory_string (CORE_ADDR memaddr, char *buffer, int max_len)
}
}
+CORE_ADDR
+read_memory_typed_address (CORE_ADDR addr, struct type *type)
+{
+ char *buf = alloca (TYPE_LENGTH (type));
+ read_memory (addr, buf, TYPE_LENGTH (type));
+ return extract_typed_address (buf, type);
+}
+
/* Same as target_write_memory, but report an error if can't write. */
void
write_memory (CORE_ADDR memaddr, char *myaddr, int len)
OpenPOWER on IntegriCloud