aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2002-06-26 15:28:46 +0000
committerAndrew Cagney <cagney@redhat.com>2002-06-26 15:28:46 +0000
commitda130f98ef0a1bfee17dbc6ad1cbfe7f2c92a0c3 (patch)
treec0bcb5ea7a8498acb7291bf2d9c50cb30b0091ce
parente5014cdae227efbff90d0d95443dea69d2c0f688 (diff)
downloadgdb-da130f98ef0a1bfee17dbc6ad1cbfe7f2c92a0c3.zip
gdb-da130f98ef0a1bfee17dbc6ad1cbfe7f2c92a0c3.tar.gz
gdb-da130f98ef0a1bfee17dbc6ad1cbfe7f2c92a0c3.tar.bz2
* frame.h (deprecated_generic_find_dummy_frame): Rename
generic_find_dummy_frame. * blockframe.c (generic_find_dummy_frame): Make static. (deprecated_generic_find_dummy_frame): New function. * sh-tdep.c (sh_nofp_frame_init_saved_regs): Replace generic_find_dummy_frame with deprecated_find_dummy_frame. (sh64_nofp_frame_init_saved_regs): Ditto. (sh_fp_frame_init_saved_regs): Ditto. * s390-tdep.c (s390_frame_saved_pc_nofix): Ditto. (s390_frame_chain): Ditto. * cris-tdep.c (cris_frame_init_saved_regs): Ditto.
-rw-r--r--gdb/ChangeLog17
-rw-r--r--gdb/blockframe.c8
-rw-r--r--gdb/cris-tdep.c2
-rw-r--r--gdb/frame.h8
-rw-r--r--gdb/s390-tdep.c4
-rw-r--r--gdb/sh-tdep.c10
6 files changed, 38 insertions, 11 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 90c0e39..b6b0e18 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,17 @@
+2002-06-26 Andrew Cagney <cagney@redhat.com>
+
+ * frame.h (deprecated_generic_find_dummy_frame): Rename
+ generic_find_dummy_frame.
+ * blockframe.c (generic_find_dummy_frame): Make static.
+ (deprecated_generic_find_dummy_frame): New function.
+ * sh-tdep.c (sh_nofp_frame_init_saved_regs): Replace
+ generic_find_dummy_frame with deprecated_find_dummy_frame.
+ (sh64_nofp_frame_init_saved_regs): Ditto.
+ (sh_fp_frame_init_saved_regs): Ditto.
+ * s390-tdep.c (s390_frame_saved_pc_nofix): Ditto.
+ (s390_frame_chain): Ditto.
+ * cris-tdep.c (cris_frame_init_saved_regs): Ditto.
+
2002-06-26 Grace Sainsbury <graces@redhat.com>
* monitor.h: Add the function regname to monitor_ops
@@ -5,7 +19,8 @@
* monitor.c (monitor_fetch_register): Added support for regname
function. The function is called if the array regnames is NULL.
(monitor_store_register): Same.
- * cpu32bug-rom.c (cpu32bug_regname): Add function. Replaces regnames array.
+ * cpu32bug-rom.c (cpu32bug_regname): Add function. Replaces
+ regnames array.
(init_cpu32bug_cmds): set cpu32bug_cmds.regnames to NULL,
cpu32bug_cmds.regname to point to new function.
* abug-rom.c (abug_regname): Same as above.
diff --git a/gdb/blockframe.c b/gdb/blockframe.c
index 526184e..d2143a4 100644
--- a/gdb/blockframe.c
+++ b/gdb/blockframe.c
@@ -1144,7 +1144,7 @@ static struct dummy_frame *dummy_frame_stack = NULL;
adjust for DECR_PC_AFTER_BREAK. This is because it is only legal
to call this function after the PC has been adjusted. */
-char *
+static char *
generic_find_dummy_frame (CORE_ADDR pc, CORE_ADDR fp)
{
struct dummy_frame *dummyframe;
@@ -1161,6 +1161,12 @@ generic_find_dummy_frame (CORE_ADDR pc, CORE_ADDR fp)
return 0;
}
+char *
+deprecated_generic_find_dummy_frame (CORE_ADDR pc, CORE_ADDR fp)
+{
+ return generic_find_dummy_frame (pc, fp);
+}
+
/* Function: pc_in_call_dummy (pc, sp, fp)
Return true if the PC falls in a dummy frame created by gdb for an
diff --git a/gdb/cris-tdep.c b/gdb/cris-tdep.c
index b223f87..864bac1 100644
--- a/gdb/cris-tdep.c
+++ b/gdb/cris-tdep.c
@@ -1155,7 +1155,7 @@ cris_frame_init_saved_regs (struct frame_info *fi)
CORE_ADDR ip;
struct symtab_and_line sal;
int best_limit;
- char *dummy_regs = generic_find_dummy_frame (fi->pc, fi->frame);
+ char *dummy_regs = deprecated_generic_find_dummy_frame (fi->pc, fi->frame);
/* Examine the entire prologue. */
register int frameless_p = 0;
diff --git a/gdb/frame.h b/gdb/frame.h
index 4406fc8..d3bd2ab 100644
--- a/gdb/frame.h
+++ b/gdb/frame.h
@@ -310,7 +310,13 @@ extern void generic_pop_dummy_frame (void);
extern int generic_pc_in_call_dummy (CORE_ADDR pc,
CORE_ADDR sp, CORE_ADDR fp);
-extern char *generic_find_dummy_frame (CORE_ADDR pc, CORE_ADDR fp);
+
+/* NOTE: cagney/2002-06-26: Targets should no longer use this
+ function. Instead, the contents of a dummy frames registers can be
+ obtained by applying: frame_register_unwind to the dummy frame; or
+ get_saved_register to the next outer frame. */
+
+extern char *deprecated_generic_find_dummy_frame (CORE_ADDR pc, CORE_ADDR fp);
extern void generic_fix_call_dummy (char *dummy, CORE_ADDR pc, CORE_ADDR fun,
int nargs, struct value **args,
diff --git a/gdb/s390-tdep.c b/gdb/s390-tdep.c
index cb3b81d..b1055ed 100644
--- a/gdb/s390-tdep.c
+++ b/gdb/s390-tdep.c
@@ -955,7 +955,7 @@ s390_frame_saved_pc_nofix (struct frame_info *fi)
if (fi->extra_info && fi->extra_info->saved_pc_valid)
return fi->extra_info->saved_pc;
- if (generic_find_dummy_frame (fi->pc, fi->frame))
+ if (deprecated_generic_find_dummy_frame (fi->pc, fi->frame))
return generic_read_register_dummy (fi->pc, fi->frame, S390_PC_REGNUM);
s390_frame_init_saved_regs (fi);
@@ -1009,7 +1009,7 @@ s390_frame_chain (struct frame_info *thisframe)
{
CORE_ADDR prev_fp = 0;
- if (generic_find_dummy_frame (thisframe->pc, thisframe->frame))
+ if (deprecated_generic_find_dummy_frame (thisframe->pc, thisframe->frame))
return generic_read_register_dummy (thisframe->pc, thisframe->frame,
S390_SP_REGNUM);
else
diff --git a/gdb/sh-tdep.c b/gdb/sh-tdep.c
index 2ef89fa..d6bedd7 100644
--- a/gdb/sh-tdep.c
+++ b/gdb/sh-tdep.c
@@ -1046,7 +1046,7 @@ sh_nofp_frame_init_saved_regs (struct frame_info *fi)
int opc;
int insn;
int r3_val = 0;
- char *dummy_regs = generic_find_dummy_frame (fi->pc, fi->frame);
+ char *dummy_regs = deprecated_generic_find_dummy_frame (fi->pc, fi->frame);
if (fi->saved_regs == NULL)
frame_saved_regs_zalloc (fi);
@@ -1385,7 +1385,7 @@ sh64_nofp_frame_init_saved_regs (struct frame_info *fi)
int insn_size;
int gdb_register_number;
int register_number;
- char *dummy_regs = generic_find_dummy_frame (fi->pc, fi->frame);
+ char *dummy_regs = deprecated_generic_find_dummy_frame (fi->pc, fi->frame);
struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
if (fi->saved_regs == NULL)
@@ -1586,7 +1586,7 @@ sh_fp_frame_init_saved_regs (struct frame_info *fi)
int opc;
int insn;
int r3_val = 0;
- char *dummy_regs = generic_find_dummy_frame (fi->pc, fi->frame);
+ char *dummy_regs = deprecated_generic_find_dummy_frame (fi->pc, fi->frame);
struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
if (fi->saved_regs == NULL)
@@ -1814,8 +1814,8 @@ sh64_get_saved_register (char *raw_buffer, int *optimized, CORE_ADDR *addrp,
*lval = not_lval;
if (raw_buffer)
memcpy (raw_buffer,
- generic_find_dummy_frame (frame->pc, frame->frame) +
- REGISTER_BYTE (regnum),
+ (deprecated_generic_find_dummy_frame (frame->pc, frame->frame)
+ + REGISTER_BYTE (regnum)),
REGISTER_RAW_SIZE (regnum));
return;
}