From a14bd2ea8937e02184939ebdeaa5a8a28473b5e9 Mon Sep 17 00:00:00 2001 From: Mark Kettenis Date: Sun, 14 Oct 2001 20:42:07 +0000 Subject: * config/nm-linux.h (struct objfile): Remove forward declaration. (linuxthreads_new_objfile): Remove prototype. (linuxthreads_pid_to_str): Remove prototype. (PREPARE_TO_PROCEED): Redefine in terms of lin_lwp_prepare_to_proceed. (struct target_waitstatus): Forward declaration. (child_wait): New prototype. (CHILD_WAIT): Define. (lin_lwp_attach_lwp, ATTACH_LWP, lin_thread_get_thread_signals, GET_THREAD_SIGNAL): Moved here from arch-specific files. * config/alpha/nm-linux.h, config/arm/nm-linux.h, config/ia64/nm-linux.h, config/mips/nm-linux.h, config/powerpc/nm-linux.h: Don't include . (lin_lwp_attach_lwp, ATTACH_LWP, lin_thread_get_thread_signals, GET_THREAD_SIGNAL): Remove. * config/i386/nm-linux.h: Likewise. (struct target_waitstatus, child_wait, CHILD_WAIT): Remove. * config/m68k/linux.mh, config/sparc/linux.mh (NATDEPFILES): Remove linux-thread.o. Add proc-service.o, thread-db.o and lin-lwp.o. (LOADLIBES): New variable. --- gdb/config/alpha/nm-linux.h | 16 ---------------- gdb/config/arm/nm-linux.h | 16 ---------------- gdb/config/i386/nm-linux.h | 32 ++----------------------------- gdb/config/ia64/nm-linux.h | 16 ---------------- gdb/config/m68k/linux.mh | 9 +++++++-- gdb/config/mips/nm-linux.h | 16 ---------------- gdb/config/nm-linux.h | 44 +++++++++++++++++++++---------------------- gdb/config/powerpc/nm-linux.h | 16 ---------------- gdb/config/sparc/linux.mh | 13 ++++++++++--- 9 files changed, 40 insertions(+), 138 deletions(-) (limited to 'gdb') diff --git a/gdb/config/alpha/nm-linux.h b/gdb/config/alpha/nm-linux.h index 72c6c8b..c86ecc3 100644 --- a/gdb/config/alpha/nm-linux.h +++ b/gdb/config/alpha/nm-linux.h @@ -57,20 +57,4 @@ extern int get_longjmp_target (CORE_ADDR *); pointer to the first register. */ #define ALPHA_REGSET_BASE(regsetp) ((long *) (regsetp)) -/* FIXME: kettenis/2000-09-03: This should be moved to ../nm-linux.h - once we have converted all Linux targets to use the new threads - stuff (without the #undef of course). */ - -extern int lin_lwp_prepare_to_proceed (void); -#undef PREPARE_TO_PROCEED -#define PREPARE_TO_PROCEED(select_it) lin_lwp_prepare_to_proceed () - -extern void lin_lwp_attach_lwp (ptid_t pid, int verbose); -#define ATTACH_LWP(ptid, verbose) lin_lwp_attach_lwp ((ptid), (verbose)) - -#include - -extern void lin_thread_get_thread_signals (sigset_t *mask); -#define GET_THREAD_SIGNALS(mask) lin_thread_get_thread_signals (mask) - #endif /* NM_LINUX_H */ diff --git a/gdb/config/arm/nm-linux.h b/gdb/config/arm/nm-linux.h index ce4e5ff..e2a1795 100644 --- a/gdb/config/arm/nm-linux.h +++ b/gdb/config/arm/nm-linux.h @@ -30,20 +30,4 @@ extern int kernel_u_size (void); /* Override copies of {fetch,store}_inferior_registers in infptrace.c. */ #define FETCH_INFERIOR_REGISTERS -/* FIXME: kettenis/2000-09-03: This should be moved to ../nm-linux.h - once we have converted all Linux targets to use the new threads - stuff (without the #undef of course). */ - -extern int lin_lwp_prepare_to_proceed (void); -#undef PREPARE_TO_PROCEED -#define PREPARE_TO_PROCEED(select_it) lin_lwp_prepare_to_proceed () - -extern void lin_lwp_attach_lwp (ptid_t ptid, int verbose); -#define ATTACH_LWP(ptid, verbose) lin_lwp_attach_lwp ((ptid), (verbose)) - -#include - -extern void lin_thread_get_thread_signals (sigset_t *mask); -#define GET_THREAD_SIGNALS(mask) lin_thread_get_thread_signals (mask) - #endif /* NM_ARMLINUX_H */ diff --git a/gdb/config/i386/nm-linux.h b/gdb/config/i386/nm-linux.h index 089cb1b..8cc69ec 100644 --- a/gdb/config/i386/nm-linux.h +++ b/gdb/config/i386/nm-linux.h @@ -63,14 +63,7 @@ extern void i386_linux_dr_reset_addr (int regnum); extern unsigned long i386_linux_dr_get_status (void); #define I386_DR_LOW_GET_STATUS() \ i386_linux_dr_get_status () - -/* We define this if link.h is available, because with ELF we use SVR4 - style shared libraries. */ - -#ifdef HAVE_LINK_H -#define SVR4_SHARED_LIBS -#include "solib.h" /* Support for shared libraries. */ -#endif + /* Override copies of {fetch,store}_inferior_registers in `infptrace.c'. */ #define FETCH_INFERIOR_REGISTERS @@ -87,25 +80,4 @@ extern int cannot_store_register (int regno); /* Override child_resume in `infptrace.c'. */ #define CHILD_RESUME -/* Override child_wait in `inftarg.c'. */ -struct target_waitstatus; -extern ptid_t child_wait (ptid_t ptid, struct target_waitstatus *ourstatus); -#define CHILD_WAIT - -/* FIXME: kettenis/2000-09-03: This should be moved to ../nm-linux.h - once we have converted all Linux targets to use the new threads - stuff (without the #undef of course). */ - -extern int lin_lwp_prepare_to_proceed (void); -#undef PREPARE_TO_PROCEED -#define PREPARE_TO_PROCEED(select_it) lin_lwp_prepare_to_proceed () - -extern void lin_lwp_attach_lwp (ptid_t ptid, int verbose); -#define ATTACH_LWP(ptid, verbose) lin_lwp_attach_lwp ((ptid), (verbose)) - -#include - -extern void lin_thread_get_thread_signals (sigset_t *mask); -#define GET_THREAD_SIGNALS(mask) lin_thread_get_thread_signals (mask) - -#endif /* nm_linux.h */ +#endif /* nm-linux.h */ diff --git a/gdb/config/ia64/nm-linux.h b/gdb/config/ia64/nm-linux.h index 3d55b36..2c980c0 100644 --- a/gdb/config/ia64/nm-linux.h +++ b/gdb/config/ia64/nm-linux.h @@ -76,20 +76,4 @@ extern int ia64_linux_insert_watchpoint (ptid_t ptid, CORE_ADDR addr, extern int ia64_linux_remove_watchpoint (ptid_t ptid, CORE_ADDR addr, int len); -/* FIXME: kettenis/2000-09-03: This should be moved to ../nm-linux.h - once we have converted all Linux targets to use the new threads - stuff (without the #undef of course). */ - -extern int lin_lwp_prepare_to_proceed (void); -#undef PREPARE_TO_PROCEED -#define PREPARE_TO_PROCEED(select_it) lin_lwp_prepare_to_proceed () - -extern void lin_lwp_attach_lwp (ptid_t ptid, int verbose); -#define ATTACH_LWP(ptid, verbose) lin_lwp_attach_lwp ((ptid), (verbose)) - -#include - -extern void lin_thread_get_thread_signals (sigset_t *mask); -#define GET_THREAD_SIGNALS(mask) lin_thread_get_thread_signals (mask) - #endif /* #ifndef NM_LINUX_H */ diff --git a/gdb/config/m68k/linux.mh b/gdb/config/m68k/linux.mh index 510274e..f3d40dd 100644 --- a/gdb/config/m68k/linux.mh +++ b/gdb/config/m68k/linux.mh @@ -1,10 +1,15 @@ -# Host: Motorola m68k running Linux +# Host: Motorola m68k running GNU/Linux. XM_FILE= xm-linux.h XDEPFILES= NAT_FILE= nm-linux.h NATDEPFILES= infptrace.o inftarg.o fork-child.o \ - corelow.o core-aout.o m68klinux-nat.o linux-thread.o + corelow.o core-aout.o m68klinux-nat.o \ + proc-service.o thread-db.o lin-lwp.o + +# The dynamically loaded libthread_db needs access to symbols in the +# gdb executable. +LOADLIBES = -ldl -rdynamic GDBSERVER_DEPFILES= low-linux.o diff --git a/gdb/config/mips/nm-linux.h b/gdb/config/mips/nm-linux.h index 27fb1b1..16b241d 100644 --- a/gdb/config/mips/nm-linux.h +++ b/gdb/config/mips/nm-linux.h @@ -47,20 +47,4 @@ int mips_linux_cannot_store_register (int regno); #define CANNOT_FETCH_REGISTER(regno) mips_linux_cannot_fetch_register (regno) #define CANNOT_STORE_REGISTER(regno) mips_linux_cannot_store_register (regno) -/* FIXME: This should be moved to ../nm-linux.h once we have converted all - Linux targets to use the new threads stuff (without the #undef of - course). */ - -extern int lin_lwp_prepare_to_proceed (void); -#undef PREPARE_TO_PROCEED -#define PREPARE_TO_PROCEED(select_it) lin_lwp_prepare_to_proceed () - -extern void lin_lwp_attach_lwp (ptid_t ptid, int verbose); -#define ATTACH_LWP(ptid, verbose) lin_lwp_attach_lwp ((ptid), (verbose)) - -#include - -extern void lin_thread_get_thread_signals (sigset_t *mask); -#define GET_THREAD_SIGNALS(mask) lin_thread_get_thread_signals (mask) - #endif /* NM_MIPSLINUX_H */ diff --git a/gdb/config/nm-linux.h b/gdb/config/nm-linux.h index a152400..59e5acb 100644 --- a/gdb/config/nm-linux.h +++ b/gdb/config/nm-linux.h @@ -25,6 +25,16 @@ /* Tell GDB that we can attach and detach other processes. */ #define ATTACH_DETACH +/* Since we're building a native debugger, we can include + to find the range of real-time signals. */ + +#include + +#ifdef __SIGRTMIN +#define REALTIME_LO __SIGRTMIN +#define REALTIME_HI (__SIGRTMAX + 1) +#endif + /* We define this if link.h is available, because with ELF we use SVR4 style shared libraries. */ @@ -34,38 +44,26 @@ #endif -/* FIXME: kettenis/2001-07-11: Stuff on this page is obsolete, and - only used by the (unmaintained) sparc and m68k ports. */ - -/* Support for the glibc LinuxThreads package. */ - -struct objfile; +/* Override child_wait in `inftarg.c'. */ +struct target_waitstatus; +extern ptid_t child_wait (ptid_t ptid, struct target_waitstatus *ourstatus); +#define CHILD_WAIT -/* Hook to look at new objfiles (shared libraries). */ -extern void linuxthreads_new_objfile (struct objfile *objfile); +extern int lin_lwp_prepare_to_proceed (void); +#define PREPARE_TO_PROCEED(select_it) lin_lwp_prepare_to_proceed () -/* Method to print a human-readable thread description. */ -extern char *linuxthreads_pid_to_str (ptid_t ptid); +extern void lin_lwp_attach_lwp (ptid_t ptid, int verbose); +#define ATTACH_LWP(ptid, verbose) lin_lwp_attach_lwp ((ptid), (verbose)) -extern int linuxthreads_prepare_to_proceed (int step); -#define PREPARE_TO_PROCEED(select_it) linuxthreads_prepare_to_proceed (1) - +extern void lin_thread_get_thread_signals (sigset_t *mask); +#define GET_THREAD_SIGNALS(mask) lin_thread_get_thread_signals (mask) /* Defined to make stepping-over-breakpoints be thread-atomic. */ #define USE_THREAD_STEP_NEEDED 1 + /* Use elf_gregset_t and elf_fpregset_t, rather than gregset_t and fpregset_t. */ #define GDB_GREGSET_T elf_gregset_t #define GDB_FPREGSET_T elf_fpregset_t - -/* Since we're building a native debugger, we can include - to find the range of real-time signals. */ - -#include - -#ifdef __SIGRTMIN -#define REALTIME_LO __SIGRTMIN -#define REALTIME_HI (__SIGRTMAX + 1) -#endif diff --git a/gdb/config/powerpc/nm-linux.h b/gdb/config/powerpc/nm-linux.h index 3835f74..d919d8e 100644 --- a/gdb/config/powerpc/nm-linux.h +++ b/gdb/config/powerpc/nm-linux.h @@ -33,20 +33,4 @@ extern int kernel_u_size (void); #define REGISTER_U_ADDR(addr, blockend, regno) \ (addr) = ppc_register_u_addr ((blockend),(regno)); -/* FIXME: kettenis/2000-09-03: This should be moved to ../nm-linux.h - once we have converted all Linux targets to use the new threads - stuff (without the #undef of course). */ - -extern int lin_lwp_prepare_to_proceed (void); -#undef PREPARE_TO_PROCEED -#define PREPARE_TO_PROCEED(select_it) lin_lwp_prepare_to_proceed () - -extern void lin_lwp_attach_lwp (ptid_t ptid, int verbose); -#define ATTACH_LWP(ptid, verbose) lin_lwp_attach_lwp ((ptid), (verbose)) - -#include - -extern void lin_thread_get_thread_signals (sigset_t *mask); -#define GET_THREAD_SIGNALS(mask) lin_thread_get_thread_signals (mask) - #endif /* #ifndef NM_LINUX_H */ diff --git a/gdb/config/sparc/linux.mh b/gdb/config/sparc/linux.mh index 937be17..71352b4 100644 --- a/gdb/config/sparc/linux.mh +++ b/gdb/config/sparc/linux.mh @@ -1,8 +1,15 @@ -# Host: Sparcstation, running Linux -XDEPFILES= +# Host: Sparcstation, running GNU/Linux. + XM_FILE= xm-linux.h +XDEPFILES= + NAT_FILE= nm-linux.h NATDEPFILES= fork-child.o infptrace.o inftarg.o corelow.o sparc-nat.o \ - linux-thread.o + proc-service.o thread-db.o lin-lwp.o + +# The dynamically loaded libthread_db needs access to symbols in the +# gdb executable. +LOADLIBES = -ldl -rdynamic + HOST_IPC=-DBSD_IPC GDBSERVER_DEPFILES= low-sparc.o -- cgit v1.1