diff options
author | Andrew Cagney <cagney@redhat.com> | 2001-04-17 21:20:49 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2001-04-17 21:20:49 +0000 |
commit | 514e603dc095d50008d671e6d7bbe0e975fc2aaa (patch) | |
tree | 0cc689bfbc11d479c74ddfa6882c2f483991f70e | |
parent | 6240bebf519f30316d72b2d1a06c5875de444603 (diff) | |
download | gdb-514e603dc095d50008d671e6d7bbe0e975fc2aaa.zip gdb-514e603dc095d50008d671e6d7bbe0e975fc2aaa.tar.gz gdb-514e603dc095d50008d671e6d7bbe0e975fc2aaa.tar.bz2 |
Obsolete NEWS and ISI systems (along with a few redundant m68k targets).
-rw-r--r-- | gdb/ChangeLog | 28 | ||||
-rw-r--r-- | gdb/Makefile.in | 10 | ||||
-rw-r--r-- | gdb/NEWS | 2 | ||||
-rw-r--r-- | gdb/TODO | 14 | ||||
-rw-r--r-- | gdb/config/m68k/isi.mh | 10 | ||||
-rw-r--r-- | gdb/config/m68k/isi.mt | 6 | ||||
-rw-r--r-- | gdb/config/m68k/news.mh | 10 | ||||
-rw-r--r-- | gdb/config/m68k/news.mt | 6 | ||||
-rw-r--r-- | gdb/config/m68k/news1000.mh | 6 | ||||
-rw-r--r-- | gdb/config/m68k/nm-news.h | 54 | ||||
-rw-r--r-- | gdb/config/m68k/tm-isi.h | 258 | ||||
-rw-r--r-- | gdb/config/m68k/tm-news.h | 138 | ||||
-rw-r--r-- | gdb/config/m68k/xm-isi.h | 186 | ||||
-rw-r--r-- | gdb/config/m68k/xm-news.h | 278 | ||||
-rw-r--r-- | gdb/config/m68k/xm-news1000.h | 54 | ||||
-rw-r--r-- | gdb/configure.host | 6 | ||||
-rw-r--r-- | gdb/configure.tgt | 12 | ||||
-rw-r--r-- | gdb/isi-xdep.c | 44 | ||||
-rw-r--r-- | gdb/m68k-tdep.c | 38 | ||||
-rw-r--r-- | gdb/news-xdep.c | 130 |
20 files changed, 661 insertions, 629 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 4240309..f95d737 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,31 @@ +2001-04-16 Andrew Cagney <ac131313@redhat.com> + + * configure.host (m68030-sony-*, m68*-isi-*, m68*-sony-*): + * configure.tgt (m68*-rom68k-*, m68*-*bug-*, m68*-monitor-*) + (m68*-est-*, m68*-sony-*, m68*-isi-*): + * Makefile.in (xm-news1000.h, tm-news.h, xm-news.h): Obsolete.. + * config/m68k/xm-news.h: Obsolete. + * config/m68k/tm-news.h: + * config/m68k/xm-news1000.h: Obsolete. + * config/m68k/news.mh: Obsolete. + * config/m68k/news.mt: Obsolete. + * config/m68k/nm-news.h: Obsolete. + * config/m68k/news1000.mh: Obsolete. + * news-xdep.c: Obsolete. + * Makefile.in (isi-xdep.o): Obsolete. + (ALLDEPFILES): Delete isi-xdep.c. + (tm-isi.h): Obsolete. + * m68k-tdep.c (altos_skip_prologue): Update comments. + (isi_skip_prologue): Obsolete. + * isi-xdep.c: Obsolete. + * config/m68k/xm-isi.h: Obsolete. + * config/m68k/isi.mh: Obsolete. + * config/m68k/tm-isi.h: Obsolete. + * config/m68k/isi.mt: Obsolete. + + * TODO: Update. + * NEWS: Update. + 2001-04-17 Michael Snyder <msnyder@redhat.com> * remote.c (remote_open_1): On opening the remote target, activate diff --git a/gdb/Makefile.in b/gdb/Makefile.in index 5853a5e..6874561 100644 --- a/gdb/Makefile.in +++ b/gdb/Makefile.in @@ -888,9 +888,11 @@ gdb1$(EXEEXT): gdb$(EXEEXT) # for some machines. # But these rules don't do what we want; we want to hack the foo.o: tm.h # dependency to do the right thing. -tm-isi.h tm-sun3.h tm-news.h tm-hp300bsd.h tm-altos.h: tm-m68k.h +tm-sun3.h tm-hp300bsd.h tm-altos.h: tm-m68k.h +# OBSOLETE tm-news.h: tm-m68k.h +# OBSOLETE tm-isi.h: tm-m68k.h tm-hp300hpux.h tm-sun2.h tm-3b1.h: tm-m68k.h -xm-news1000.h: xm-news.h +# OBSOLETE xm-news1000.h: xm-news.h xm-i386-sv32.h: xm-i386.h tm-i386gas.h: tm-i386.h xm-sun4os4.h: xm-sparc.h @@ -1142,7 +1144,7 @@ ALLDEPFILES = 29k-share/udi/udip2soc.c 29k-share/udi/udr.c \ i386-linux-tdep.c i386-nat.c \ i960-tdep.c \ ia64-linux-nat.c ia64-linux-tdep.c ia64-tdep.c \ - infptrace.c inftarg.c irix4-nat.c irix5-nat.c isi-xdep.c \ + infptrace.c inftarg.c irix4-nat.c irix5-nat.c \ lynx-nat.c m3-nat.c \ m68k-tdep.c \ m88k-nat.c m88k-tdep.c mac-nat.c \ @@ -1541,7 +1543,7 @@ irix5-nat.o: irix5-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) target.h \ $(symtab_h) symfile.h objfiles.h $(command_h) $(frame_h) gnu-regex.h \ language.h gdb_string.h $(regcache_h) -isi-xdep.o: isi-xdep.c +# OBSOLETE isi-xdep.o: isi-xdep.c jv-lang.o: jv-lang.c $(bfd_h) $(defs_h) $(symtab_h) $(gdbtypes_h) \ $(expression_h) parser-defs.h language.h symfile.h objfiles.h \ @@ -25,6 +25,8 @@ PowerPC Solaris powerpcle-*-solaris* PowerPC Windows NT powerpcle-*-cygwin32 PowerPC Netware powerpc-*-netware* SunOS 4.0.Xi on i386 i[3456]86-*-sunos* +Sony NEWS (68K) running NEWSOS 3.x m68*-sony-sysv news +ISI Optimum V (3.05) under 4.3bsd. m68*-isi-* stuff.c (Program to stuff files into a specially prepared space in kdb) kdb-start.c (Main loop for the standalone kernel debugger) @@ -186,13 +186,13 @@ Steps: ns32k-utek-sysv* ns32k merlin merlin yes ns32k-utek-* ns32k - umax yes tic80-* tic80 - tic80 yes - m68*-isi-* m68k isi isi - m68*-sony-* m68k news news - m68030-sony-* m68k news1000 - - m68*-rom68k-* m68k - (monitor) - m68*-*bug-* m68k - (monitor) - m68*-monitor-* m68k - (monitor) - m68*-est-* m68k - (monitor) + m68*-isi-* m68k isi isi yes + m68*-sony-* m68k news news yes + m68030-sony-* m68k news1000 - yes + m68*-rom68k-* m68k - (monitor) yes + m68*-*bug-* m68k - (monitor) yes + m68*-monitor-* m68k - (monitor) yes + m68*-est-* m68k - (monitor) yes a29k-*-* a29k ultra3 - yes a29k-*-sym1* a29k - ultra3 yes a29k-*-kern* a29k - a29k-kern yes diff --git a/gdb/config/m68k/isi.mh b/gdb/config/m68k/isi.mh index c406b4c..61b32c2 100644 --- a/gdb/config/m68k/isi.mh +++ b/gdb/config/m68k/isi.mh @@ -1,5 +1,5 @@ -# Host: ISI Optimum V (3.05) under 4.3bsd. -# corelow.o commented out because core dumps are broken on this machine, -# as of GDB 4.8, according to lam@tfs.com -XDEPFILES= infptrace.o inftarg.o fork-child.o core-aout.o isi-xdep.o -XM_FILE= xm-isi.h +# OBSOLETE # Host: ISI Optimum V (3.05) under 4.3bsd. +# OBSOLETE # corelow.o commented out because core dumps are broken on this machine, +# OBSOLETE # as of GDB 4.8, according to lam@tfs.com +# OBSOLETE XDEPFILES= infptrace.o inftarg.o fork-child.o core-aout.o isi-xdep.o +# OBSOLETE XM_FILE= xm-isi.h diff --git a/gdb/config/m68k/isi.mt b/gdb/config/m68k/isi.mt index 7c4cdee..716f6f1 100644 --- a/gdb/config/m68k/isi.mt +++ b/gdb/config/m68k/isi.mt @@ -1,3 +1,3 @@ -# Target: ISI Optimum V (3.05) under 4.3bsd. -TDEPFILES= -TM_FILE= tm-isi.h +# OBSOLETE # Target: ISI Optimum V (3.05) under 4.3bsd. +# OBSOLETE TDEPFILES= +# OBSOLETE TM_FILE= tm-isi.h diff --git a/gdb/config/m68k/news.mh b/gdb/config/m68k/news.mh index e94af18..360d987 100644 --- a/gdb/config/m68k/news.mh +++ b/gdb/config/m68k/news.mh @@ -1,5 +1,5 @@ -# Host: Sony news series 700/800/900 (68020) running NewsOS version 3. -XDEPFILES= news-xdep.o -XM_FILE= xm-news.h -NAT_FILE= nm-news.h -NATDEPFILES= inftarg.o fork-child.o corelow.o core-aout.o infptrace.o +# OBSOLETE # Host: Sony news series 700/800/900 (68020) running NewsOS version 3. +# OBSOLETE XDEPFILES= news-xdep.o +# OBSOLETE XM_FILE= xm-news.h +# OBSOLETE NAT_FILE= nm-news.h +# OBSOLETE NATDEPFILES= inftarg.o fork-child.o corelow.o core-aout.o infptrace.o diff --git a/gdb/config/m68k/news.mt b/gdb/config/m68k/news.mt index 42f2417..aa5744f 100644 --- a/gdb/config/m68k/news.mt +++ b/gdb/config/m68k/news.mt @@ -1,3 +1,3 @@ -# Target: Sony news series 700/800/900 (68020) running NewsOS version 3. -TDEPFILES= m68k-tdep.o -TM_FILE= tm-news.h +# OBSOLETE # Target: Sony news series 700/800/900 (68020) running NewsOS version 3. +# OBSOLETE TDEPFILES= m68k-tdep.o +# OBSOLETE TM_FILE= tm-news.h diff --git a/gdb/config/m68k/news1000.mh b/gdb/config/m68k/news1000.mh index b1bf0a5..329518c 100644 --- a/gdb/config/m68k/news1000.mh +++ b/gdb/config/m68k/news1000.mh @@ -1,3 +1,3 @@ -# Host: Sony news series 1000 (68030) running NewsOS version 3. -XDEPFILES= infptrace.o inftarg.o fork-child.o corelow.o core-aout.o news-xdep.o -XM_FILE= xm-news1000.h +# OBSOLETE # Host: Sony news series 1000 (68030) running NewsOS version 3. +# OBSOLETE XDEPFILES= infptrace.o inftarg.o fork-child.o corelow.o core-aout.o news-xdep.o +# OBSOLETE XM_FILE= xm-news1000.h diff --git a/gdb/config/m68k/nm-news.h b/gdb/config/m68k/nm-news.h index 3591ddb..1e24ffa 100644 --- a/gdb/config/m68k/nm-news.h +++ b/gdb/config/m68k/nm-news.h @@ -1,27 +1,27 @@ -/* Parameters for execution on a Sony/NEWS, for GDB, the GNU debugger. - Copyright 1987, 1989, 1992, 1996 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., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#ifndef NM_HEWS_H -#define NM_NEWS_H 1 - -/* Supply missing typedef needed in inftarg.c */ -typedef int pid_t; - -#endif /* NM_NEWS_H */ +/* OBSOLETE /* Parameters for execution on a Sony/NEWS, for GDB, the GNU debugger. */ +/* OBSOLETE Copyright 1987, 1989, 1992, 1996 Free Software Foundation, Inc. */ +/* OBSOLETE */ +/* OBSOLETE This file is part of GDB. */ +/* OBSOLETE */ +/* OBSOLETE This program is free software; you can redistribute it and/or modify */ +/* OBSOLETE it under the terms of the GNU General Public License as published by */ +/* OBSOLETE the Free Software Foundation; either version 2 of the License, or */ +/* OBSOLETE (at your option) any later version. */ +/* OBSOLETE */ +/* OBSOLETE This program is distributed in the hope that it will be useful, */ +/* OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of */ +/* OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ +/* OBSOLETE GNU General Public License for more details. */ +/* OBSOLETE */ +/* OBSOLETE You should have received a copy of the GNU General Public License */ +/* OBSOLETE along with this program; if not, write to the Free Software */ +/* OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330, */ +/* OBSOLETE Boston, MA 02111-1307, USA. */ */ +/* OBSOLETE */ +/* OBSOLETE #ifndef NM_HEWS_H */ +/* OBSOLETE #define NM_NEWS_H 1 */ +/* OBSOLETE */ +/* OBSOLETE /* Supply missing typedef needed in inftarg.c */ */ +/* OBSOLETE typedef int pid_t; */ +/* OBSOLETE */ +/* OBSOLETE #endif /* NM_NEWS_H */ */ diff --git a/gdb/config/m68k/tm-isi.h b/gdb/config/m68k/tm-isi.h index 6d1dec9..99aa185a2 100644 --- a/gdb/config/m68k/tm-isi.h +++ b/gdb/config/m68k/tm-isi.h @@ -1,129 +1,129 @@ -/* Definitions to target GDB on an ISI Optimum V (3.05) under 4.3bsd. - Copyright 1987, 1989, 1991, 1993, 1999, 2000 - 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., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -/* This has not been tested on ISI's running BSD 4.2, but it will probably - work. */ - -/* Data segment starts at etext rounded up to DATAROUND in {N,Z}MAGIC files */ - -#define DATAROUND 0x20000 -#define N_DATADDR(hdr) (hdr.a_magic != OMAGIC ? \ - (hdr.a_text + DATAROUND) & ~(DATAROUND-1) : hdr.a_text) - -/* Text segment starts at sizeof (struct exec) in {N,Z}MAGIC files */ - -#define N_TXTADDR(hdr) (hdr.a_magic != OMAGIC ? sizeof (struct exec) : 0) - -/* Amount PC must be decremented by after a breakpoint. - This is often the number of bytes in BREAKPOINT - but not always. - On the ISI, the kernel resets the pc to the trap instr */ - -#define DECR_PC_AFTER_BREAK 0 - - -/* Return number of args passed to a frame. - Can return -1, meaning no way to tell. */ - -extern int isi_frame_num_args (struct frame_info *fi); -#define FRAME_NUM_ARGS(fi) (isi_frame_num_args ((fi))) - -/* Put here the code to store, into a struct frame_saved_regs, - the addresses of the saved registers of frame described by FRAME_INFO. - This includes special registers such as pc and fp saved in special - ways in the stack frame. sp is even more special: - the address we return for it IS the sp for the next frame. */ - -#define FRAME_FIND_SAVED_REGS(frame_info, frame_saved_regs) \ -{ register int regnum; \ - register int regmask; \ - register CORE_ADDR next_addr; \ - register CORE_ADDR pc; \ - register int insn; \ - register int offset; \ - memset (&frame_saved_regs, '\0', sizeof frame_saved_regs); \ - if ((frame_info)->pc >= (frame_info)->frame - CALL_DUMMY_LENGTH - FP_REGNUM*4 - 8*12 - 4 \ - && (frame_info)->pc <= (frame_info)->frame) \ - { next_addr = (frame_info)->frame; \ - pc = (frame_info)->frame - CALL_DUMMY_LENGTH - FP_REGNUM * 4 - 8*12 - 4; }\ - else \ - { pc = get_pc_function_start ((frame_info)->pc); \ - /* Verify we have a link a6 instruction next, \ - or a branch followed by a link a6 instruction; \ - if not we lose. If we win, find the address above the saved \ - regs using the amount of storage from the link instruction. */\ -retry: \ - insn = read_memory_integer (pc, 2); \ - if (insn == 044016) \ - next_addr = (frame_info)->frame - read_memory_integer (pc += 2, 4), pc+=4; \ - else if (insn == 047126) \ - next_addr = (frame_info)->frame - read_memory_integer (pc += 2, 2), pc+=2; \ - else if ((insn & 0177400) == 060000) /* bra insn */ \ - { offset = insn & 0377; \ - pc += 2; /* advance past bra */ \ - if (offset == 0) /* bra #word */ \ - offset = read_memory_integer (pc, 2), pc += 2; \ - else if (offset == 0377) /* bra #long */ \ - offset = read_memory_integer (pc, 4), pc += 4; \ - pc += offset; \ - goto retry; \ - } else goto lose; \ - /* If have an addal #-n, sp next, adjust next_addr. */ \ - if ((0177777 & read_memory_integer (pc, 2)) == 0157774) \ - next_addr += read_memory_integer (pc += 2, 4), pc += 4; \ - } \ - /* next should be a moveml to (sp) or -(sp) or a movl r,-(sp) */ \ - insn = read_memory_integer (pc, 2), pc += 2; \ - regmask = read_memory_integer (pc, 2); \ - if ((insn & 0177760) == 022700) /* movl rn, (sp) */ \ - (frame_saved_regs).regs[(insn&7) + ((insn&010)?8:0)] = next_addr; \ - else if ((insn & 0177760) == 024700) /* movl rn, -(sp) */ \ - (frame_saved_regs).regs[(insn&7) + ((insn&010)?8:0)] = next_addr-=4; \ - else if (insn == 0044327) /* moveml mask, (sp) */ \ - { pc += 2; \ - /* Regmask's low bit is for register 0, the first written */ \ - next_addr -= 4; \ - for (regnum = 0; regnum < 16; regnum++, regmask >>= 1) \ - if (regmask & 1) \ - (frame_saved_regs).regs[regnum] = (next_addr += 4); \ - } else if (insn == 0044347) /* moveml mask, -(sp) */ \ - { pc += 2; \ - /* Regmask's low bit is for register 15, the first pushed */ \ - for (regnum = 15; regnum >= 0; regnum--, regmask >>= 1) \ - if (regmask & 1) \ - (frame_saved_regs).regs[regnum] = (next_addr -= 4); } \ - /* clrw -(sp); movw ccr,-(sp) may follow. */ \ - if (read_memory_integer (pc, 2) == 041147 \ - && read_memory_integer (pc+2, 2) == 042347) \ - (frame_saved_regs).regs[PS_REGNUM] = (next_addr -= 4); \ - lose: ; \ - (frame_saved_regs).regs[SP_REGNUM] = (frame_info)->frame + 8; \ - (frame_saved_regs).regs[FP_REGNUM] = (frame_info)->frame; \ - (frame_saved_regs).regs[PC_REGNUM] = (frame_info)->frame + 4; \ -} - -/* The only reason this is here is the tm-isi.h reference below. It - was moved back here from tm-m68k.h. FIXME? */ - -extern CORE_ADDR isi_skip_prologue (CORE_ADDR); -#define SKIP_PROLOGUE(pc) (isi_skip_prologue (pc)) - -#include "m68k/tm-m68k.h" +/* OBSOLETE /* Definitions to target GDB on an ISI Optimum V (3.05) under 4.3bsd. */ +/* OBSOLETE Copyright 1987, 1989, 1991, 1993, 1999, 2000 */ +/* OBSOLETE Free Software Foundation, Inc. */ +/* OBSOLETE */ +/* OBSOLETE This file is part of GDB. */ +/* OBSOLETE */ +/* OBSOLETE This program is free software; you can redistribute it and/or modify */ +/* OBSOLETE it under the terms of the GNU General Public License as published by */ +/* OBSOLETE the Free Software Foundation; either version 2 of the License, or */ +/* OBSOLETE (at your option) any later version. */ +/* OBSOLETE */ +/* OBSOLETE This program is distributed in the hope that it will be useful, */ +/* OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of */ +/* OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ +/* OBSOLETE GNU General Public License for more details. */ +/* OBSOLETE */ +/* OBSOLETE You should have received a copy of the GNU General Public License */ +/* OBSOLETE along with this program; if not, write to the Free Software */ +/* OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330, */ +/* OBSOLETE Boston, MA 02111-1307, USA. */ */ +/* OBSOLETE */ +/* OBSOLETE /* This has not been tested on ISI's running BSD 4.2, but it will probably */ +/* OBSOLETE work. */ */ +/* OBSOLETE */ +/* OBSOLETE /* Data segment starts at etext rounded up to DATAROUND in {N,Z}MAGIC files */ */ +/* OBSOLETE */ +/* OBSOLETE #define DATAROUND 0x20000 */ +/* OBSOLETE #define N_DATADDR(hdr) (hdr.a_magic != OMAGIC ? \ */ +/* OBSOLETE (hdr.a_text + DATAROUND) & ~(DATAROUND-1) : hdr.a_text) */ +/* OBSOLETE */ +/* OBSOLETE /* Text segment starts at sizeof (struct exec) in {N,Z}MAGIC files */ */ +/* OBSOLETE */ +/* OBSOLETE #define N_TXTADDR(hdr) (hdr.a_magic != OMAGIC ? sizeof (struct exec) : 0) */ +/* OBSOLETE */ +/* OBSOLETE /* Amount PC must be decremented by after a breakpoint. */ +/* OBSOLETE This is often the number of bytes in BREAKPOINT */ +/* OBSOLETE but not always. */ +/* OBSOLETE On the ISI, the kernel resets the pc to the trap instr */ */ +/* OBSOLETE */ +/* OBSOLETE #define DECR_PC_AFTER_BREAK 0 */ +/* OBSOLETE */ +/* OBSOLETE */ +/* OBSOLETE /* Return number of args passed to a frame. */ +/* OBSOLETE Can return -1, meaning no way to tell. */ */ +/* OBSOLETE */ +/* OBSOLETE extern int isi_frame_num_args (struct frame_info *fi); */ +/* OBSOLETE #define FRAME_NUM_ARGS(fi) (isi_frame_num_args ((fi))) */ +/* OBSOLETE */ +/* OBSOLETE /* Put here the code to store, into a struct frame_saved_regs, */ +/* OBSOLETE the addresses of the saved registers of frame described by FRAME_INFO. */ +/* OBSOLETE This includes special registers such as pc and fp saved in special */ +/* OBSOLETE ways in the stack frame. sp is even more special: */ +/* OBSOLETE the address we return for it IS the sp for the next frame. */ */ +/* OBSOLETE */ +/* OBSOLETE #define FRAME_FIND_SAVED_REGS(frame_info, frame_saved_regs) \ */ +/* OBSOLETE { register int regnum; \ */ +/* OBSOLETE register int regmask; \ */ +/* OBSOLETE register CORE_ADDR next_addr; \ */ +/* OBSOLETE register CORE_ADDR pc; \ */ +/* OBSOLETE register int insn; \ */ +/* OBSOLETE register int offset; \ */ +/* OBSOLETE memset (&frame_saved_regs, '\0', sizeof frame_saved_regs); \ */ +/* OBSOLETE if ((frame_info)->pc >= (frame_info)->frame - CALL_DUMMY_LENGTH - FP_REGNUM*4 - 8*12 - 4 \ */ +/* OBSOLETE && (frame_info)->pc <= (frame_info)->frame) \ */ +/* OBSOLETE { next_addr = (frame_info)->frame; \ */ +/* OBSOLETE pc = (frame_info)->frame - CALL_DUMMY_LENGTH - FP_REGNUM * 4 - 8*12 - 4; }\ */ +/* OBSOLETE else \ */ +/* OBSOLETE { pc = get_pc_function_start ((frame_info)->pc); \ */ +/* OBSOLETE /* Verify we have a link a6 instruction next, \ */ +/* OBSOLETE or a branch followed by a link a6 instruction; \ */ +/* OBSOLETE if not we lose. If we win, find the address above the saved \ */ +/* OBSOLETE regs using the amount of storage from the link instruction. */\ */ +/* OBSOLETE retry: \ */ +/* OBSOLETE insn = read_memory_integer (pc, 2); \ */ +/* OBSOLETE if (insn == 044016) \ */ +/* OBSOLETE next_addr = (frame_info)->frame - read_memory_integer (pc += 2, 4), pc+=4; \ */ +/* OBSOLETE else if (insn == 047126) \ */ +/* OBSOLETE next_addr = (frame_info)->frame - read_memory_integer (pc += 2, 2), pc+=2; \ */ +/* OBSOLETE else if ((insn & 0177400) == 060000) /* bra insn */ \ */ +/* OBSOLETE { offset = insn & 0377; \ */ +/* OBSOLETE pc += 2; /* advance past bra */ \ */ +/* OBSOLETE if (offset == 0) /* bra #word */ \ */ +/* OBSOLETE offset = read_memory_integer (pc, 2), pc += 2; \ */ +/* OBSOLETE else if (offset == 0377) /* bra #long */ \ */ +/* OBSOLETE offset = read_memory_integer (pc, 4), pc += 4; \ */ +/* OBSOLETE pc += offset; \ */ +/* OBSOLETE goto retry; \ */ +/* OBSOLETE } else goto lose; \ */ +/* OBSOLETE /* If have an addal #-n, sp next, adjust next_addr. */ \ */ +/* OBSOLETE if ((0177777 & read_memory_integer (pc, 2)) == 0157774) \ */ +/* OBSOLETE next_addr += read_memory_integer (pc += 2, 4), pc += 4; \ */ +/* OBSOLETE } \ */ +/* OBSOLETE /* next should be a moveml to (sp) or -(sp) or a movl r,-(sp) */ \ */ +/* OBSOLETE insn = read_memory_integer (pc, 2), pc += 2; \ */ +/* OBSOLETE regmask = read_memory_integer (pc, 2); \ */ +/* OBSOLETE if ((insn & 0177760) == 022700) /* movl rn, (sp) */ \ */ +/* OBSOLETE (frame_saved_regs).regs[(insn&7) + ((insn&010)?8:0)] = next_addr; \ */ +/* OBSOLETE else if ((insn & 0177760) == 024700) /* movl rn, -(sp) */ \ */ +/* OBSOLETE (frame_saved_regs).regs[(insn&7) + ((insn&010)?8:0)] = next_addr-=4; \ */ +/* OBSOLETE else if (insn == 0044327) /* moveml mask, (sp) */ \ */ +/* OBSOLETE { pc += 2; \ */ +/* OBSOLETE /* Regmask's low bit is for register 0, the first written */ \ */ +/* OBSOLETE next_addr -= 4; \ */ +/* OBSOLETE for (regnum = 0; regnum < 16; regnum++, regmask >>= 1) \ */ +/* OBSOLETE if (regmask & 1) \ */ +/* OBSOLETE (frame_saved_regs).regs[regnum] = (next_addr += 4); \ */ +/* OBSOLETE } else if (insn == 0044347) /* moveml mask, -(sp) */ \ */ +/* OBSOLETE { pc += 2; \ */ +/* OBSOLETE /* Regmask's low bit is for register 15, the first pushed */ \ */ +/* OBSOLETE for (regnum = 15; regnum >= 0; regnum--, regmask >>= 1) \ */ +/* OBSOLETE if (regmask & 1) \ */ +/* OBSOLETE (frame_saved_regs).regs[regnum] = (next_addr -= 4); } \ */ +/* OBSOLETE /* clrw -(sp); movw ccr,-(sp) may follow. */ \ */ +/* OBSOLETE if (read_memory_integer (pc, 2) == 041147 \ */ +/* OBSOLETE && read_memory_integer (pc+2, 2) == 042347) \ */ +/* OBSOLETE (frame_saved_regs).regs[PS_REGNUM] = (next_addr -= 4); \ */ +/* OBSOLETE lose: ; \ */ +/* OBSOLETE (frame_saved_regs).regs[SP_REGNUM] = (frame_info)->frame + 8; \ */ +/* OBSOLETE (frame_saved_regs).regs[FP_REGNUM] = (frame_info)->frame; \ */ +/* OBSOLETE (frame_saved_regs).regs[PC_REGNUM] = (frame_info)->frame + 4; \ */ +/* OBSOLETE } */ +/* OBSOLETE */ +/* OBSOLETE /* The only reason this is here is the tm-isi.h reference below. It */ +/* OBSOLETE was moved back here from tm-m68k.h. FIXME? */ */ +/* OBSOLETE */ +/* OBSOLETE extern CORE_ADDR isi_skip_prologue (CORE_ADDR); */ +/* OBSOLETE #define SKIP_PROLOGUE(pc) (isi_skip_prologue (pc)) */ +/* OBSOLETE */ +/* OBSOLETE #include "m68k/tm-m68k.h" */ diff --git a/gdb/config/m68k/tm-news.h b/gdb/config/m68k/tm-news.h index 37424f0..c76b28a 100644 --- a/gdb/config/m68k/tm-news.h +++ b/gdb/config/m68k/tm-news.h @@ -1,69 +1,69 @@ -/* Parameters for execution on a Sony/NEWS, for GDB, the GNU debugger. - Copyright 1987, 1989, 1991, 1993, 1999, 2000 - 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., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#include "regcache.h" - -/* See following cpu type determination macro to get the machine type. - - Here is an m-news.h file for gdb. It supports the 68881 registers. - by hikichi@srava.sra.junet - - * Ptrace for handling floating register has a bug(before NEWS OS version 2.2), - * After NEWS OS version 3.2, some of ptrace's bug is fixed. - But we cannot change the floating register(see adb(1) in OS 3.2) yet. */ - -/* Extract from an array REGBUF containing the (raw) register state - a function return value of type TYPE, and copy that, in virtual format, - into VALBUF. */ - -/* when it return the floating value, use the FP0 in NEWS. */ -#define EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \ - { if (TYPE_CODE (TYPE) == TYPE_CODE_FLT) \ - { \ - REGISTER_CONVERT_TO_VIRTUAL (FP0_REGNUM, TYPE, \ - ®BUF[REGISTER_BYTE (FP0_REGNUM)], \ - VALBUF); \ - } \ - else \ - memcpy (VALBUF, REGBUF, TYPE_LENGTH (TYPE)); } - -/* Write into appropriate registers a function return value - of type TYPE, given in virtual format. */ - -/* when it return the floating value, use the FP0 in NEWS. */ -#define STORE_RETURN_VALUE(TYPE,VALBUF) \ - { if (TYPE_CODE (TYPE) == TYPE_CODE_FLT) \ - { \ - char raw_buf[REGISTER_RAW_SIZE (FP0_REGNUM)]; \ - REGISTER_CONVERT_TO_RAW (TYPE, FP0_REGNUM, VALBUF, raw_buf); \ - write_register_bytes (REGISTER_BYTE (FP0_REGNUM), \ - raw_buf, REGISTER_RAW_SIZE (FP0_REGNUM)); \ - } \ - else \ - write_register_bytes (0, VALBUF, TYPE_LENGTH (TYPE)); } - -/* Return number of args passed to a frame. - Can return -1, meaning no way to tell. */ - -extern int news_frame_num_args (struct frame_info *fi); -#define FRAME_NUM_ARGS(fi) (news_frame_num_args ((fi))) - -#include "m68k/tm-m68k.h" +/* OBSOLETE /* Parameters for execution on a Sony/NEWS, for GDB, the GNU debugger. */ +/* OBSOLETE Copyright 1987, 1989, 1991, 1993, 1999, 2000 */ +/* OBSOLETE Free Software Foundation, Inc. */ +/* OBSOLETE */ +/* OBSOLETE This file is part of GDB. */ +/* OBSOLETE */ +/* OBSOLETE This program is free software; you can redistribute it and/or modify */ +/* OBSOLETE it under the terms of the GNU General Public License as published by */ +/* OBSOLETE the Free Software Foundation; either version 2 of the License, or */ +/* OBSOLETE (at your option) any later version. */ +/* OBSOLETE */ +/* OBSOLETE This program is distributed in the hope that it will be useful, */ +/* OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of */ +/* OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ +/* OBSOLETE GNU General Public License for more details. */ +/* OBSOLETE */ +/* OBSOLETE You should have received a copy of the GNU General Public License */ +/* OBSOLETE along with this program; if not, write to the Free Software */ +/* OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330, */ +/* OBSOLETE Boston, MA 02111-1307, USA. */ */ +/* OBSOLETE */ +/* OBSOLETE #include "regcache.h" */ +/* OBSOLETE */ +/* OBSOLETE /* See following cpu type determination macro to get the machine type. */ +/* OBSOLETE */ +/* OBSOLETE Here is an m-news.h file for gdb. It supports the 68881 registers. */ +/* OBSOLETE by hikichi@srava.sra.junet */ +/* OBSOLETE */ +/* OBSOLETE * Ptrace for handling floating register has a bug(before NEWS OS version 2.2), */ +/* OBSOLETE * After NEWS OS version 3.2, some of ptrace's bug is fixed. */ +/* OBSOLETE But we cannot change the floating register(see adb(1) in OS 3.2) yet. */ */ +/* OBSOLETE */ +/* OBSOLETE /* Extract from an array REGBUF containing the (raw) register state */ +/* OBSOLETE a function return value of type TYPE, and copy that, in virtual format, */ +/* OBSOLETE into VALBUF. */ */ +/* OBSOLETE */ +/* OBSOLETE /* when it return the floating value, use the FP0 in NEWS. */ */ +/* OBSOLETE #define EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \ */ +/* OBSOLETE { if (TYPE_CODE (TYPE) == TYPE_CODE_FLT) \ */ +/* OBSOLETE { \ */ +/* OBSOLETE REGISTER_CONVERT_TO_VIRTUAL (FP0_REGNUM, TYPE, \ */ +/* OBSOLETE ®BUF[REGISTER_BYTE (FP0_REGNUM)], \ */ +/* OBSOLETE VALBUF); \ */ +/* OBSOLETE } \ */ +/* OBSOLETE else \ */ +/* OBSOLETE memcpy (VALBUF, REGBUF, TYPE_LENGTH (TYPE)); } */ +/* OBSOLETE */ +/* OBSOLETE /* Write into appropriate registers a function return value */ +/* OBSOLETE of type TYPE, given in virtual format. */ */ +/* OBSOLETE */ +/* OBSOLETE /* when it return the floating value, use the FP0 in NEWS. */ */ +/* OBSOLETE #define STORE_RETURN_VALUE(TYPE,VALBUF) \ */ +/* OBSOLETE { if (TYPE_CODE (TYPE) == TYPE_CODE_FLT) \ */ +/* OBSOLETE { \ */ +/* OBSOLETE char raw_buf[REGISTER_RAW_SIZE (FP0_REGNUM)]; \ */ +/* OBSOLETE REGISTER_CONVERT_TO_RAW (TYPE, FP0_REGNUM, VALBUF, raw_buf); \ */ +/* OBSOLETE write_register_bytes (REGISTER_BYTE (FP0_REGNUM), \ */ +/* OBSOLETE raw_buf, REGISTER_RAW_SIZE (FP0_REGNUM)); \ */ +/* OBSOLETE } \ */ +/* OBSOLETE else \ */ +/* OBSOLETE write_register_bytes (0, VALBUF, TYPE_LENGTH (TYPE)); } */ +/* OBSOLETE */ +/* OBSOLETE /* Return number of args passed to a frame. */ +/* OBSOLETE Can return -1, meaning no way to tell. */ */ +/* OBSOLETE */ +/* OBSOLETE extern int news_frame_num_args (struct frame_info *fi); */ +/* OBSOLETE #define FRAME_NUM_ARGS(fi) (news_frame_num_args ((fi))) */ +/* OBSOLETE */ +/* OBSOLETE #include "m68k/tm-m68k.h" */ diff --git a/gdb/config/m68k/xm-isi.h b/gdb/config/m68k/xm-isi.h index d21d243..3b43195 100644 --- a/gdb/config/m68k/xm-isi.h +++ b/gdb/config/m68k/xm-isi.h @@ -1,93 +1,93 @@ -/* Definitions to make GDB run on an ISI Optimum V (3.05) under 4.3bsd. - Copyright 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., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#define HOST_BYTE_ORDER BIG_ENDIAN - -/* This has not been tested on ISI's running BSD 4.2, but it will probably - work. */ - -/* This is the amount to subtract from u.u_ar0 - to get the offset in the core file of the register values. */ - -/*#define KERNEL_U_ADDR 0x10800000 */ -#define KERNEL_U_ADDR 0 - -/* expects blockend to be u.u_ar0 */ -extern int rloc[]; /* Defined in isi-dep.c */ -#define REGISTER_U_ADDR(addr, blockend, regno) \ -{ blockend &= UPAGES*NBPG - 1; \ - if (regno < 18) addr = (int)blockend + rloc[regno]*4; \ - else if (regno < 26) addr = (int) &((struct user *)0)->u_68881_regs \ - + (regno - 18) * 12; \ - else if (regno < 29) addr = (int) &((struct user *)0)->u_68881_regs \ - + 8 * 12 + (regno - 26) * 4; \ -} - -/* Interface definitions for kernel debugger KDB. */ - -/* Map machine fault codes into signal numbers. - First subtract 0, divide by 4, then index in a table. - Faults for which the entry in this table is 0 - are not handled by KDB; the program's own trap handler - gets to handle then. */ - -#define FAULT_CODE_ORIGIN 0 -#define FAULT_CODE_UNITS 4 -#define FAULT_TABLE \ -{ 0, 0, 0, 0, SIGTRAP, 0, 0, 0, \ - 0, SIGTRAP, 0, 0, 0, 0, 0, SIGKILL, \ - 0, 0, 0, 0, 0, 0, 0, 0, \ - SIGILL } - -/* Start running with a stack stretching from BEG to END. - BEG and END should be symbols meaningful to the assembler. - This is used only for kdb. */ - -#define INIT_STACK(beg, end) \ -{ asm (".globl end"); \ - asm ("movl $ end, sp"); \ - asm ("clrl fp"); } - -/* Push the frame pointer register on the stack. */ -#define PUSH_FRAME_PTR \ - asm ("movel fp, -(sp)"); - -/* Copy the top-of-stack to the frame pointer register. */ -#define POP_FRAME_PTR \ - asm ("movl (sp), fp"); - -/* After KDB is entered by a fault, push all registers - that GDB thinks about (all NUM_REGS of them), - so that they appear in order of ascending GDB register number. - The fault code will be on the stack beyond the last register. */ - -#define PUSH_REGISTERS \ -{ asm ("clrw -(sp)"); \ - asm ("pea 10(sp)"); \ - asm ("movem $ 0xfffe,-(sp)"); } - -/* Assuming the registers (including processor status) have been - pushed on the stack in order of ascending GDB register number, - restore them and return to the address in the saved PC register. */ - -#define POP_REGISTERS \ -{ asm ("subil $8,28(sp)"); \ - asm ("movem (sp),$ 0xffff"); \ - asm ("rte"); } +/* OBSOLETE /* Definitions to make GDB run on an ISI Optimum V (3.05) under 4.3bsd. */ +/* OBSOLETE Copyright 1987, 1989, 1992 Free Software Foundation, Inc. */ +/* OBSOLETE */ +/* OBSOLETE This file is part of GDB. */ +/* OBSOLETE */ +/* OBSOLETE This program is free software; you can redistribute it and/or modify */ +/* OBSOLETE it under the terms of the GNU General Public License as published by */ +/* OBSOLETE the Free Software Foundation; either version 2 of the License, or */ +/* OBSOLETE (at your option) any later version. */ +/* OBSOLETE */ +/* OBSOLETE This program is distributed in the hope that it will be useful, */ +/* OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of */ +/* OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ +/* OBSOLETE GNU General Public License for more details. */ +/* OBSOLETE */ +/* OBSOLETE You should have received a copy of the GNU General Public License */ +/* OBSOLETE along with this program; if not, write to the Free Software */ +/* OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330, */ +/* OBSOLETE Boston, MA 02111-1307, USA. */ */ +/* OBSOLETE */ +/* OBSOLETE #define HOST_BYTE_ORDER BIG_ENDIAN */ +/* OBSOLETE */ +/* OBSOLETE /* This has not been tested on ISI's running BSD 4.2, but it will probably */ +/* OBSOLETE work. */ */ +/* OBSOLETE */ +/* OBSOLETE /* This is the amount to subtract from u.u_ar0 */ +/* OBSOLETE to get the offset in the core file of the register values. */ */ +/* OBSOLETE */ +/* OBSOLETE /*#define KERNEL_U_ADDR 0x10800000 */ */ +/* OBSOLETE #define KERNEL_U_ADDR 0 */ +/* OBSOLETE */ +/* OBSOLETE /* expects blockend to be u.u_ar0 */ */ +/* OBSOLETE extern int rloc[]; /* Defined in isi-dep.c */ */ +/* OBSOLETE #define REGISTER_U_ADDR(addr, blockend, regno) \ */ +/* OBSOLETE { blockend &= UPAGES*NBPG - 1; \ */ +/* OBSOLETE if (regno < 18) addr = (int)blockend + rloc[regno]*4; \ */ +/* OBSOLETE else if (regno < 26) addr = (int) &((struct user *)0)->u_68881_regs \ */ +/* OBSOLETE + (regno - 18) * 12; \ */ +/* OBSOLETE else if (regno < 29) addr = (int) &((struct user *)0)->u_68881_regs \ */ +/* OBSOLETE + 8 * 12 + (regno - 26) * 4; \ */ +/* OBSOLETE } */ +/* OBSOLETE */ +/* OBSOLETE /* Interface definitions for kernel debugger KDB. */ */ +/* OBSOLETE */ +/* OBSOLETE /* Map machine fault codes into signal numbers. */ +/* OBSOLETE First subtract 0, divide by 4, then index in a table. */ +/* OBSOLETE Faults for which the entry in this table is 0 */ +/* OBSOLETE are not handled by KDB; the program's own trap handler */ +/* OBSOLETE gets to handle then. */ */ +/* OBSOLETE */ +/* OBSOLETE #define FAULT_CODE_ORIGIN 0 */ +/* OBSOLETE #define FAULT_CODE_UNITS 4 */ +/* OBSOLETE #define FAULT_TABLE \ */ +/* OBSOLETE { 0, 0, 0, 0, SIGTRAP, 0, 0, 0, \ */ +/* OBSOLETE 0, SIGTRAP, 0, 0, 0, 0, 0, SIGKILL, \ */ +/* OBSOLETE 0, 0, 0, 0, 0, 0, 0, 0, \ */ +/* OBSOLETE SIGILL } */ +/* OBSOLETE */ +/* OBSOLETE /* Start running with a stack stretching from BEG to END. */ +/* OBSOLETE BEG and END should be symbols meaningful to the assembler. */ +/* OBSOLETE This is used only for kdb. */ */ +/* OBSOLETE */ +/* OBSOLETE #define INIT_STACK(beg, end) \ */ +/* OBSOLETE { asm (".globl end"); \ */ +/* OBSOLETE asm ("movl $ end, sp"); \ */ +/* OBSOLETE asm ("clrl fp"); } */ +/* OBSOLETE */ +/* OBSOLETE /* Push the frame pointer register on the stack. */ */ +/* OBSOLETE #define PUSH_FRAME_PTR \ */ +/* OBSOLETE asm ("movel fp, -(sp)"); */ +/* OBSOLETE */ +/* OBSOLETE /* Copy the top-of-stack to the frame pointer register. */ */ +/* OBSOLETE #define POP_FRAME_PTR \ */ +/* OBSOLETE asm ("movl (sp), fp"); */ +/* OBSOLETE */ +/* OBSOLETE /* After KDB is entered by a fault, push all registers */ +/* OBSOLETE that GDB thinks about (all NUM_REGS of them), */ +/* OBSOLETE so that they appear in order of ascending GDB register number. */ +/* OBSOLETE The fault code will be on the stack beyond the last register. */ */ +/* OBSOLETE */ +/* OBSOLETE #define PUSH_REGISTERS \ */ +/* OBSOLETE { asm ("clrw -(sp)"); \ */ +/* OBSOLETE asm ("pea 10(sp)"); \ */ +/* OBSOLETE asm ("movem $ 0xfffe,-(sp)"); } */ +/* OBSOLETE */ +/* OBSOLETE /* Assuming the registers (including processor status) have been */ +/* OBSOLETE pushed on the stack in order of ascending GDB register number, */ +/* OBSOLETE restore them and return to the address in the saved PC register. */ */ +/* OBSOLETE */ +/* OBSOLETE #define POP_REGISTERS \ */ +/* OBSOLETE { asm ("subil $8,28(sp)"); \ */ +/* OBSOLETE asm ("movem (sp),$ 0xffff"); \ */ +/* OBSOLETE asm ("rte"); } */ diff --git a/gdb/config/m68k/xm-news.h b/gdb/config/m68k/xm-news.h index 089f887..f3e0e09 100644 --- a/gdb/config/m68k/xm-news.h +++ b/gdb/config/m68k/xm-news.h @@ -1,139 +1,139 @@ -/* Parameters for execution on a Sony/NEWS, for GDB, the GNU debugger. - Copyright 1987, 1989, 1992, 1993, 1994, 1996 - 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., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#define HOST_BYTE_ORDER BIG_ENDIAN - -#include <sys/param.h> /* For INT_MIN */ - -#define HAVE_WAIT_STRUCT - -/* We can't use "isatty" or "fileno" on this machine. This isn't good, - but it will have to do. */ -#define ISATTY(FP) ((FP) == stdin || (FP) == stdout) - -/* THis is the amount to subtract from u.u_ar0 - to get the offset in the core file of the register values. */ - -#define KERNEL_U_ADDR UADDR - -/* The offsets in this macro are from /usr/include/machine/reg.h */ - -#define REGISTER_U_ADDR(addr, blockend, regno) \ -{ static char offsets[] = { \ - /*d0-d7:*/1,2,3,4,5,6,7,8, \ - /*a0-a6:*/9,10,11,12,13,14,15, /*sp:*/-4, /*ps:*/0, /*pc:*/-1, \ - /*fp0-fp7:*/19,22,25,28,31,34,37,40, /*fpc:*/16,17,18 }; \ - addr = blockend + 4 * offsets[regno]; \ -} - -/* NewsOS 3.3 does not define errno in <errno.h>. */ -extern int errno; - -/* Interface definitions for kernel debugger KDB. */ - -/* Use GNU assembler instead of standard assembler */ -#define USE_GAS - -/* Motorola assembly format */ -#ifndef USE_GAS -#define MOTOROLA -#endif - -/* Map machine fault codes into signal numbers. - First subtract 0, divide by 4, then index in a table. - Faults for which the entry in this table is 0 - are not handled by KDB; the program's own trap handler - gets to handle then. */ - -#define FAULT_CODE_ORIGIN 0 -#define FAULT_CODE_UNITS 4 -#define FAULT_TABLE \ -{ 0, 0, 0, 0, SIGTRAP, 0, 0, 0, \ - 0, SIGTRAP, 0, 0, 0, 0, 0, SIGKILL, \ - 0, 0, 0, 0, 0, 0, 0, 0, \ - SIGILL } - -/* Start running with a stack stretching from BEG to END. - BEG and END should be symbols meaningful to the assembler. - This is used only for kdb. */ - -#ifdef MOTOROLA -#define INIT_STACK(beg, end) \ -{ asm (".globl end"); \ - asm ("move.l $ end, sp"); \ - asm ("clr.l fp"); } -#else -#define INIT_STACK(beg, end) \ -{ asm (".globl end"); \ - asm ("movel $ end, sp"); \ - asm ("clrl fp"); } -#endif - -/* Push the frame pointer register on the stack. */ -#ifdef MOTOROLA -#define PUSH_FRAME_PTR \ - asm ("move.l fp, -(sp)"); -#else -#define PUSH_FRAME_PTR \ - asm ("movel fp, -(sp)"); -#endif - -/* Copy the top-of-stack to the frame pointer register. */ -#ifdef MOTOROLA -#define POP_FRAME_PTR \ - asm ("move.l (sp), fp"); -#else -#define POP_FRAME_PTR \ - asm ("movl (sp), fp"); -#endif - -/* After KDB is entered by a fault, push all registers - that GDB thinks about (all NUM_REGS of them), - so that they appear in order of ascending GDB register number. - The fault code will be on the stack beyond the last register. */ - -#ifdef MOTOROLA -#define PUSH_REGISTERS \ -{ asm ("clr.w -(sp)"); \ - asm ("pea (10,sp)"); \ - asm ("movem $ 0xfffe,-(sp)"); } -#else -#define PUSH_REGISTERS \ -{ asm ("clrw -(sp)"); \ - asm ("pea 10(sp)"); \ - asm ("movem $ 0xfffe,-(sp)"); } -#endif - -/* Assuming the registers (including processor status) have been - pushed on the stack in order of ascending GDB register number, - restore them and return to the address in the saved PC register. */ - -#ifdef MOTOROLA -#define POP_REGISTERS \ -{ asm ("subi.l $8,28(sp)"); \ - asm ("movem (sp),$ 0xffff"); \ - asm ("rte"); } -#else -#define POP_REGISTERS \ -{ asm ("subil $8,28(sp)"); \ - asm ("movem (sp),$ 0xffff"); \ - asm ("rte"); } -#endif +/* OBSOLETE /* Parameters for execution on a Sony/NEWS, for GDB, the GNU debugger. */ +/* OBSOLETE Copyright 1987, 1989, 1992, 1993, 1994, 1996 */ +/* OBSOLETE Free Software Foundation, Inc. */ +/* OBSOLETE */ +/* OBSOLETE This file is part of GDB. */ +/* OBSOLETE */ +/* OBSOLETE This program is free software; you can redistribute it and/or modify */ +/* OBSOLETE it under the terms of the GNU General Public License as published by */ +/* OBSOLETE the Free Software Foundation; either version 2 of the License, or */ +/* OBSOLETE (at your option) any later version. */ +/* OBSOLETE */ +/* OBSOLETE This program is distributed in the hope that it will be useful, */ +/* OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of */ +/* OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ +/* OBSOLETE GNU General Public License for more details. */ +/* OBSOLETE */ +/* OBSOLETE You should have received a copy of the GNU General Public License */ +/* OBSOLETE along with this program; if not, write to the Free Software */ +/* OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330, */ +/* OBSOLETE Boston, MA 02111-1307, USA. */ */ +/* OBSOLETE */ +/* OBSOLETE #define HOST_BYTE_ORDER BIG_ENDIAN */ +/* OBSOLETE */ +/* OBSOLETE #include <sys/param.h> /* For INT_MIN */ */ +/* OBSOLETE */ +/* OBSOLETE #define HAVE_WAIT_STRUCT */ +/* OBSOLETE */ +/* OBSOLETE /* We can't use "isatty" or "fileno" on this machine. This isn't good, */ +/* OBSOLETE but it will have to do. */ */ +/* OBSOLETE #define ISATTY(FP) ((FP) == stdin || (FP) == stdout) */ +/* OBSOLETE */ +/* OBSOLETE /* THis is the amount to subtract from u.u_ar0 */ +/* OBSOLETE to get the offset in the core file of the register values. */ */ +/* OBSOLETE */ +/* OBSOLETE #define KERNEL_U_ADDR UADDR */ +/* OBSOLETE */ +/* OBSOLETE /* The offsets in this macro are from /usr/include/machine/reg.h */ */ +/* OBSOLETE */ +/* OBSOLETE #define REGISTER_U_ADDR(addr, blockend, regno) \ */ +/* OBSOLETE { static char offsets[] = { \ */ +/* OBSOLETE /*d0-d7:*/1,2,3,4,5,6,7,8, \ */ +/* OBSOLETE /*a0-a6:*/9,10,11,12,13,14,15, /*sp:*/-4, /*ps:*/0, /*pc:*/-1, \ */ +/* OBSOLETE /*fp0-fp7:*/19,22,25,28,31,34,37,40, /*fpc:*/16,17,18 }; \ */ +/* OBSOLETE addr = blockend + 4 * offsets[regno]; \ */ +/* OBSOLETE } */ +/* OBSOLETE */ +/* OBSOLETE /* NewsOS 3.3 does not define errno in <errno.h>. */ */ +/* OBSOLETE extern int errno; */ +/* OBSOLETE */ +/* OBSOLETE /* Interface definitions for kernel debugger KDB. */ */ +/* OBSOLETE */ +/* OBSOLETE /* Use GNU assembler instead of standard assembler */ */ +/* OBSOLETE #define USE_GAS */ +/* OBSOLETE */ +/* OBSOLETE /* Motorola assembly format */ */ +/* OBSOLETE #ifndef USE_GAS */ +/* OBSOLETE #define MOTOROLA */ +/* OBSOLETE #endif */ +/* OBSOLETE */ +/* OBSOLETE /* Map machine fault codes into signal numbers. */ +/* OBSOLETE First subtract 0, divide by 4, then index in a table. */ +/* OBSOLETE Faults for which the entry in this table is 0 */ +/* OBSOLETE are not handled by KDB; the program's own trap handler */ +/* OBSOLETE gets to handle then. */ */ +/* OBSOLETE */ +/* OBSOLETE #define FAULT_CODE_ORIGIN 0 */ +/* OBSOLETE #define FAULT_CODE_UNITS 4 */ +/* OBSOLETE #define FAULT_TABLE \ */ +/* OBSOLETE { 0, 0, 0, 0, SIGTRAP, 0, 0, 0, \ */ +/* OBSOLETE 0, SIGTRAP, 0, 0, 0, 0, 0, SIGKILL, \ */ +/* OBSOLETE 0, 0, 0, 0, 0, 0, 0, 0, \ */ +/* OBSOLETE SIGILL } */ +/* OBSOLETE */ +/* OBSOLETE /* Start running with a stack stretching from BEG to END. */ +/* OBSOLETE BEG and END should be symbols meaningful to the assembler. */ +/* OBSOLETE This is used only for kdb. */ */ +/* OBSOLETE */ +/* OBSOLETE #ifdef MOTOROLA */ +/* OBSOLETE #define INIT_STACK(beg, end) \ */ +/* OBSOLETE { asm (".globl end"); \ */ +/* OBSOLETE asm ("move.l $ end, sp"); \ */ +/* OBSOLETE asm ("clr.l fp"); } */ +/* OBSOLETE #else */ +/* OBSOLETE #define INIT_STACK(beg, end) \ */ +/* OBSOLETE { asm (".globl end"); \ */ +/* OBSOLETE asm ("movel $ end, sp"); \ */ +/* OBSOLETE asm ("clrl fp"); } */ +/* OBSOLETE #endif */ +/* OBSOLETE */ +/* OBSOLETE /* Push the frame pointer register on the stack. */ */ +/* OBSOLETE #ifdef MOTOROLA */ +/* OBSOLETE #define PUSH_FRAME_PTR \ */ +/* OBSOLETE asm ("move.l fp, -(sp)"); */ +/* OBSOLETE #else */ +/* OBSOLETE #define PUSH_FRAME_PTR \ */ +/* OBSOLETE asm ("movel fp, -(sp)"); */ +/* OBSOLETE #endif */ +/* OBSOLETE */ +/* OBSOLETE /* Copy the top-of-stack to the frame pointer register. */ */ +/* OBSOLETE #ifdef MOTOROLA */ +/* OBSOLETE #define POP_FRAME_PTR \ */ +/* OBSOLETE asm ("move.l (sp), fp"); */ +/* OBSOLETE #else */ +/* OBSOLETE #define POP_FRAME_PTR \ */ +/* OBSOLETE asm ("movl (sp), fp"); */ +/* OBSOLETE #endif */ +/* OBSOLETE */ +/* OBSOLETE /* After KDB is entered by a fault, push all registers */ +/* OBSOLETE that GDB thinks about (all NUM_REGS of them), */ +/* OBSOLETE so that they appear in order of ascending GDB register number. */ +/* OBSOLETE The fault code will be on the stack beyond the last register. */ */ +/* OBSOLETE */ +/* OBSOLETE #ifdef MOTOROLA */ +/* OBSOLETE #define PUSH_REGISTERS \ */ +/* OBSOLETE { asm ("clr.w -(sp)"); \ */ +/* OBSOLETE asm ("pea (10,sp)"); \ */ +/* OBSOLETE asm ("movem $ 0xfffe,-(sp)"); } */ +/* OBSOLETE #else */ +/* OBSOLETE #define PUSH_REGISTERS \ */ +/* OBSOLETE { asm ("clrw -(sp)"); \ */ +/* OBSOLETE asm ("pea 10(sp)"); \ */ +/* OBSOLETE asm ("movem $ 0xfffe,-(sp)"); } */ +/* OBSOLETE #endif */ +/* OBSOLETE */ +/* OBSOLETE /* Assuming the registers (including processor status) have been */ +/* OBSOLETE pushed on the stack in order of ascending GDB register number, */ +/* OBSOLETE restore them and return to the address in the saved PC register. */ */ +/* OBSOLETE */ +/* OBSOLETE #ifdef MOTOROLA */ +/* OBSOLETE #define POP_REGISTERS \ */ +/* OBSOLETE { asm ("subi.l $8,28(sp)"); \ */ +/* OBSOLETE asm ("movem (sp),$ 0xffff"); \ */ +/* OBSOLETE asm ("rte"); } */ +/* OBSOLETE #else */ +/* OBSOLETE #define POP_REGISTERS \ */ +/* OBSOLETE { asm ("subil $8,28(sp)"); \ */ +/* OBSOLETE asm ("movem (sp),$ 0xffff"); \ */ +/* OBSOLETE asm ("rte"); } */ +/* OBSOLETE #endif */ diff --git a/gdb/config/m68k/xm-news1000.h b/gdb/config/m68k/xm-news1000.h index 56fee6e..10a9003 100644 --- a/gdb/config/m68k/xm-news1000.h +++ b/gdb/config/m68k/xm-news1000.h @@ -1,27 +1,27 @@ -/* Parameters for a Sony/NEWS series 1000 with News-OS version 3, - for GDB, the GNU debugger. - Copyright (C) 1990 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., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -/* This is required by Sony include files like <sys/user.h> so we - get the right offset into the u area. Relying on the compiler - to define this only works for cc, not gcc. */ -#undef mc68030 -#define mc68030 -#include "m68k/xm-news.h" +/* OBSOLETE /* Parameters for a Sony/NEWS series 1000 with News-OS version 3, */ +/* OBSOLETE for GDB, the GNU debugger. */ +/* OBSOLETE Copyright (C) 1990 Free Software Foundation, Inc. */ +/* OBSOLETE */ +/* OBSOLETE This file is part of GDB. */ +/* OBSOLETE */ +/* OBSOLETE This program is free software; you can redistribute it and/or modify */ +/* OBSOLETE it under the terms of the GNU General Public License as published by */ +/* OBSOLETE the Free Software Foundation; either version 2 of the License, or */ +/* OBSOLETE (at your option) any later version. */ +/* OBSOLETE */ +/* OBSOLETE This program is distributed in the hope that it will be useful, */ +/* OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of */ +/* OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ +/* OBSOLETE GNU General Public License for more details. */ +/* OBSOLETE */ +/* OBSOLETE You should have received a copy of the GNU General Public License */ +/* OBSOLETE along with this program; if not, write to the Free Software */ +/* OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330, */ +/* OBSOLETE Boston, MA 02111-1307, USA. */ */ +/* OBSOLETE */ +/* OBSOLETE /* This is required by Sony include files like <sys/user.h> so we */ +/* OBSOLETE get the right offset into the u area. Relying on the compiler */ +/* OBSOLETE to define this only works for cc, not gcc. */ */ +/* OBSOLETE #undef mc68030 */ +/* OBSOLETE #define mc68030 */ +/* OBSOLETE #include "m68k/xm-news.h" */ diff --git a/gdb/configure.host b/gdb/configure.host index fcdd3d9..600a7ee 100644 --- a/gdb/configure.host +++ b/gdb/configure.host @@ -85,7 +85,7 @@ ia64-*-linux*) gdb_host=linux ;; m680[01]0-sun-sunos3*) gdb_host=sun2os3 ;; m680[01]0-sun-sunos4*) gdb_host=sun2os4 ;; -m68030-sony-*) gdb_host=news1000 ;; +# OBSOLETE m68030-sony-*) gdb_host=news1000 ;; m68*-apollo*-sysv*) gdb_host=apollo68v ;; m68*-apollo*-bsd*) gdb_host=apollo68b ;; @@ -93,13 +93,13 @@ m68*-att-*) gdb_host=3b1 ;; m68*-bull*-sysv*) gdb_host=dpx2 ;; m68*-hp-bsd*) gdb_host=hp300bsd ;; m68*-hp-hpux*) gdb_host=hp300hpux ;; -m68*-isi-*) gdb_host=isi ;; +# OBSOLETE m68*-isi-*) gdb_host=isi ;; m68*-*-linux*) gdb_host=linux ;; m68*-*-lynxos*) gdb_host=m68klynx ;; m68*-*-netbsd*) gdb_host=nbsd ;; m68*-*-sysv4*) gdb_host=m68kv4 ;; m68*-motorola-*) gdb_host=delta68 ;; -m68*-sony-*) gdb_host=news ;; +# OBSOLETE m68*-sony-*) gdb_host=news ;; m68*-sun-sunos3*) gdb_host=sun3os3 ;; m68*-sun-sunos4*) gdb_host=sun3os4 ;; m68*-sun-*) gdb_host=sun3os4 ;; diff --git a/gdb/configure.tgt b/gdb/configure.tgt index 121c19b..23f4069 100644 --- a/gdb/configure.tgt +++ b/gdb/configure.tgt @@ -149,15 +149,15 @@ m68*-hp-hpux*) gdb_target=hp300hpux ;; m68*-att-*) gdb_target=3b1 ;; m68*-cisco*-*) gdb_target=cisco ;; m68*-ericsson-*) gdb_target=es1800 ;; -m68*-isi-*) gdb_target=isi ;; +# OBSOLETE m68*-isi-*) gdb_target=isi ;; m68*-motorola-*) gdb_target=delta68 ;; m68*-netx-*) gdb_target=vxworks68 ;; -m68*-sony-*) gdb_target=news ;; +# OBSOLETE m68*-sony-*) gdb_target=news ;; m68*-tandem-*) gdb_target=st2000 ;; -m68*-rom68k-*) gdb_target=monitor ;; -m68*-*bug-*) gdb_target=monitor ;; -m68*-monitor-*) gdb_target=monitor ;; -m68*-est-*) gdb_target=monitor ;; +# OBSOLETE m68*-rom68k-*) gdb_target=monitor ;; +# OBSOLETE m68*-*bug-*) gdb_target=monitor ;; +# OBSOLETE m68*-monitor-*) gdb_target=monitor ;; +# OBSOLETE m68*-est-*) gdb_target=monitor ;; m68*-*-aout*) gdb_target=monitor ;; m68*-*-coff*) gdb_target=monitor ;; m68*-*-elf*) gdb_target=monitor ;; diff --git a/gdb/isi-xdep.c b/gdb/isi-xdep.c index a1b29cd..325d6e7 100644 --- a/gdb/isi-xdep.c +++ b/gdb/isi-xdep.c @@ -1,22 +1,22 @@ -/* Copyright 1993 Free Software Foundation, Inc. - - 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., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#include <machine/reg.h> -int rloc[] = -{ - R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, FP, SP, PS, PC -}; +/* OBSOLETE /* Copyright 1993 Free Software Foundation, Inc. */ +/* OBSOLETE */ +/* OBSOLETE This program is free software; you can redistribute it and/or modify */ +/* OBSOLETE it under the terms of the GNU General Public License as published by */ +/* OBSOLETE the Free Software Foundation; either version 2 of the License, or */ +/* OBSOLETE (at your option) any later version. */ +/* OBSOLETE */ +/* OBSOLETE This program is distributed in the hope that it will be useful, */ +/* OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of */ +/* OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ +/* OBSOLETE GNU General Public License for more details. */ +/* OBSOLETE */ +/* OBSOLETE You should have received a copy of the GNU General Public License */ +/* OBSOLETE along with this program; if not, write to the Free Software */ +/* OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330, */ +/* OBSOLETE Boston, MA 02111-1307, USA. */ */ +/* OBSOLETE */ +/* OBSOLETE #include <machine/reg.h> */ +/* OBSOLETE int rloc[] = */ +/* OBSOLETE { */ +/* OBSOLETE R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, FP, SP, PS, PC */ +/* OBSOLETE }; */ diff --git a/gdb/m68k-tdep.c b/gdb/m68k-tdep.c index d9dc171..5fbda6d 100644 --- a/gdb/m68k-tdep.c +++ b/gdb/m68k-tdep.c @@ -53,7 +53,7 @@ altos_skip_prologue (CORE_ADDR pc) else if (op == P_LINKL_FP) pc += 6; /* Skip link #long */ /* Not sure why branches are here. */ - /* From tm-isi.h, tm-altos.h */ + /* From tm-altos.h */ else if (op == 0060000) pc += 4; /* Skip bra #word */ else if (op == 00600377) @@ -66,24 +66,24 @@ altos_skip_prologue (CORE_ADDR pc) /* The only reason this is here is the tm-isi.h reference below. It was moved back here from tm-m68k.h. FIXME? */ -extern CORE_ADDR -isi_skip_prologue (CORE_ADDR pc) -{ - register int op = read_memory_integer (pc, 2); - if (op == P_LINKW_FP) - pc += 4; /* Skip link #word */ - else if (op == P_LINKL_FP) - pc += 6; /* Skip link #long */ - /* Not sure why branches are here. */ - /* From tm-isi.h, tm-altos.h */ - else if (op == 0060000) - pc += 4; /* Skip bra #word */ - else if (op == 00600377) - pc += 6; /* skip bra #long */ - else if ((op & 0177400) == 0060000) - pc += 2; /* skip bra #char */ - return pc; -} +/* OBSOLETE extern CORE_ADDR */ +/* OBSOLETE isi_skip_prologue (CORE_ADDR pc) */ +/* OBSOLETE { */ +/* OBSOLETE register int op = read_memory_integer (pc, 2); */ +/* OBSOLETE if (op == P_LINKW_FP) */ +/* OBSOLETE pc += 4; *//* Skip link #word */ +/* OBSOLETE else if (op == P_LINKL_FP) */ +/* OBSOLETE pc += 6; *//* Skip link #long */ +/* OBSOLETE *//* Not sure why branches are here. */ +/* OBSOLETE *//* From tm-isi.h, tm-altos.h */ +/* OBSOLETE else if (op == 0060000) */ +/* OBSOLETE pc += 4; *//* Skip bra #word */ +/* OBSOLETE else if (op == 00600377) */ +/* OBSOLETE pc += 6; *//* skip bra #long */ +/* OBSOLETE else if ((op & 0177400) == 0060000) */ +/* OBSOLETE pc += 2; *//* skip bra #char */ +/* OBSOLETE return pc; */ +/* OBSOLETE } */ int delta68_in_sigtramp (CORE_ADDR pc, char *name) diff --git a/gdb/news-xdep.c b/gdb/news-xdep.c index 162126a..529271d 100644 --- a/gdb/news-xdep.c +++ b/gdb/news-xdep.c @@ -1,65 +1,65 @@ -/* Low level interface to ptrace, for GDB when running under Unix. - Copyright 1986, 1987, 1989, 2000 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., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#ifdef __GNUC__ -/* Bad implement execle(3). It's depend for "/bin/cc". - - main() - { - printf("execle:\n"); - execle(FILE, ARGS, envp); - exit(1); - } - - GCC: - link a6,#0 - pea LC5 ; call printf - jbsr _printf - ; ; (not popd stack) - pea _envp ; call execle - clrl sp@- - pea LC4 - pea LC4 - pea LC4 - pea LC3 - pea LC6 - jbsr _execle - addw #32,sp ; delayed pop !! - - /bin/cc: - link.l fp,#L23 - movem.l #L24,(sp) - pea L26 ; call printf - jbsr _printf - addq.l #4,sp ; <--- popd stack !! - pea _envp ; call execle - clr.l -(sp) - pea L32 - - */ - -execle (char *name, char *args) -{ - register char **env = &args; - while (*env++) - ; - execve (name, (char **) &args, (char **) *env); -} -#endif +/* OBSOLETE /* Low level interface to ptrace, for GDB when running under Unix. */ +/* OBSOLETE Copyright 1986, 1987, 1989, 2000 Free Software Foundation, Inc. */ +/* OBSOLETE */ +/* OBSOLETE This file is part of GDB. */ +/* OBSOLETE */ +/* OBSOLETE This program is free software; you can redistribute it and/or modify */ +/* OBSOLETE it under the terms of the GNU General Public License as published by */ +/* OBSOLETE the Free Software Foundation; either version 2 of the License, or */ +/* OBSOLETE (at your option) any later version. */ +/* OBSOLETE */ +/* OBSOLETE This program is distributed in the hope that it will be useful, */ +/* OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of */ +/* OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ +/* OBSOLETE GNU General Public License for more details. */ +/* OBSOLETE */ +/* OBSOLETE You should have received a copy of the GNU General Public License */ +/* OBSOLETE along with this program; if not, write to the Free Software */ +/* OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330, */ +/* OBSOLETE Boston, MA 02111-1307, USA. */ */ +/* OBSOLETE */ +/* OBSOLETE #ifdef __GNUC__ */ +/* OBSOLETE /* Bad implement execle(3). It's depend for "/bin/cc". */ +/* OBSOLETE */ +/* OBSOLETE main() */ +/* OBSOLETE { */ +/* OBSOLETE printf("execle:\n"); */ +/* OBSOLETE execle(FILE, ARGS, envp); */ +/* OBSOLETE exit(1); */ +/* OBSOLETE } */ +/* OBSOLETE */ +/* OBSOLETE GCC: */ +/* OBSOLETE link a6,#0 */ +/* OBSOLETE pea LC5 ; call printf */ +/* OBSOLETE jbsr _printf */ +/* OBSOLETE ; ; (not popd stack) */ +/* OBSOLETE pea _envp ; call execle */ +/* OBSOLETE clrl sp@- */ +/* OBSOLETE pea LC4 */ +/* OBSOLETE pea LC4 */ +/* OBSOLETE pea LC4 */ +/* OBSOLETE pea LC3 */ +/* OBSOLETE pea LC6 */ +/* OBSOLETE jbsr _execle */ +/* OBSOLETE addw #32,sp ; delayed pop !! */ +/* OBSOLETE */ +/* OBSOLETE /bin/cc: */ +/* OBSOLETE link.l fp,#L23 */ +/* OBSOLETE movem.l #L24,(sp) */ +/* OBSOLETE pea L26 ; call printf */ +/* OBSOLETE jbsr _printf */ +/* OBSOLETE addq.l #4,sp ; <--- popd stack !! */ +/* OBSOLETE pea _envp ; call execle */ +/* OBSOLETE clr.l -(sp) */ +/* OBSOLETE pea L32 */ +/* OBSOLETE */ +/* OBSOLETE */ */ +/* OBSOLETE */ +/* OBSOLETE execle (char *name, char *args) */ +/* OBSOLETE { */ +/* OBSOLETE register char **env = &args; */ +/* OBSOLETE while (*env++) */ +/* OBSOLETE ; */ +/* OBSOLETE execve (name, (char **) &args, (char **) *env); */ +/* OBSOLETE } */ +/* OBSOLETE #endif */ |