forked from Imagelibrary/binutils-gdb
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.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user