From e24cb83d473f62515d0b82cbc0681d177a5737d3 Mon Sep 17 00:00:00 2001 From: "K. Richard Pixley" Date: Fri, 16 Oct 1992 23:11:13 +0000 Subject: [PATCH] linux host/target/native separation --- gdb/.Sanitize | 1 + gdb/ChangeLog | 11 +++++++++++ gdb/Makefile.in | 2 +- gdb/config/linux.mh | 4 +++- gdb/config/linux.mt | 2 +- gdb/nm-linux.h | 25 +++++++++++++++++++++++++ gdb/xm-linux.h | 12 +++++++----- 7 files changed, 49 insertions(+), 8 deletions(-) create mode 100644 gdb/nm-linux.h diff --git a/gdb/.Sanitize b/gdb/.Sanitize index 9703d4f1112..0f8d4a44a66 100644 --- a/gdb/.Sanitize +++ b/gdb/.Sanitize @@ -148,6 +148,7 @@ nm-i386bsd.h nm-i386mach.h nm-irix3.h nm-irix4.h +nm-linux.h nm-m88k.h nm-mips.h nm-news.h diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 42bd4ddb0c5..38b1ceb3847 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,16 @@ Fri Oct 16 13:06:08 1992 K. Richard Pixley (rich@sendai.cygnus.com) + Native support for linux (untested). + + * config/linux.mh (XDEPFILES): removed infptrace.o inftarg.o + fork-child.o coredep.o corelow.o i387-tdep.o. + (NAT_FILE, NATDEPFILES): new macros. + * config/linux.mt (TDEPFILES): removed exec.o, added i387-tdep.o. + * Makefile.in (HFILES): added nm-linux.h. + * nm-linux.h: new file. + * xm-linux.h: updated copyright. cleaned up formatting. + (ATTACH_DETACH, U_REGS_OFFSET): removed to nm-linux.h. + Native support for sun386 (untested). * config/sun386.mh (XDEPFILES): removed infptrace.o inftarg.o diff --git a/gdb/Makefile.in b/gdb/Makefile.in index b633d7883a1..2aab4f893cf 100644 --- a/gdb/Makefile.in +++ b/gdb/Makefile.in @@ -255,7 +255,7 @@ HFILES= breakpoint.h buildsym.h call-cmds.h command.h defs.h \ xm-m68k.h xm-sparc.h xm-sysv4.h xm-vax.h \ nm-irix3.h nm-irix4.h nm-mips.h nm-rs6000.h nm-sun2.h nm-sun3.h \ nm-sun4os4.h nm-trash.h nm-news.h nm-ultra3.h nm-m88k.h \ - nm-i386mach.h nm-sun386.h + nm-i386mach.h nm-sun386.h nm-linux.h REMOTE_EXAMPLES = m68k-stub.c i386-stub.c sparc-stub.c rem-multi.shar diff --git a/gdb/config/linux.mh b/gdb/config/linux.mh index 0c1b0a27311..e02e42060d4 100644 --- a/gdb/config/linux.mh +++ b/gdb/config/linux.mh @@ -1,6 +1,8 @@ # Host: Intel 386 running System V -XDEPFILES= infptrace.o inftarg.o fork-child.o coredep.o corelow.o i386-xdep.o i387-tdep.o +XDEPFILES= i386-xdep.o XM_FILE= xm-linux.h +NAT_FILE= nm-linux.h +NATDEPFILES= exec.o infptrace.o inftarg.o fork-child.o coredep.o corelow.o XM_CLIBS= TERMLIB= SYSV_DEFINE=-DSYSV diff --git a/gdb/config/linux.mt b/gdb/config/linux.mt index 05571e04b52..0f961ba453e 100644 --- a/gdb/config/linux.mt +++ b/gdb/config/linux.mt @@ -1,3 +1,3 @@ # Target: Intel 386 with a.out -TDEPFILES= exec.o i386-tdep.o i386-pinsn.o +TDEPFILES= i386-tdep.o i386-pinsn.o i387-tdep.o TM_FILE= tm-linux.h diff --git a/gdb/nm-linux.h b/gdb/nm-linux.h new file mode 100644 index 00000000000..cdb279d3454 --- /dev/null +++ b/gdb/nm-linux.h @@ -0,0 +1,25 @@ +/* Native support for linux, for GDB, the GNU debugger. + Copyright (C) 1986, 1987, 1989, 1992 Free Software Foundation, Inc. + +This file is part of GDB. + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +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. */ + +#include "nm-i386v.h" + +/* Tell gdb that we can attach and detach other processes */ +#define ATTACH_DETACH + +#define U_REGS_OFFSET 0 diff --git a/gdb/xm-linux.h b/gdb/xm-linux.h index 39b08d80249..f265c737678 100644 --- a/gdb/xm-linux.h +++ b/gdb/xm-linux.h @@ -1,24 +1,26 @@ -/* Macro defintions for linux. - Copyright (C) 1986, 1987, 1989 Free Software Foundation, Inc. +/* Native support for linux, for GDB, the GNU debugger. + Copyright (C) 1986, 1987, 1989, 1992 Free Software Foundation, Inc. + This file is part of GDB. + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. + 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. */ #include "xm-i386v.h" -/* Tell gdb that we can attach and detach other processes */ -#define ATTACH_DETACH + /* This is the amount to subtract from u.u_ar0 to get the offset in the core file of the register values. */ #undef KERNEL_U_ADDR #define KERNEL_U_ADDR 0x0 -#define U_REGS_OFFSET 0 #define PSIGNAL_IN_SIGNAL_H -- 2.30.2