diff options
author | Daniel Jacobowitz <drow@false.org> | 2004-01-13 16:12:25 +0000 |
---|---|---|
committer | Daniel Jacobowitz <drow@false.org> | 2004-01-13 16:12:25 +0000 |
commit | 1232d0e08f9677e386722d9c15df26759a442530 (patch) | |
tree | a76a4801871ecd5c5d659a4d12a548b2cece8fb8 /gdb/i386-sol2-tdep.c | |
parent | 962bba3ea8e66fdb184c0432a91e36cd8694dcc2 (diff) | |
download | gdb-1232d0e08f9677e386722d9c15df26759a442530.zip gdb-1232d0e08f9677e386722d9c15df26759a442530.tar.gz gdb-1232d0e08f9677e386722d9c15df26759a442530.tar.bz2 |
Merge mainline to branch. GDB is broken until I update cp-names.y.
Diffstat (limited to 'gdb/i386-sol2-tdep.c')
-rw-r--r-- | gdb/i386-sol2-tdep.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/gdb/i386-sol2-tdep.c b/gdb/i386-sol2-tdep.c index 2aa964e..0da32d5 100644 --- a/gdb/i386-sol2-tdep.c +++ b/gdb/i386-sol2-tdep.c @@ -53,6 +53,20 @@ i386_sol2_pc_in_sigtramp (CORE_ADDR pc, char *name) return (pc == 0xffffffff); } +/* Solaris doesn't have a `struct sigcontext', but it does have a + `mcontext_t' that contains the saved set of machine registers. */ + +static CORE_ADDR +i386_sol2_mcontext_addr (struct frame_info *next_frame) +{ + CORE_ADDR sp, ucontext_addr; + + sp = frame_unwind_register_unsigned (next_frame, I386_ESP_REGNUM); + ucontext_addr = get_frame_memory_unsigned (next_frame, sp + 8, 4); + + return ucontext_addr + 36; +} + /* Solaris 2. */ static void @@ -71,6 +85,10 @@ i386_sol2_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch) tdep->sizeof_gregset = 19 * 4; tdep->sizeof_fpregset = 380; + tdep->sigcontext_addr = i386_sol2_mcontext_addr; + tdep->sc_reg_offset = tdep->gregset_reg_offset; + tdep->sc_num_regs = tdep->gregset_num_regs; + /* Signal trampolines are slightly different from SVR4. */ set_gdbarch_pc_in_sigtramp (gdbarch, i386_sol2_pc_in_sigtramp); } |