* Makefile.in (mipsnbsd-tdep.o): Add nbsd-tdep.h to dependency

list.
(nbsd-tdep.o): Add $(gdb_string_h) to dependency list.
* alphanbsd-tdep.c (alphanbsd_pc_in_sigtramp): Use
nbsd_pc_in_sigtramp.
* mipsnbsd-tdep.c: Include nbsd-tdep.h.
(mipsnbsd_pc_in_sigtramp): Use nbsd_pc_in_sigtramp.
* nbsd-tdep.c: Include gdb_string.h.
(nbsd_pc_in_sigtramp): New function.
* nbsd-tdep.h (nbsd_pc_in_sigtramp): New prototype.
* ppcnbsd-tdep.c (ppcnbsd_pc_in_sigtramp): New function.
(ppcnbsd_init_abi): Set gdbarch_pc_in_sigtramp to
ppcnbsd_pc_in_sigtramp.
* shnbsd-tdep.c (shnbsd_pc_in_sigtramp): New function.
(shnbsd_init_abi): Set gdbarch_pc_in_sigtramp to
shnbsd_pc_in_sigtramp.
* sparcnbsd-tdep.c (sparcnbsd_init_abi_elf): Set
gdbarch_pc_in_sigtramp to nbsd_pc_in_sigtramp.
* config/mips/nbsd.mt (TDEPFILES): Add nbsd-tdep.o.
This commit is contained in:
Jason Thorpe 2002-08-31 20:28:37 +00:00
parent a6bd2a4f18
commit 3d9b49b090
10 changed files with 65 additions and 5 deletions

View file

@ -1,3 +1,25 @@
2002-08-31 Jason Thorpe <thorpej@wasabisystems.com>
* Makefile.in (mipsnbsd-tdep.o): Add nbsd-tdep.h to dependency
list.
(nbsd-tdep.o): Add $(gdb_string_h) to dependency list.
* alphanbsd-tdep.c (alphanbsd_pc_in_sigtramp): Use
nbsd_pc_in_sigtramp.
* mipsnbsd-tdep.c: Include nbsd-tdep.h.
(mipsnbsd_pc_in_sigtramp): Use nbsd_pc_in_sigtramp.
* nbsd-tdep.c: Include gdb_string.h.
(nbsd_pc_in_sigtramp): New function.
* nbsd-tdep.h (nbsd_pc_in_sigtramp): New prototype.
* ppcnbsd-tdep.c (ppcnbsd_pc_in_sigtramp): New function.
(ppcnbsd_init_abi): Set gdbarch_pc_in_sigtramp to
ppcnbsd_pc_in_sigtramp.
* shnbsd-tdep.c (shnbsd_pc_in_sigtramp): New function.
(shnbsd_init_abi): Set gdbarch_pc_in_sigtramp to
shnbsd_pc_in_sigtramp.
* sparcnbsd-tdep.c (sparcnbsd_init_abi_elf): Set
gdbarch_pc_in_sigtramp to nbsd_pc_in_sigtramp.
* config/mips/nbsd.mt (TDEPFILES): Add nbsd-tdep.o.
2002-08-30 Pierre Muller <muller@ics.u-strasbg.fr>
* breakpoint.c (breakpoint_init_inferior): Reset the val field of

View file

@ -1905,7 +1905,8 @@ mipsm3-nat.o: mipsm3-nat.c $(defs_h) $(inferior_h) $(regcache_h)
mipsnbsd-nat.o: mipsnbsd-nat.c $(defs_h) $(inferior_h) $(regcache_h) \
$(mipsnbsd_tdep_h)
mipsnbsd-tdep.o: mipsnbsd-tdep.c $(defs_h) $(gdbcore_h) $(regcache_h) \
$(target_h) $(value_h) $(osabi_h) $(mipsnbsd_tdep_h) $(solib_svr4_h)
$(target_h) $(value_h) $(osabi_h) $(mipsnbsd_tdep_h) $(solib_svr4_h) \
nbsd-tdep.h
mipsread.o: mipsread.c $(defs_h) $(gdb_string_h) $(bfd_h) $(symtab_h) \
$(symfile_h) $(objfiles_h) $(buildsym_h) $(stabsread_h) \
$(coff_sym_h) $(coff_internal_h) $(coff_ecoff_h) $(libcoff_h) \
@ -1924,7 +1925,7 @@ mon960-rom.o: mon960-rom.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \
monitor.o: monitor.c $(defs_h) $(gdbcore_h) $(target_h) $(gdb_string_h) \
$(command_h) $(serial_h) $(monitor_h) $(gdbcmd_h) $(inferior_h) \
$(gdb_regex_h) $(srec_h) $(regcache_h)
nbsd-tdep.o: nbsd-tdep.c $(defs_h) $(solib_svr4_h)
nbsd-tdep.o: nbsd-tdep.c $(defs_h) $(gdb_string_h) $(solib_svr4_h)
nindy-tdep.o: nindy-tdep.c $(defs_h) $(symtab_h) $(frame_h) $(gdbcore_h)
nlmread.o: nlmread.c $(defs_h) $(bfd_h) $(symtab_h) $(symfile_h) \
$(objfiles_h) $(buildsym_h) $(stabsread_h)

View file

@ -178,7 +178,8 @@ alphanbsd_sigtramp_offset (CORE_ADDR pc)
static int
alphanbsd_pc_in_sigtramp (CORE_ADDR pc, char *func_name)
{
return (alphanbsd_sigtramp_offset (pc) >= 0);
return (nbsd_pc_in_sigtramp (pc, func_name)
|| alphanbsd_sigtramp_offset (pc) >= 0);
}
static void

View file

@ -1,5 +1,6 @@
# Target: MIPS running NetBSD
TDEPFILES= mips-tdep.o mipsnbsd-tdep.o corelow.o solib.o solib-svr4.o
TDEPFILES= mips-tdep.o mipsnbsd-tdep.o corelow.o solib.o solib-svr4.o \
nbsd-tdep.o
TM_FILE= tm-nbsd.h
SIM_OBS = remote-sim.o

View file

@ -26,6 +26,7 @@
#include "value.h"
#include "osabi.h"
#include "nbsd-tdep.h"
#include "mipsnbsd-tdep.h"
#include "solib-svr4.h"
@ -219,7 +220,8 @@ mipsnbsd_sigtramp_offset (CORE_ADDR pc)
static int
mipsnbsd_pc_in_sigtramp (CORE_ADDR pc, char *func_name)
{
return (mipsnbsd_sigtramp_offset (pc) >= 0);
return (nbsd_pc_in_sigtramp (pc, func_name)
|| mipsnbsd_sigtramp_offset (pc) >= 0);
}
/* Figure out where the longjmp will land. We expect that we have

View file

@ -20,6 +20,7 @@
Boston, MA 02111-1307, USA. */
#include "defs.h"
#include "gdb_string.h"
#include "solib-svr4.h"
/* Fetch (and possibly build) an appropriate link_map_offsets
@ -96,3 +97,13 @@ nbsd_lp64_solib_svr4_fetch_link_map_offsets (void)
return lmp;
}
int
nbsd_pc_in_sigtramp (CORE_ADDR pc, char *func_name)
{
/* Check for libc-provided signal trampoline. All such trampolines
have function names which begin with "__sigtramp". */
return (func_name != NULL
&& strncmp (func_name, "__sigtramp", 10) == 0);
}

View file

@ -25,4 +25,6 @@
struct link_map_offsets *nbsd_ilp32_solib_svr4_fetch_link_map_offsets (void);
struct link_map_offsets *nbsd_lp64_solib_svr4_fetch_link_map_offsets (void);
int nbsd_pc_in_sigtramp (CORE_ADDR, char *);
#endif /* NBSD_TDEP_H */

View file

@ -196,6 +196,13 @@ static struct core_fns ppcnbsd_elfcore_fns =
NULL /* next */
};
static int
ppcnbsd_pc_in_sigtramp (CORE_ADDR pc, char *func_name)
{
/* FIXME: Need to add support for kernel-provided signal trampolines. */
return (nbsd_pc_in_sigtramp (pc, func_name));
}
static void
ppcnbsd_init_abi (struct gdbarch_info info,
struct gdbarch *gdbarch)
@ -203,6 +210,8 @@ ppcnbsd_init_abi (struct gdbarch_info info,
/* Stop at main. */
set_gdbarch_frame_chain_valid (gdbarch, generic_func_frame_chain_valid);
set_gdbarch_pc_in_sigtramp (gdbarch, ppcnbsd_pc_in_sigtramp);
set_solib_svr4_fetch_link_map_offsets (gdbarch,
nbsd_ilp32_solib_svr4_fetch_link_map_offsets);
}

View file

@ -165,10 +165,19 @@ static struct core_fns shnbsd_elfcore_fns =
NULL /* next */
};
static int
shnbsd_pc_in_sigtramp (CORE_ADDR pc, char *func_name)
{
/* FIXME: Need to add support for kernel-provided signal trampolines. */
return (nbsd_pc_in_sigtramp (pc, func_name));
}
static void
shnbsd_init_abi (struct gdbarch_info info,
struct gdbarch *gdbarch)
{
set_gdbarch_pc_in_sigtramp (gdbarch, shnbsd_pc_in_sigtramp);
set_solib_svr4_fetch_link_map_offsets (gdbarch,
nbsd_ilp32_solib_svr4_fetch_link_map_offsets);
}

View file

@ -500,6 +500,8 @@ sparcnbsd_init_abi_elf (struct gdbarch_info info,
{
sparcnbsd_init_abi_common (info, gdbarch);
set_gdbarch_pc_in_sigtramp (gdbarch, nbsd_pc_in_sigtramp);
set_solib_svr4_fetch_link_map_offsets (gdbarch,
gdbarch_ptr_bit (gdbarch) == 32 ?
nbsd_ilp32_solib_svr4_fetch_link_map_offsets :