This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[commit] deprecate existing get_frame_saved_regs()
- From: ac131313 at redhat dot com (Andrew Cagney)
- To: gdb-patches at sources dot redhat dot com
- Date: Wed, 11 Dec 2002 15:32:08 -0500 (EST)
- Subject: [commit] deprecate existing get_frame_saved_regs()
Hello,
The attached identifies the old get_frame_saved_regs() as deprecated.
Only non-multi-arch targets use it.
With this in there is room for a proper get_frame_saved_regs() function.
committed,
Andrew
2002-12-11 Andrew Cagney <cagney@redhat.com>
* frame.c (deprecated_get_frame_saved_regs): Rename
get_frame_saved_regs.
* frame.h (deprecated_get_frame_saved_regs): Update declaration.
* sparc-tdep.c: Update.
* hppa-tdep.c: Update.
* h8500-tdep.c: Update.
Index: frame.c
===================================================================
RCS file: /cvs/src/src/gdb/frame.c,v
retrieving revision 1.40
diff -u -r1.40 frame.c
--- frame.c 11 Dec 2002 02:26:35 -0000 1.40
+++ frame.c 11 Dec 2002 20:14:35 -0000
@@ -1181,8 +1181,8 @@
/* Find the addresses in which registers are saved in FRAME. */
void
-get_frame_saved_regs (struct frame_info *frame,
- struct frame_saved_regs *saved_regs_addr)
+deprecated_get_frame_saved_regs (struct frame_info *frame,
+ struct frame_saved_regs *saved_regs_addr)
{
if (frame->saved_regs == NULL)
{
Index: frame.h
===================================================================
RCS file: /cvs/src/src/gdb/frame.h,v
retrieving revision 1.44
diff -u -r1.44 frame.h
--- frame.h 4 Dec 2002 00:05:53 -0000 1.44
+++ frame.h 11 Dec 2002 20:14:36 -0000
@@ -478,9 +478,9 @@
#ifdef FRAME_FIND_SAVED_REGS
/* XXX - deprecated */
-#define FRAME_INIT_SAVED_REGS(FI) get_frame_saved_regs (FI, NULL)
-extern void get_frame_saved_regs (struct frame_info *,
- struct frame_saved_regs *);
+#define FRAME_INIT_SAVED_REGS(FI) deprecated_get_frame_saved_regs (FI, NULL)
+extern void deprecated_get_frame_saved_regs (struct frame_info *,
+ struct frame_saved_regs *);
#endif
extern struct block *get_frame_block (struct frame_info *,
Index: h8500-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/h8500-tdep.c,v
retrieving revision 1.16
diff -u -r1.16 h8500-tdep.c
--- h8500-tdep.c 11 Dec 2002 02:26:35 -0000 1.16
+++ h8500-tdep.c 11 Dec 2002 20:14:36 -0000
@@ -165,7 +165,7 @@
struct frame_saved_regs fsr;
struct frame_info *frame = get_current_frame ();
- get_frame_saved_regs (frame, &fsr);
+ deprecated_get_frame_saved_regs (frame, &fsr);
for (regnum = 0; regnum < 8; regnum++)
{
Index: hppa-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/hppa-tdep.c,v
retrieving revision 1.38
diff -u -r1.38 hppa-tdep.c
--- hppa-tdep.c 11 Dec 2002 02:26:35 -0000 1.38
+++ hppa-tdep.c 11 Dec 2002 20:14:38 -0000
@@ -916,7 +916,7 @@
{
struct frame_saved_regs saved_regs;
- get_frame_saved_regs (frame->next, &saved_regs);
+ deprecated_get_frame_saved_regs (frame->next, &saved_regs);
if (read_memory_integer (saved_regs.regs[FLAGS_REGNUM],
TARGET_PTR_BIT / 8) & 0x2)
{
@@ -956,7 +956,7 @@
{
struct frame_saved_regs saved_regs;
- get_frame_saved_regs (frame->next, &saved_regs);
+ deprecated_get_frame_saved_regs (frame->next, &saved_regs);
if (read_memory_integer (saved_regs.regs[FLAGS_REGNUM],
TARGET_PTR_BIT / 8) & 0x2)
{
@@ -1228,7 +1228,7 @@
/* The unwind entry claims that r3 is saved here. However,
in optimized code, GCC often doesn't actually save r3.
We'll discover this if we look at the prologue. */
- get_frame_saved_regs (tmp_frame, &saved_regs);
+ deprecated_get_frame_saved_regs (tmp_frame, &saved_regs);
saved_regs_frame = tmp_frame;
/* If we have an address for r3, that's good. */
@@ -1277,7 +1277,7 @@
system call has a variable sized stack frame. */
if (tmp_frame != saved_regs_frame)
- get_frame_saved_regs (tmp_frame, &saved_regs);
+ deprecated_get_frame_saved_regs (tmp_frame, &saved_regs);
/* Abominable hack. */
if (current_target.to_has_execution == 0
@@ -1312,7 +1312,7 @@
tmp_frame = tmp_frame->next;
if (tmp_frame != saved_regs_frame)
- get_frame_saved_regs (tmp_frame, &saved_regs);
+ deprecated_get_frame_saved_regs (tmp_frame, &saved_regs);
/* Abominable hack. See above. */
if (current_target.to_has_execution == 0
@@ -1535,7 +1535,7 @@
double freg_buffer;
fp = get_frame_base (frame);
- get_frame_saved_regs (frame, &fsr);
+ deprecated_get_frame_saved_regs (frame, &fsr);
#ifndef NO_PC_SPACE_QUEUE_RESTORE
if (fsr.regs[IPSW_REGNUM]) /* Restoring a call dummy frame */
Index: sparc-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/sparc-tdep.c,v
retrieving revision 1.52
diff -u -r1.52 sparc-tdep.c
--- sparc-tdep.c 1 Dec 2002 19:07:15 -0000 1.52
+++ sparc-tdep.c 11 Dec 2002 20:14:39 -0000
@@ -1210,11 +1210,12 @@
/* Discard from the stack the innermost frame, restoring all saved registers.
- Note that the values stored in fsr by get_frame_saved_regs are *in
- the context of the called frame*. What this means is that the i
- regs of fsr must be restored into the o regs of the (calling) frame that
- we pop into. We don't care about the output regs of the calling frame,
- since unless it's a dummy frame, it won't have any output regs in it.
+ Note that the values stored in fsr by
+ deprecated_get_frame_saved_regs are *in the context of the called
+ frame*. What this means is that the i regs of fsr must be restored
+ into the o regs of the (calling) frame that we pop into. We don't
+ care about the output regs of the calling frame, since unless it's
+ a dummy frame, it won't have any output regs in it.
We never have to bother with %l (local) regs, since the called routine's
locals get tossed, and the calling routine's locals are already saved