summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid S. Miller <davem@redhat.com>2002-04-22 00:27:39 +0000
committerDavid S. Miller <davem@redhat.com>2002-04-22 00:27:39 +0000
commit9319a2feca1b89d455884f911a662c09fcd05a8e (patch)
tree9268993710973e30f597d9d2d52ff60942485262
parenteaa7db9139bb30566dd0a20f83a4b2257829d580 (diff)
downloadppe42-binutils-9319a2feca1b89d455884f911a662c09fcd05a8e.tar.gz
ppe42-binutils-9319a2feca1b89d455884f911a662c09fcd05a8e.zip
2002-04-21 David S. Miller <davem@redhat.com>
* arch-utils.c (generic_prologue_frameless_p): Kill SKIP_PROLOGUE_FRAMELESS_P code. * config/arc/tm-arc.h (SKIP_PROLOGUE_FRAMELESS_P): Delete references. (PROLOGUE_FRAMELESS_P, arc_prologue_frameless_p): New. * arc-tdep.c (arc_prologue_frameless_p): Implement. * config/arc/tm-sparc.h (SKIP_PROLOGUE_FRAMELESS_P): Delete references. (PROLOGUE_FRAMELESS_P, sparc_prologue_frameless_p): New. * sparc-tdep.c (sparc_prologue_frameless_p): Implement. (sparc_gdbarch_init): Pass it to set_gdbarch_prologue_frameless_p.
-rw-r--r--gdb/ChangeLog15
-rw-r--r--gdb/arc-tdep.c8
-rw-r--r--gdb/arch-utils.c4
-rw-r--r--gdb/config/arc/tm-arc.h9
-rw-r--r--gdb/config/sparc/tm-sparc.h18
-rw-r--r--gdb/sparc-tdep.c14
6 files changed, 42 insertions, 26 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index b57870e56c..48cb6381b2 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,18 @@
+2002-04-21 David S. Miller <davem@redhat.com>
+
+ * arch-utils.c (generic_prologue_frameless_p): Kill
+ SKIP_PROLOGUE_FRAMELESS_P code.
+ * config/arc/tm-arc.h (SKIP_PROLOGUE_FRAMELESS_P): Delete
+ references.
+ (PROLOGUE_FRAMELESS_P, arc_prologue_frameless_p): New.
+ * arc-tdep.c (arc_prologue_frameless_p): Implement.
+ * config/arc/tm-sparc.h (SKIP_PROLOGUE_FRAMELESS_P): Delete
+ references.
+ (PROLOGUE_FRAMELESS_P, sparc_prologue_frameless_p): New.
+ * sparc-tdep.c (sparc_prologue_frameless_p): Implement.
+ (sparc_gdbarch_init): Pass it to
+ set_gdbarch_prologue_frameless_p.
+
2002-04-21 Jason Thorpe <thorpej@wasabisystems.com>
* Makefile.in (ALLDEPFILES): Add alphabsd-nat.c.
diff --git a/gdb/arc-tdep.c b/gdb/arc-tdep.c
index ffa538f6da..4b4308149f 100644
--- a/gdb/arc-tdep.c
+++ b/gdb/arc-tdep.c
@@ -296,6 +296,14 @@ arc_skip_prologue (CORE_ADDR pc, int frameless_p)
return codestream_tell ();
}
+/* Is the prologue at PC frameless? */
+
+int
+arc_prologue_frameless_p (CORE_ADDR pc)
+{
+ return (pc == arc_skip_prologue (pc, 1);
+}
+
/* Return the return address for a frame.
This is used to implement FRAME_SAVED_PC.
This is taken from frameless_look_for_prologue. */
diff --git a/gdb/arch-utils.c b/gdb/arch-utils.c
index 8e2d99a1fa..bdc9d65f9f 100644
--- a/gdb/arch-utils.c
+++ b/gdb/arch-utils.c
@@ -154,11 +154,7 @@ generic_remote_translate_xfer_address (CORE_ADDR gdb_addr, int gdb_len,
int
generic_prologue_frameless_p (CORE_ADDR ip)
{
-#ifdef SKIP_PROLOGUE_FRAMELESS_P
- return ip == SKIP_PROLOGUE_FRAMELESS_P (ip);
-#else
return ip == SKIP_PROLOGUE (ip);
-#endif
}
/* New/multi-arched targets should use the correct gdbarch field
diff --git a/gdb/config/arc/tm-arc.h b/gdb/config/arc/tm-arc.h
index cd9447637c..cbdcf41e0e 100644
--- a/gdb/config/arc/tm-arc.h
+++ b/gdb/config/arc/tm-arc.h
@@ -29,15 +29,14 @@
#define FUNCTION_START_OFFSET 0
/* Advance PC across any function entry prologue instructions
- to reach some "real" code. SKIP_PROLOGUE_FRAMELESS_P advances
- the PC past some of the prologue, but stops as soon as it
- knows that the function has a frame. Its result is equal
- to its input PC if the function is frameless, unequal otherwise. */
+ to reach some "real" code. */
#define SKIP_PROLOGUE(pc) (arc_skip_prologue (pc, 0))
-#define SKIP_PROLOGUE_FRAMELESS_P(pc) (arc_skip_prologue (pc, 1))
extern CORE_ADDR arc_skip_prologue (CORE_ADDR, int);
+#define PROLOGUE_FRAMELESS_P(pc) arc_prologue_frameless_p(pc)
+extern int arc_prologue_frameless_p (CORE_ADDR);
+
/* Sequence of bytes for breakpoint instruction.
??? The current value is "sr -1,[-1]" and is for the simulator only.
The simulator watches for this and does the right thing.
diff --git a/gdb/config/sparc/tm-sparc.h b/gdb/config/sparc/tm-sparc.h
index 2078d4c3dc..9c4c6b4613 100644
--- a/gdb/config/sparc/tm-sparc.h
+++ b/gdb/config/sparc/tm-sparc.h
@@ -248,10 +248,7 @@ extern int sparc_intreg_size (void);
#define BELIEVE_PCC_PROMOTION 1
/* Advance PC across any function entry prologue instructions
- to reach some "real" code. SKIP_PROLOGUE_FRAMELESS_P advances
- the PC past some of the prologue, but stops as soon as it
- knows that the function has a frame. Its result is equal
- to its input PC if the function is frameless, unequal otherwise. */
+ to reach some "real" code. */
#define SKIP_PROLOGUE(PC) sparc_skip_prologue (PC, 0)
@@ -312,6 +309,10 @@ extern CORE_ADDR sparc32_stack_align (CORE_ADDR addr);
sparc_reg_struct_has_addr (GCC_P, TYPE)
extern int sparc_reg_struct_has_addr (int, struct type *);
+/* Is the prologue at PC frameless? */
+#define PROLOGUE_FRAMELESS_P(PC) sparc_prologue_frameless_p (PC)
+extern int sparc_prologue_frameless_p (CORE_ADDR);
+
#endif /* GDB_MULTI_ARCH */
#if defined (GDB_MULTI_ARCH) && (GDB_MULTI_ARCH > 0)
@@ -333,15 +334,6 @@ extern int sparc_y_regnum (void);
#define PC_ADJUST(PC) sparc_pc_adjust (PC)
extern CORE_ADDR sparc_pc_adjust (CORE_ADDR);
-/* Advance PC across any function entry prologue instructions to reach
- some "real" code. SKIP_PROLOGUE_FRAMELESS_P advances the PC past
- some of the prologue, but stops as soon as it knows that the
- function has a frame. Its result is equal to its input PC if the
- function is frameless, unequal otherwise. */
-
-#define SKIP_PROLOGUE_FRAMELESS_P(PC) sparc_skip_prologue (PC, 1)
-extern CORE_ADDR sparc_skip_prologue (CORE_ADDR, int);
-
/* If an argument is declared "register", Sun cc will keep it in a register,
never saving it onto the stack. So we better not believe the "p" symbol
descriptor stab. */
diff --git a/gdb/sparc-tdep.c b/gdb/sparc-tdep.c
index 88aeb67e15..274daa6829 100644
--- a/gdb/sparc-tdep.c
+++ b/gdb/sparc-tdep.c
@@ -691,6 +691,14 @@ sparc_skip_prologue (CORE_ADDR start_pc, int frameless_p)
return examine_prologue (start_pc, frameless_p, NULL, NULL);
}
+/* Is the prologue at IP frameless? */
+
+int
+sparc_prologue_frameless_p (CORE_ADDR ip)
+{
+ return ip == sparc_skip_prologue (ip, 1);
+}
+
/* Check instruction at ADDR to see if it is a branch.
All non-annulled instructions will go to NPC or will trap.
Set *TARGET if we find a candidate branch; set to zero if not.
@@ -2777,10 +2785,7 @@ sparc64_register_byte (int regno)
}
/* Advance PC across any function entry prologue instructions to reach
- some "real" code. SKIP_PROLOGUE_FRAMELESS_P advances the PC past
- some of the prologue, but stops as soon as it knows that the
- function has a frame. Its result is equal to its input PC if the
- function is frameless, unequal otherwise. */
+ some "real" code. */
static CORE_ADDR
sparc_gdbarch_skip_prologue (CORE_ADDR ip)
@@ -2986,6 +2991,7 @@ sparc_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_reg_struct_has_addr (gdbarch, sparc_reg_struct_has_addr);
set_gdbarch_return_value_on_stack (gdbarch, sparc_return_value_on_stack);
set_gdbarch_saved_pc_after_call (gdbarch, sparc_saved_pc_after_call);
+ set_gdbarch_prologue_frameless_p (gdbarch, sparc_prologue_frameless_p);
set_gdbarch_short_bit (gdbarch, 2 * TARGET_CHAR_BIT);
set_gdbarch_skip_prologue (gdbarch, sparc_gdbarch_skip_prologue);
set_gdbarch_sp_regnum (gdbarch, SPARC_SP_REGNUM);
OpenPOWER on IntegriCloud