This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[Commit] trad-frame.c -- add 'set_reg_value' method
- From: Michael Snyder <msnyder at redhat dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: Fri, 04 Mar 2005 17:56:19 -0800
- Subject: [Commit] trad-frame.c -- add 'set_reg_value' method
- Organization: Red Hat, Inc.
An obvious oversight, unles I'm mistaken; without this function,
users of a trad_frame cannot set the saved_regs value of the SP,
because they have no access to the prev_regs object in the trad_frame
struct.
2005-03-04 Michael Snyder <msnyder@redhat.com>
* trad-frame.c (trad_frame_set_reg_value): New function.
* trad-frame.h (trad_frame_set_reg_value): Export.
Index: trad-frame.c
===================================================================
RCS file: /cvs/src/src/gdb/trad-frame.c,v
retrieving revision 1.9
diff -p -r1.9 trad-frame.c
*** trad-frame.c 11 Feb 2005 04:06:07 -0000 1.9
--- trad-frame.c 5 Mar 2005 01:49:48 -0000
*************** trad_frame_set_value (struct trad_frame_
*** 98,103 ****
--- 98,112 ----
}
void
+ trad_frame_set_reg_value (struct trad_frame_cache *this_trad_cache,
+ int regnum, LONGEST val)
+ {
+ /* External interface for users of trad_frame_cache
+ (who cannot access the prev_regs object directly). */
+ trad_frame_set_value (this_trad_cache->prev_regs, regnum, val);
+ }
+
+ void
trad_frame_set_reg_realreg (struct trad_frame_cache *this_trad_cache,
int regnum, int realreg)
{
Index: trad-frame.h
===================================================================
RCS file: /cvs/src/src/gdb/trad-frame.h,v
retrieving revision 1.8
diff -p -r1.8 trad-frame.h
*** trad-frame.h 1 Aug 2004 14:34:39 -0000 1.8
--- trad-frame.h 5 Mar 2005 01:49:48 -0000
*************** void trad_frame_set_reg_unknown (struct
*** 49,54 ****
--- 49,57 ----
int regnum, CORE_ADDR addr);
void trad_frame_set_reg_addr (struct trad_frame_cache *this_trad_cache,
int regnum, CORE_ADDR addr);
+ void trad_frame_set_reg_value (struct trad_frame_cache *this_cache,
+ int regnum, LONGEST val);
+
void trad_frame_get_register (struct trad_frame_cache *this_trad_cache,
struct frame_info *next_frame,
int regnum, int *optimizedp,