From 884914bf03af1a838162648dff5d87e9e099501f Mon Sep 17 00:00:00 2001 From: Stu Grossman Date: Mon, 2 Aug 1993 15:41:49 +0000 Subject: [PATCH] Sun Aug 1 22:58:18 1993 Stu Grossman (grossman at cygnus.com) * config/i386/i386lynx.mh (NATDEPFILES): Drop coredep (for now). * config/i386/nm-i386bsd.h: Protect from multiple inclusion. * config/i386/nm-i386lynx.h: Lotsa new host porting stuff. * config/i386/tm-i386lynx.h: Define SAVED_PC_AFTER_CALL and target_pid_to_str. --- gdb/ChangeLog | 6 ++++++ gdb/config/i386/i386lynx.mh | 2 +- gdb/config/i386/nm-i386bsd.h | 5 +++++ gdb/config/i386/nm-i386lynx.h | 27 ++++++++++++++++++++++++++- gdb/config/i386/tm-i386lynx.h | 19 +++++++++++++++++++ 5 files changed, 57 insertions(+), 2 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 4048467f15..0dbf969ea9 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,11 @@ Sun Aug 1 22:58:18 1993 Stu Grossman (grossman at cygnus.com) + * config/i386/i386lynx.mh (NATDEPFILES): Drop coredep (for now). + * config/i386/nm-i386bsd.h: Protect from multiple inclusion. + * config/i386/nm-i386lynx.h: Lotsa new host porting stuff. + * config/i386/tm-i386lynx.h: Define SAVED_PC_AFTER_CALL and + target_pid_to_str. + * Makefile.in (CLIBS): Reorder to make Lynx ld happy. * (HFILES): New file thread.h. * (OBS): New file thread.c. diff --git a/gdb/config/i386/i386lynx.mh b/gdb/config/i386/i386lynx.mh index a9cf20cab4..b4294cab4e 100644 --- a/gdb/config/i386/i386lynx.mh +++ b/gdb/config/i386/i386lynx.mh @@ -1,6 +1,6 @@ # Host: Intel 386 running Lynx XDEPFILES= -NATDEPFILES= exec.o fork-child.o infptrace.o inftarg.o corelow.o coredep.o i386b-nat.o +NATDEPFILES= exec.o fork-child.o infptrace.o inftarg.o corelow.o i386lynx-nat.o XM_FILE= xm-i386lynx.h NAT_FILE= nm-i386lynx.h REGEX=regex.o diff --git a/gdb/config/i386/nm-i386bsd.h b/gdb/config/i386/nm-i386bsd.h index ec71b545ad..e0371bb5b3 100644 --- a/gdb/config/i386/nm-i386bsd.h +++ b/gdb/config/i386/nm-i386bsd.h @@ -17,6 +17,9 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#ifndef NM_I386BSD_H +#define NM_I386BSD_H + /* This is the amount to subtract from u.u_ar0 to get the offset in the core file of the register values. */ @@ -32,3 +35,5 @@ extern int i386_register_u_addr PARAMS ((int, int)); #define PTRACE_ARG3_TYPE char* + +#endif /* NM_I386BSD_H */ diff --git a/gdb/config/i386/nm-i386lynx.h b/gdb/config/i386/nm-i386lynx.h index 2b9c33a331..3a2d318ef7 100644 --- a/gdb/config/i386/nm-i386lynx.h +++ b/gdb/config/i386/nm-i386lynx.h @@ -1,4 +1,4 @@ -/* Native-dependent definitions for Intel 386 running BSD Unix, for GDB. +/* Native-dependent definitions for Intel 386 running Lynx, for GDB. Copyright 1986, 1987, 1989, 1992 Free Software Foundation, Inc. This file is part of GDB. @@ -17,6 +17,19 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#ifndef NM_I386LYNX_H +#define NM_I386LYNX_H + +#include +#include +#include +#include +#include +#include +#include +#include +#include "thread.h" + /* This is the amount to subtract from u.u_ar0 to get the offset in the core file of the register values. */ @@ -31,3 +44,15 @@ extern int i386_register_u_addr PARAMS ((int, int)); #define PTRACE_ARG3_TYPE char* + +/* Override copies of {fetch,store}_inferior_registers in infptrace.c. */ +#define FETCH_INFERIOR_REGISTERS + +/* Thread ID of stopped thread */ + +#define WIFTID(x) (((union wait *)&x)->w_tid) + +#define CHILD_WAIT +extern int child_wait PARAMS ((int *status)); + +#endif /* NM_I386LYNX_H */ diff --git a/gdb/config/i386/tm-i386lynx.h b/gdb/config/i386/tm-i386lynx.h index 934042220b..adf5c7c98d 100644 --- a/gdb/config/i386/tm-i386lynx.h +++ b/gdb/config/i386/tm-i386lynx.h @@ -17,8 +17,27 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#ifndef TM_I386LYNX_H +#define TM_I386LYNX_H + /* Override number of expected traps from sysv. */ #define START_INFERIOR_TRAPS_EXPECTED 2 /* Most definitions from sysv could be used. */ #include "i386/tm-i386v.h" + +#undef SAVED_PC_AFTER_CALL + +#define SAVED_PC_AFTER_CALL i386lynx_saved_pc_after_call +CORE_ADDR i386lynx_saved_pc_after_call (); + +/* Lynx needs a special definition of this so that we can + print out the pid and thread number seperatly. */ + +#undef target_pid_to_str + +#define target_pid_to_str(PID) \ + i386lynx_pid_to_str (PID) +extern char *i386lynx_pid_to_str PARAMS ((int pid)); + +#endif /* TM_I386LYNX_H */ -- 2.34.1