aboutsummaryrefslogtreecommitdiff
path: root/gdb/mips-tdep.c
diff options
context:
space:
mode:
authorDaniel Jacobowitz <drow@false.org>2004-02-11 18:47:27 +0000
committerDaniel Jacobowitz <drow@false.org>2004-02-11 18:47:27 +0000
commit6de918a6f50f6f9dbc8ae3628dcee80d0f8e2f64 (patch)
tree57d2a3dba3f5301c979c1ec2901808828bad6c64 /gdb/mips-tdep.c
parent87b3ede8aff95551e9bc26afbfb143c4c0941095 (diff)
downloadgdb-6de918a6f50f6f9dbc8ae3628dcee80d0f8e2f64.zip
gdb-6de918a6f50f6f9dbc8ae3628dcee80d0f8e2f64.tar.gz
gdb-6de918a6f50f6f9dbc8ae3628dcee80d0f8e2f64.tar.bz2
* mips-linux-tdep.c: Include "frame.h".
(mips_linux_in_dynsym_stub, mips_linux_in_dynsym_resolve_code) (mips_linux_skip_resolver): New functions. (mips_linux_init_abi): Call set_gdbarch_skip_solib_resolver and set_gdbarch_in_solib_call_trampoline. * mips-tdep.c (mips_gdbarch_init): Move gdbarch_init_osabi call to after set_gdbarch_in_solib_return_trampoline. Only set the solib hooks to mips16 functions if the OS ABI is unknown. * config/mips/tm-linux.h (IN_SOLIB_CALL_TRAMPOLINE): Undefine after including "config/tm-linux.h". (IN_SOLIB_DYNSYM_RESOLVE_CODE): Define. * Makefile.in (mips-linux-tdep.o): Update.
Diffstat (limited to 'gdb/mips-tdep.c')
-rw-r--r--gdb/mips-tdep.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c
index 4b45db7..fb80964 100644
--- a/gdb/mips-tdep.c
+++ b/gdb/mips-tdep.c
@@ -5815,13 +5815,22 @@ mips_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
is sitting on? */
set_gdbarch_have_nonsteppable_watchpoint (gdbarch, 1);
- /* Hook in OS ABI-specific overrides, if they have been registered. */
- gdbarch_init_osabi (info, gdbarch);
-
set_gdbarch_skip_trampoline_code (gdbarch, mips_skip_stub);
- set_gdbarch_in_solib_call_trampoline (gdbarch, mips_in_call_stub);
- set_gdbarch_in_solib_return_trampoline (gdbarch, mips_in_return_stub);
+ /* NOTE drow/2004-02-11: We overload the core solib trampoline code
+ to support MIPS16. This is a bad thing. Make sure not to do it
+ if we have an OS ABI that actually supports shared libraries, since
+ shared library support is more important. If we have an OS someday
+ that supports both shared libraries and MIPS16, we'll have to find
+ a better place for these. */
+ if (info.osabi == GDB_OSABI_UNKNOWN)
+ {
+ set_gdbarch_in_solib_call_trampoline (gdbarch, mips_in_call_stub);
+ set_gdbarch_in_solib_return_trampoline (gdbarch, mips_in_return_stub);
+ }
+
+ /* Hook in OS ABI-specific overrides, if they have been registered. */
+ gdbarch_init_osabi (info, gdbarch);
return gdbarch;
}