aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2002-12-13 23:18:56 +0000
committerAndrew Cagney <cagney@redhat.com>2002-12-13 23:18:56 +0000
commit6baff1d2e51f12744175867f6355b17d0b61ab05 (patch)
tree673c86fddb65a41414dc5492e788af79c6e409f4
parenteaab8960932cde9aac5092024fdb7494cb1fae46 (diff)
downloadgdb-6baff1d2e51f12744175867f6355b17d0b61ab05.zip
gdb-6baff1d2e51f12744175867f6355b17d0b61ab05.tar.gz
gdb-6baff1d2e51f12744175867f6355b17d0b61ab05.tar.bz2
2002-12-13 Andrew Cagney <ac131313@redhat.com>
* frame.h (get_frame_saved_regs): Declare. (frame_saved_regs_zalloc): Change return type to CORE_ADDR pointer. * frame.c (get_frame_saved_regs): New function. (frame_saved_regs_zalloc): Return the allocated saved_regs.
-rw-r--r--gdb/ChangeLog8
-rw-r--r--gdb/frame.c8
-rw-r--r--gdb/frame.h8
3 files changed, 22 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 9a81acc..eef2d2e 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,13 @@
2002-12-13 Andrew Cagney <ac131313@redhat.com>
+ * frame.h (get_frame_saved_regs): Declare.
+ (frame_saved_regs_zalloc): Change return type to CORE_ADDR
+ pointer.
+ * frame.c (get_frame_saved_regs): New function.
+ (frame_saved_regs_zalloc): Return the allocated saved_regs.
+
+2002-12-13 Andrew Cagney <ac131313@redhat.com>
+
* frame.c (deprecated_update_current_frame_pc_hack): New
function.
* frame.h (deprecated_update_current_frame_pc_hack): Declare.
diff --git a/gdb/frame.c b/gdb/frame.c
index 44e0811..17ee832 100644
--- a/gdb/frame.c
+++ b/gdb/frame.c
@@ -461,14 +461,20 @@ frame_obstack_alloc (unsigned long size)
return obstack_alloc (&frame_cache_obstack, size);
}
-void
+CORE_ADDR *
frame_saved_regs_zalloc (struct frame_info *fi)
{
fi->saved_regs = (CORE_ADDR *)
frame_obstack_alloc (SIZEOF_FRAME_SAVED_REGS);
memset (fi->saved_regs, 0, SIZEOF_FRAME_SAVED_REGS);
+ return fi->saved_regs;
}
+CORE_ADDR *
+get_frame_saved_regs (struct frame_info *fi)
+{
+ return fi->saved_regs;
+}
/* Return the innermost (currently executing) stack frame. */
diff --git a/gdb/frame.h b/gdb/frame.h
index f54f185..234c281 100644
--- a/gdb/frame.h
+++ b/gdb/frame.h
@@ -473,7 +473,6 @@ enum print_what
(sizeof (CORE_ADDR) * (NUM_REGS+NUM_PSEUDO_REGS))
extern void *frame_obstack_alloc (unsigned long size);
-extern void frame_saved_regs_zalloc (struct frame_info *);
/* Define a default FRAME_CHAIN_VALID, in the form that is suitable for most
targets. If FRAME_CHAIN_VALID returns zero it means that the given frame
@@ -654,6 +653,13 @@ extern struct frame_extra_info *frame_extra_info_zalloc (struct frame_info *fi,
long size);
extern struct frame_extra_info *get_frame_extra_info (struct frame_info *fi);
+/* Create/access the frame's `saved_regs'. The saved regs are used by
+ older code to store the address of each register (except for
+ SP_REGNUM where the value of the register in the previous frame is
+ stored). */
+extern CORE_ADDR *frame_saved_regs_zalloc (struct frame_info *);
+extern CORE_ADDR *get_frame_saved_regs (struct frame_info *);
+
/* FIXME: cagney/2002-12-06: Has the PC in the current frame changed?
"infrun.c", Thanks to DECR_PC_AFTER_BREAK, can change the PC after
the initial frame create. This puts things back in sync. */