mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-03 05:12:28 +08:00
gdb: Extend the trad-frame API
Adds two new functions to the trad-frame API and update the internals of trad-frame to use the new functions. These functions will be used in later commits. gdb/ChangeLog: * trad-frame.h (trad_frame_set_realreg): Declare. (trad_frame_set_addr): Declare. * trad-frame.c (trad_frame_set_realreg): Define new function. (trad_frame_set_addr): Define new function. (trad_frame_set_reg_realreg): Use new function. (trad_frame_set_reg_addr): Use new function.
This commit is contained in:
@ -1,3 +1,12 @@
|
||||
2018-09-03 Andrew Burgess <andrew.burgess@embecosm.com>
|
||||
|
||||
* trad-frame.h (trad_frame_set_realreg): Declare.
|
||||
(trad_frame_set_addr): Declare.
|
||||
* trad-frame.c (trad_frame_set_realreg): Define new function.
|
||||
(trad_frame_set_addr): Define new function.
|
||||
(trad_frame_set_reg_realreg): Use new function.
|
||||
(trad_frame_set_reg_addr): Use new function.
|
||||
|
||||
2018-09-01 Keith Seitz <keiths@redhat.com>
|
||||
|
||||
* compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
|
||||
|
@ -105,6 +105,26 @@ trad_frame_set_value (struct trad_frame_saved_reg this_saved_regs[],
|
||||
this_saved_regs[regnum].addr = val;
|
||||
}
|
||||
|
||||
/* See trad-frame.h. */
|
||||
|
||||
void
|
||||
trad_frame_set_realreg (struct trad_frame_saved_reg this_saved_regs[],
|
||||
int regnum, int realreg)
|
||||
{
|
||||
this_saved_regs[regnum].realreg = realreg;
|
||||
this_saved_regs[regnum].addr = -1;
|
||||
}
|
||||
|
||||
/* See trad-frame.h. */
|
||||
|
||||
void
|
||||
trad_frame_set_addr (struct trad_frame_saved_reg this_saved_regs[],
|
||||
int regnum, CORE_ADDR addr)
|
||||
{
|
||||
this_saved_regs[regnum].realreg = regnum;
|
||||
this_saved_regs[regnum].addr = addr;
|
||||
}
|
||||
|
||||
void
|
||||
trad_frame_set_reg_value (struct trad_frame_cache *this_trad_cache,
|
||||
int regnum, LONGEST val)
|
||||
@ -118,15 +138,14 @@ void
|
||||
trad_frame_set_reg_realreg (struct trad_frame_cache *this_trad_cache,
|
||||
int regnum, int realreg)
|
||||
{
|
||||
this_trad_cache->prev_regs[regnum].realreg = realreg;
|
||||
this_trad_cache->prev_regs[regnum].addr = -1;
|
||||
trad_frame_set_realreg (this_trad_cache->prev_regs, regnum, realreg);
|
||||
}
|
||||
|
||||
void
|
||||
trad_frame_set_reg_addr (struct trad_frame_cache *this_trad_cache,
|
||||
int regnum, CORE_ADDR addr)
|
||||
{
|
||||
this_trad_cache->prev_regs[regnum].addr = addr;
|
||||
trad_frame_set_addr (this_trad_cache->prev_regs, regnum, addr);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -88,6 +88,14 @@ struct trad_frame_saved_reg
|
||||
void trad_frame_set_value (struct trad_frame_saved_reg this_saved_regs[],
|
||||
int regnum, LONGEST val);
|
||||
|
||||
/* Encode REGNUM is in REALREG in the trad-frame. */
|
||||
void trad_frame_set_realreg (struct trad_frame_saved_reg this_saved_regs[],
|
||||
int regnum, int realreg);
|
||||
|
||||
/* Encode REGNUM is at address ADDR in the trad-frame. */
|
||||
void trad_frame_set_addr (struct trad_frame_saved_reg this_trad_cache[],
|
||||
int regnum, CORE_ADDR addr);
|
||||
|
||||
/* Mark REGNUM as unknown. */
|
||||
void trad_frame_set_unknown (struct trad_frame_saved_reg this_saved_regs[],
|
||||
int regnum);
|
||||
|
Reference in New Issue
Block a user