aboutsummaryrefslogtreecommitdiff
path: root/gdb/sparc-tdep.c
diff options
context:
space:
mode:
authorJim Kingdon <jkingdon@engr.sgi.com>1994-02-28 06:06:05 +0000
committerJim Kingdon <jkingdon@engr.sgi.com>1994-02-28 06:06:05 +0000
commit4879254531c753527f4ae3bcf7e625fa71ca3902 (patch)
tree36769293d673d3ce5fd18acbc4b568911d05cb61 /gdb/sparc-tdep.c
parentb30601cb28a62dee5579e2cffe2b2d02bd1e0a9d (diff)
downloadgdb-4879254531c753527f4ae3bcf7e625fa71ca3902.zip
gdb-4879254531c753527f4ae3bcf7e625fa71ca3902.tar.gz
gdb-4879254531c753527f4ae3bcf7e625fa71ca3902.tar.bz2
* i387-tdep.c, i386-tdep.c i386v-nat.c, i386aix-nat.c,
i386m3-nat.c, config/m68k/tm-m68k.h, i960-tdep.c config/i960/tm-i960.h, remote-nindy.c, config/m88k/tm-m88k.h, m88k-tdep.c: Use floatformat.h instead of ieee-float.h. * sparc-tdep.c: Remove now-obsolete ieee-float.h stuff * findvar.c: Update comment regarding ieee-float.h.
Diffstat (limited to 'gdb/sparc-tdep.c')
-rw-r--r--gdb/sparc-tdep.c35
1 files changed, 24 insertions, 11 deletions
diff --git a/gdb/sparc-tdep.c b/gdb/sparc-tdep.c
index da7fd2c..7deca28 100644
--- a/gdb/sparc-tdep.c
+++ b/gdb/sparc-tdep.c
@@ -22,7 +22,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#include "inferior.h"
#include "obstack.h"
#include "target.h"
-#include "ieee-float.h"
+#include "value.h"
#include "symfile.h" /* for objfiles.h */
#include "objfiles.h" /* for find_pc_section */
@@ -164,6 +164,29 @@ sparc_frame_saved_pc (frame)
char buf[MAX_REGISTER_RAW_SIZE];
CORE_ADDR addr;
+ if (frame->signal_handler_caller)
+ {
+ /* This is the signal trampoline frame.
+ Get the saved PC from the sigcontext structure. */
+
+#ifndef SIGCONTEXT_PC_OFFSET
+#define SIGCONTEXT_PC_OFFSET 12
+#endif
+
+ CORE_ADDR sigcontext_addr;
+ char scbuf[TARGET_PTR_BIT / HOST_CHAR_BIT];
+
+ /* The sigcontext address is contained in register O2. */
+ get_saved_register (buf, (int *)NULL, (CORE_ADDR *)NULL,
+ frame, O0_REGNUM + 2, (enum lval_type *)NULL);
+ sigcontext_addr = extract_address (buf, REGISTER_RAW_SIZE (O0_REGNUM));
+
+ /* Don't cause a memory_error when accessing sigcontext in case the
+ stack layout has changed or the stack is corrupt. */
+ target_read_memory (sigcontext_addr + SIGCONTEXT_PC_OFFSET,
+ scbuf, sizeof (scbuf));
+ return extract_address (scbuf, sizeof (scbuf));
+ }
addr = (frame->bottom + FRAME_SAVED_I0 +
REGISTER_RAW_SIZE (I7_REGNUM) * (I7_REGNUM - I0_REGNUM));
read_memory (addr, buf, REGISTER_RAW_SIZE (I7_REGNUM));
@@ -568,16 +591,6 @@ sparc_pc_adjust(pc)
else
return pc+8;
}
-
-
-/* Structure of SPARC extended floating point numbers.
- This information is not currently used by GDB, since no current SPARC
- implementations support extended float. */
-
-const struct ext_format ext_format_sparc = {
-/* tot sbyte smask expbyte manbyte */
- 16, 0, 0x80, 0,1, 4,8, /* sparc */
-};
#ifdef USE_PROC_FS /* Target dependent support for /proc */