2003-06-03 Andrew Cagney <cagney@redhat.com>

* frame.c (get_frame_memory_signed): New function.
	(get_frame_memory, get_frame_memory_unsigned): New function.
	(get_frame_arch): New function.
	* frame.h (get_frame_signed_memory, get_frame_arch): Declare.
	(get_frame_memory, get_frame_unsigned_memory): Declare.
	* d10v-tdep.c (d10v_frame_unwind_cache): Use
	get_frame_memory_unsigned and get_frame_arch.
	(d10v_frame_unwind_cache, saved_regs_unwinder): Ditto.
This commit is contained in:
Andrew Cagney
2003-06-03 18:53:37 +00:00
parent 5a4e47bd30
commit ae1e741769
4 changed files with 81 additions and 11 deletions

View File

@ -343,6 +343,31 @@ extern CORE_ADDR frame_pc_unwind (struct frame_info *frame);
of the caller. */
extern void frame_pop (struct frame_info *frame);
/* Return memory from the specified frame. A frame knows its thread /
LWP and hence can find its way down to a target. The assumption
here is that the current and previous frame share a common address
space.
If the memory read fails, these methods throw an error.
NOTE: cagney/2003-06-03: Should there be unwind versions of these
methods? That isn't clear. Can code, for instance, assume that
this and the previous frame's memory or architecture are identical?
If architecture / memory changes are always separated by special
adaptor frames this should be ok. */
extern void get_frame_memory (struct frame_info *this_frame, CORE_ADDR addr,
void *buf, int len);
extern LONGEST get_frame_memory_signed (struct frame_info *this_frame,
CORE_ADDR memaddr, int len);
extern ULONGEST get_frame_memory_unsigned (struct frame_info *this_frame,
CORE_ADDR memaddr, int len);
/* Return this frame's architecture. */
extern struct gdbarch *get_frame_arch (struct frame_info *this_frame);
/* Values for the source flag to be used in print_frame_info_base(). */
enum print_what
{