* 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 <signal.h>.
(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.
This commit is contained in:
Mark Kettenis 2001-10-14 20:42:07 +00:00
parent 8e4d17db0e
commit a14bd2ea89
9 changed files with 52 additions and 150 deletions

View File

@ -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 <signal.h>
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 */

View File

@ -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 <signal.h>
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 */

View File

@ -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 <signal.h>
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 */

View File

@ -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 <signal.h>
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 */

View File

@ -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

View File

@ -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 <signal.h>
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 */

View File

@ -25,41 +25,6 @@
/* Tell GDB that we can attach and detach other processes. */
#define ATTACH_DETACH
/* 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
/* 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;
/* Hook to look at new objfiles (shared libraries). */
extern void linuxthreads_new_objfile (struct objfile *objfile);
/* Method to print a human-readable thread description. */
extern char *linuxthreads_pid_to_str (ptid_t ptid);
extern int linuxthreads_prepare_to_proceed (int step);
#define PREPARE_TO_PROCEED(select_it) linuxthreads_prepare_to_proceed (1)
/* 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 <signal.h>
to find the range of real-time signals. */
@ -69,3 +34,36 @@ extern int linuxthreads_prepare_to_proceed (int step);
#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. */
#ifdef HAVE_LINK_H
#define SVR4_SHARED_LIBS
#include "solib.h" /* Support for shared libraries. */
#endif
/* Override child_wait in `inftarg.c'. */
struct target_waitstatus;
extern ptid_t child_wait (ptid_t ptid, struct target_waitstatus *ourstatus);
#define CHILD_WAIT
extern int lin_lwp_prepare_to_proceed (void);
#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))
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

View File

@ -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 <signal.h>
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 */

View File

@ -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