summaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorKevin Buettner <kevinb@redhat.com>2003-02-18 22:46:16 +0000
committerKevin Buettner <kevinb@redhat.com>2003-02-18 22:46:16 +0000
commit09558e9829e9471a480fdda63510db7f0ee7107d (patch)
treea5c6f8bc013ae1fd50d500b39975fbcdea57181c /gdb
parentec14497f4c6a4b08270f687d8fad44ef7a44e792 (diff)
downloadgdb-09558e9829e9471a480fdda63510db7f0ee7107d.tar.gz
Make Sparc/Solaris work again.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/config/sparc/tm-sparc.h4
-rw-r--r--gdb/sparc-tdep.c16
3 files changed, 23 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 715d1fc600d..6c8205e1f84 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2003-02-18 Kevin Buettner <kevinb@redhat.com>
+
+ * sparc-tdep.c (sparc_frame_chain): Adjust return value.
+ * config/sparc/tm-sparc.h (init_frame_pc_noop): Declare.
+
2003-02-18 Andrew Cagney <cagney@redhat.com>
* symtab.h (struct objfile): Add opaque declaration.
diff --git a/gdb/config/sparc/tm-sparc.h b/gdb/config/sparc/tm-sparc.h
index 05495ed4886..a3233874015 100644
--- a/gdb/config/sparc/tm-sparc.h
+++ b/gdb/config/sparc/tm-sparc.h
@@ -511,6 +511,10 @@ extern void sparc_print_extra_frame_info (struct frame_info *);
/* INIT_EXTRA_FRAME_INFO needs the PC to detect flat frames. */
+/* NOTE: cagney/2002-12-08: Add local declaration of
+ init_frame_pc_noop() because it isn't possible to include
+ "arch-utils.h" here. */
+extern CORE_ADDR init_frame_pc_noop (int fromleaf, struct frame_info *prev);
#define DEPRECATED_INIT_FRAME_PC(FROMLEAF, PREV) (init_frame_pc_noop (FROMLEAF, PREV))
#define DEPRECATED_INIT_FRAME_PC_FIRST(FROMLEAF, PREV) \
((FROMLEAF) ? SAVED_PC_AFTER_CALL ((PREV)->next) : \
diff --git a/gdb/sparc-tdep.c b/gdb/sparc-tdep.c
index 3fe4dfcf309..16e68a12f24 100644
--- a/gdb/sparc-tdep.c
+++ b/gdb/sparc-tdep.c
@@ -431,8 +431,20 @@ sparc_frame_chain (struct frame_info *frame)
{
/* Value that will cause FRAME_CHAIN_VALID to not worry about the chain
value. If it really is zero, we detect it later in
- sparc_init_prev_frame. */
- return (CORE_ADDR) 1;
+ sparc_init_prev_frame.
+
+ Note: kevinb/2003-02-18: The constant 1 used to be returned
+ here, but, after some recent changes to frame_chain_valid(),
+ this value is no longer suitable for causing frame_chain_valid()
+ to "not worry about the chain value." The constant ~0 (i.e,
+ 0xfff...) causes the failing test in frame_chain_valid() to
+ succeed thus preserving the "not worry" property. I had considered
+ using something like ``get_frame_base (frame) + 1''. However, I think
+ a constant value is better, because when debugging this problem,
+ I knew that something funny was going on as soon as I saw the
+ constant 1 being used as the frame chain elsewhere in GDB. */
+
+ return ~ (CORE_ADDR) 0;
}
CORE_ADDR