diff options
author | Daniel Jacobowitz <drow@false.org> | 2004-11-07 21:33:29 +0000 |
---|---|---|
committer | Daniel Jacobowitz <drow@false.org> | 2004-11-07 21:33:29 +0000 |
commit | 12b8a2cb8d184bd0ef8c5354f42e1c7bbc28b140 (patch) | |
tree | 72266ce3ca81bb138fc85d4f9866bf32f671caed /gdb/i386-linux-tdep.c | |
parent | abbc6945577e04e769a5d62ec3dcff571a091730 (diff) | |
download | gdb-12b8a2cb8d184bd0ef8c5354f42e1c7bbc28b140.zip gdb-12b8a2cb8d184bd0ef8c5354f42e1c7bbc28b140.tar.gz gdb-12b8a2cb8d184bd0ef8c5354f42e1c7bbc28b140.tar.bz2 |
* Makefile.in (symfile-mem.o): Update dependencies.
* i386-linux-tdep.c (i386_linux_dwarf_signal_frame_p): New.
(i386_linux_init_abi): Call dwarf2_frame_set_signal_frame_p.
* inf-ptrace.c (inf_ptrace_attach): Call
observer_notify_inferior_created.
* inftarg.c (child_attach): Likewise.
* symfile-mem.c: Include "observer.h", "auxv.h", and "elf/common.h".
(symbol_file_add_from_memory): Take NAME argument. Use it for
the new BFD's filename.
(add_symbol_file_from_memory_command): Update call to
symbol_file_add_from_memory.
(struct symbol_file_add_from_memory_args, add_vsyscall_page)
(symbol_file_add_from_memory_wrapper): New.
(_initialize_symfile_mem): Register add_vsyscall_page as an
inferior_created observer.
Diffstat (limited to 'gdb/i386-linux-tdep.c')
-rw-r--r-- | gdb/i386-linux-tdep.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/gdb/i386-linux-tdep.c b/gdb/i386-linux-tdep.c index f42f6b7..85ae183 100644 --- a/gdb/i386-linux-tdep.c +++ b/gdb/i386-linux-tdep.c @@ -244,6 +244,27 @@ i386_linux_sigtramp_p (struct frame_info *next_frame) || strcmp ("__restore_rt", name) == 0); } +/* Return one if the unwound PC from NEXT_FRAME is in a signal trampoline + which may have DWARF-2 CFI. */ + +static int +i386_linux_dwarf_signal_frame_p (struct gdbarch *gdbarch, + struct frame_info *next_frame) +{ + CORE_ADDR pc = frame_pc_unwind (next_frame); + char *name; + + find_pc_partial_function (pc, &name, NULL, NULL); + + /* If a vsyscall DSO is in use, the signal trampolines may have these + names. */ + if (name && (strcmp (name, "__kernel_sigreturn") == 0 + || strcmp (name, "__kernel_rt_sigreturn") == 0)) + return 1; + + return 0; +} + /* Offset to struct sigcontext in ucontext, from <asm/ucontext.h>. */ #define I386_LINUX_UCONTEXT_SIGCONTEXT_OFFSET 20 @@ -414,6 +435,8 @@ i386_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch) /* GNU/Linux uses the dynamic linker included in the GNU C Library. */ set_gdbarch_skip_solib_resolver (gdbarch, glibc_skip_solib_resolver); + + dwarf2_frame_set_signal_frame_p (gdbarch, i386_linux_dwarf_signal_frame_p); } /* Provide a prototype to silence -Wmissing-prototypes. */ |