diff options
author | Andreas Schwab <schwab@suse.de> | 2003-05-25 18:50:55 +0000 |
---|---|---|
committer | Andreas Schwab <schwab@suse.de> | 2003-05-25 18:50:55 +0000 |
commit | 34e71b2756898d4dc96ff9caa98645149d550cc8 (patch) | |
tree | fe9058d152206f855737e521e1e6e54bfb35e834 /gdb/m68klinux-tdep.c | |
parent | a59d7cbc0e6313ddc07b4721ef449d4aeaecc38f (diff) | |
download | gdb-34e71b2756898d4dc96ff9caa98645149d550cc8.tar.gz |
* m68k-tdep.c (m68k_register_raw_size): Remove cast.
(m68k_register_virtual_size): Likewise.
(altos_skip_prologue): Remove obsolete function.
(isi_frame_num_args): Likewise.
(news_frame_num_args): Likewise.
(m68k_fix_call_dummy): Make static.
(m68k_push_dummy_frame): Likewise.
(m68k_pop_frame): Likewise.
(m68k_skip_prologue): Likewise.
(m68k_frame_init_saved_regs): Likewise.
(m68k_saved_pc_after_call): Likewise.
(m68k_get_longjmp_target): Make multi-arch.
(m68k_gdbarch_init): Allocate and initialize gdbarch_tdep
structure. Register m68k_get_longjmp_target if enabled.
* m68k-tdep.h (struct gdbarch_tdep): Define.
* config/m68k/tm-m68k.h: Don't include "regcache.h".
* Makefile.in (config.status): Also depend on configure.tgt
and configure.host.
(m68klinux-tdep.o): Update dependencies.
* configure.tgt (m68*-*-linux*): Set gdb_multi_arch to 1.
* m68klinux-tdep.c (M68K_LINUX_JB_ELEMENT_SIZE): Define.
(M68K_LINUX_JB_PC): Define.
(m68k_linux_pc_in_sigtramp): Renamed from m68k_linux_in_sigtramp
and take additional parameter.
(m68k_linux_sigtramp_saved_pc): Update.
(m68k_linux_init_abi): Set jb_pc and jb_elt_size. Register
m68k_linux_pc_in_sigtramp, in_plt_section,
find_solib_trampoline_target.
* config/m68k/tm-linux.h: Don't include any tm headers.
(START_INFERIOR_TRAPS_EXPECTED): Remove definition.
(JB_ELEMENT_SIZE): Likewise.
(JB_PC): Likewise.
(GET_LONGJMP_TARGET): Likewise.
(IN_SIGTRAMP): Likewise.
(SVR4_SHARED_LIBS): Define this and include "solib.h".
Diffstat (limited to 'gdb/m68klinux-tdep.c')
-rw-r--r-- | gdb/m68klinux-tdep.c | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/gdb/m68klinux-tdep.c b/gdb/m68klinux-tdep.c index 8b9193d2cc3..612f9fd5d9d 100644 --- a/gdb/m68klinux-tdep.c +++ b/gdb/m68klinux-tdep.c @@ -27,8 +27,16 @@ #include "gdb_string.h" #include "gdbtypes.h" #include "osabi.h" +#include "regcache.h" +#include "objfiles.h" +#include "symtab.h" #include "m68k-tdep.h" +/* Offsets (in target ints) into jmp_buf. */ + +#define M68K_LINUX_JB_ELEMENT_SIZE 4 +#define M68K_LINUX_JB_PC 7 + /* Check whether insn1 and insn2 are parts of a signal trampoline. */ #define IS_SIGTRAMP(insn1, insn2) \ @@ -47,8 +55,8 @@ of m68k_linux_frame_saved_pc we also distinguish between non-RT and RT signal trampolines. */ -int -m68k_linux_in_sigtramp (CORE_ADDR pc) +static int +m68k_linux_pc_in_sigtramp (CORE_ADDR pc, char *name) { CORE_ADDR sp; char buf[12]; @@ -110,7 +118,7 @@ m68k_linux_sigtramp_saved_pc (struct frame_info *frame) /* Don't cause a memory_error when accessing sigcontext in case the stack layout has changed or the stack is corrupt. */ - if (m68k_linux_in_sigtramp (get_frame_pc (frame)) == 2) + if (m68k_linux_pc_in_sigtramp (get_frame_pc (frame), 0) == 2) target_read_memory (sigcontext_addr + UCONTEXT_PC_OFFSET, buf, ptrbytes); else target_read_memory (sigcontext_addr + SIGCONTEXT_PC_OFFSET, buf, ptrbytes); @@ -189,6 +197,11 @@ m68k_linux_extract_struct_value_address (char *regbuf) static void m68k_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch) { + struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); + + tdep->jb_pc = M68K_LINUX_JB_PC; + tdep->jb_elt_size = M68K_LINUX_JB_ELEMENT_SIZE; + set_gdbarch_deprecated_frame_saved_pc (gdbarch, m68k_linux_frame_saved_pc); set_gdbarch_deprecated_extract_return_value (gdbarch, @@ -197,6 +210,12 @@ m68k_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch) m68k_linux_store_return_value); set_gdbarch_deprecated_extract_struct_value_address (gdbarch, m68k_linux_extract_struct_value_address); + + set_gdbarch_pc_in_sigtramp (gdbarch, m68k_linux_pc_in_sigtramp); + + /* Shared library handling. */ + set_gdbarch_in_solib_call_trampoline (gdbarch, in_plt_section); + set_gdbarch_skip_trampoline_code (gdbarch, find_solib_trampoline_target); } void |