2002-12-16 Andrew Cagney <ac131313@redhat.com>

* config/arc/arc.mt, config/arc/tm-arc.h: Delete.
	* config/d30v/d30v.mt, config/d30v/tm-d30v.h: Delete.
	* config/fr30/fr30.mt, config/fr30/tm-fr30.h: Delete.
	* config/i386/i386aix.mh, config/i386/i386aix.mt: Delete.
	* config/i386/i386m3.mh, config/i386/i386m3.mt: Delete.
	* config/i386/i386mach.mh, config/i386/i386os9k.mt: Delete.
	* config/i386/nm-i386aix.h, config/i386/nm-i386mach.h: Delete.
	* config/i386/nm-m3.h, config/i386/tm-i386aix.h: Delete.
	* config/i386/tm-i386m3.h, config/i386/tm-i386mk.h: Delete.
	* config/i386/xm-i386aix.h, config/i386/xm-i386m3.h: Delete.
	* config/i386/xm-i386mach.h, config/i386/xm-i386mk.h: Delete.
	* config/i960/mon960.mt, config/i960/nindy960.mt: Delete.
	* config/i960/tm-i960.h, config/i960/tm-mon960.h: Delete.
	* config/i960/tm-nindy960.h, config/i960/tm-vx960.h: Delete.
	* config/i960/vxworks960.mt, config/m68k/apollo68b.mh: Delete.
	* config/m68k/apollo68b.mt, config/m68k/apollo68v.mh: Delete.
	* config/m68k/hp300bsd.mh, config/m68k/hp300bsd.mt: Delete.
	* config/m68k/hp300hpux.mh, config/m68k/hp300hpux.mt: Delete.
	* config/m88k/delta88.mh, config/m88k/delta88.mt: Delete.
	* config/m88k/delta88v4.mh, config/m88k/delta88v4.mt: Delete.
	* config/m88k/m88k.mh, config/m88k/m88k.mt: Delete.
	* config/m88k/nm-delta88v4.h, config/m88k/nm-m88k.h: Delete.
	* config/m88k/tm-delta88.h, config/m88k/tm-delta88v4.h: Delete.
	* config/m88k/tm-m88k.h, config/m88k/xm-delta88.h: Delete.
	* config/m88k/xm-dgux.h: Delete.
	* fr30-tdep.c, i386aix-nat.c, i386m3-nat.c: Delete.
	* i386mach-nat.c, i960-tdep.c, m88k-nat.c: Delete.
	* os9kread.c, remote-bug.c, remote-nindy.c: Delete.
	* remote-nrom.c, remote-os9k.c, remote-vx960.c: Delete.
	* d30v-tdep.c, arc-tdep.c, cxux-nat.c, dst.h, dstread.c: Delete.
	* ch-exp.c, ch-lang.c, ch-lang.h, ch-typeprint.c: Delete.
	* ch-valprint.c: Delete.
This commit is contained in:
Andrew Cagney 2002-12-16 20:39:23 +00:00
parent da81390ba6
commit 1a14e23479
73 changed files with 35 additions and 21275 deletions

View file

@ -1,3 +1,38 @@
2002-12-16 Andrew Cagney <ac131313@redhat.com>
* config/arc/arc.mt, config/arc/tm-arc.h: Delete.
* config/d30v/d30v.mt, config/d30v/tm-d30v.h: Delete.
* config/fr30/fr30.mt, config/fr30/tm-fr30.h: Delete.
* config/i386/i386aix.mh, config/i386/i386aix.mt: Delete.
* config/i386/i386m3.mh, config/i386/i386m3.mt: Delete.
* config/i386/i386mach.mh, config/i386/i386os9k.mt: Delete.
* config/i386/nm-i386aix.h, config/i386/nm-i386mach.h: Delete.
* config/i386/nm-m3.h, config/i386/tm-i386aix.h: Delete.
* config/i386/tm-i386m3.h, config/i386/tm-i386mk.h: Delete.
* config/i386/xm-i386aix.h, config/i386/xm-i386m3.h: Delete.
* config/i386/xm-i386mach.h, config/i386/xm-i386mk.h: Delete.
* config/i960/mon960.mt, config/i960/nindy960.mt: Delete.
* config/i960/tm-i960.h, config/i960/tm-mon960.h: Delete.
* config/i960/tm-nindy960.h, config/i960/tm-vx960.h: Delete.
* config/i960/vxworks960.mt, config/m68k/apollo68b.mh: Delete.
* config/m68k/apollo68b.mt, config/m68k/apollo68v.mh: Delete.
* config/m68k/hp300bsd.mh, config/m68k/hp300bsd.mt: Delete.
* config/m68k/hp300hpux.mh, config/m68k/hp300hpux.mt: Delete.
* config/m88k/delta88.mh, config/m88k/delta88.mt: Delete.
* config/m88k/delta88v4.mh, config/m88k/delta88v4.mt: Delete.
* config/m88k/m88k.mh, config/m88k/m88k.mt: Delete.
* config/m88k/nm-delta88v4.h, config/m88k/nm-m88k.h: Delete.
* config/m88k/tm-delta88.h, config/m88k/tm-delta88v4.h: Delete.
* config/m88k/tm-m88k.h, config/m88k/xm-delta88.h: Delete.
* config/m88k/xm-dgux.h: Delete.
* fr30-tdep.c, i386aix-nat.c, i386m3-nat.c: Delete.
* i386mach-nat.c, i960-tdep.c, m88k-nat.c: Delete.
* os9kread.c, remote-bug.c, remote-nindy.c: Delete.
* remote-nrom.c, remote-os9k.c, remote-vx960.c: Delete.
* d30v-tdep.c, arc-tdep.c, cxux-nat.c, dst.h, dstread.c: Delete.
* ch-exp.c, ch-lang.c, ch-lang.h, ch-typeprint.c: Delete.
* ch-valprint.c: Delete.
2002-12-15 Daniel Jacobowitz <drow@mvista.com>
* infrun.c (handle_inferior_event): Rearrange code to resume if

View file

@ -1,738 +0,0 @@
// OBSOLETE /* ARC target-dependent stuff.
// OBSOLETE Copyright 1995, 1996, 1999, 2000, 2001 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 "defs.h"
// OBSOLETE #include "frame.h"
// OBSOLETE #include "inferior.h"
// OBSOLETE #include "gdbcore.h"
// OBSOLETE #include "target.h"
// OBSOLETE #include "floatformat.h"
// OBSOLETE #include "symtab.h"
// OBSOLETE #include "gdbcmd.h"
// OBSOLETE #include "regcache.h"
// OBSOLETE #include "gdb_string.h"
// OBSOLETE
// OBSOLETE /* Local functions */
// OBSOLETE
// OBSOLETE static int arc_set_cpu_type (char *str);
// OBSOLETE
// OBSOLETE /* Current CPU, set with the "set cpu" command. */
// OBSOLETE static int arc_bfd_mach_type;
// OBSOLETE char *arc_cpu_type;
// OBSOLETE char *tmp_arc_cpu_type;
// OBSOLETE
// OBSOLETE /* Table of cpu names. */
// OBSOLETE struct
// OBSOLETE {
// OBSOLETE char *name;
// OBSOLETE int value;
// OBSOLETE }
// OBSOLETE arc_cpu_type_table[] =
// OBSOLETE {
// OBSOLETE { "arc5", bfd_mach_arc_5 },
// OBSOLETE { "arc6", bfd_mach_arc_6 },
// OBSOLETE { "arc7", bfd_mach_arc_7 },
// OBSOLETE { "arc8", bfd_mach_arc_8 },
// OBSOLETE { NULL, 0 }
// OBSOLETE };
// OBSOLETE
// OBSOLETE /* Used by simulator. */
// OBSOLETE int display_pipeline_p;
// OBSOLETE int cpu_timer;
// OBSOLETE /* This one must have the same type as used in the emulator.
// OBSOLETE It's currently an enum so this should be ok for now. */
// OBSOLETE int debug_pipeline_p;
// OBSOLETE
// OBSOLETE #define ARC_CALL_SAVED_REG(r) ((r) >= 16 && (r) < 24)
// OBSOLETE
// OBSOLETE #define OPMASK 0xf8000000
// OBSOLETE
// OBSOLETE /* Instruction field accessor macros.
// OBSOLETE See the Programmer's Reference Manual. */
// OBSOLETE #define X_OP(i) (((i) >> 27) & 0x1f)
// OBSOLETE #define X_A(i) (((i) >> 21) & 0x3f)
// OBSOLETE #define X_B(i) (((i) >> 15) & 0x3f)
// OBSOLETE #define X_C(i) (((i) >> 9) & 0x3f)
// OBSOLETE #define X_D(i) ((((i) & 0x1ff) ^ 0x100) - 0x100)
// OBSOLETE #define X_L(i) (((((i) >> 5) & 0x3ffffc) ^ 0x200000) - 0x200000)
// OBSOLETE #define X_N(i) (((i) >> 5) & 3)
// OBSOLETE #define X_Q(i) ((i) & 0x1f)
// OBSOLETE
// OBSOLETE /* Return non-zero if X is a short immediate data indicator. */
// OBSOLETE #define SHIMM_P(x) ((x) == 61 || (x) == 63)
// OBSOLETE
// OBSOLETE /* Return non-zero if X is a "long" (32 bit) immediate data indicator. */
// OBSOLETE #define LIMM_P(x) ((x) == 62)
// OBSOLETE
// OBSOLETE /* Build a simple instruction. */
// OBSOLETE #define BUILD_INSN(op, a, b, c, d) \
// OBSOLETE ((((op) & 31) << 27) \
// OBSOLETE | (((a) & 63) << 21) \
// OBSOLETE | (((b) & 63) << 15) \
// OBSOLETE | (((c) & 63) << 9) \
// OBSOLETE | ((d) & 511))
// OBSOLETE
// OBSOLETE /* Codestream stuff. */
// OBSOLETE static void codestream_read (unsigned int *, int);
// OBSOLETE static void codestream_seek (CORE_ADDR);
// OBSOLETE static unsigned int codestream_fill (int);
// OBSOLETE
// OBSOLETE #define CODESTREAM_BUFSIZ 16
// OBSOLETE static CORE_ADDR codestream_next_addr;
// OBSOLETE static CORE_ADDR codestream_addr;
// OBSOLETE /* FIXME assumes sizeof (int) == 32? */
// OBSOLETE static unsigned int codestream_buf[CODESTREAM_BUFSIZ];
// OBSOLETE static int codestream_off;
// OBSOLETE static int codestream_cnt;
// OBSOLETE
// OBSOLETE #define codestream_tell() \
// OBSOLETE (codestream_addr + codestream_off * sizeof (codestream_buf[0]))
// OBSOLETE #define codestream_peek() \
// OBSOLETE (codestream_cnt == 0 \
// OBSOLETE ? codestream_fill (1) \
// OBSOLETE : codestream_buf[codestream_off])
// OBSOLETE #define codestream_get() \
// OBSOLETE (codestream_cnt-- == 0 \
// OBSOLETE ? codestream_fill (0) \
// OBSOLETE : codestream_buf[codestream_off++])
// OBSOLETE
// OBSOLETE static unsigned int
// OBSOLETE codestream_fill (int peek_flag)
// OBSOLETE {
// OBSOLETE codestream_addr = codestream_next_addr;
// OBSOLETE codestream_next_addr += CODESTREAM_BUFSIZ * sizeof (codestream_buf[0]);
// OBSOLETE codestream_off = 0;
// OBSOLETE codestream_cnt = CODESTREAM_BUFSIZ;
// OBSOLETE read_memory (codestream_addr, (char *) codestream_buf,
// OBSOLETE CODESTREAM_BUFSIZ * sizeof (codestream_buf[0]));
// OBSOLETE /* FIXME: check return code? */
// OBSOLETE
// OBSOLETE
// OBSOLETE /* Handle byte order differences -> convert to host byte ordering. */
// OBSOLETE {
// OBSOLETE int i;
// OBSOLETE for (i = 0; i < CODESTREAM_BUFSIZ; i++)
// OBSOLETE codestream_buf[i] =
// OBSOLETE extract_unsigned_integer (&codestream_buf[i],
// OBSOLETE sizeof (codestream_buf[i]));
// OBSOLETE }
// OBSOLETE
// OBSOLETE if (peek_flag)
// OBSOLETE return codestream_peek ();
// OBSOLETE else
// OBSOLETE return codestream_get ();
// OBSOLETE }
// OBSOLETE
// OBSOLETE static void
// OBSOLETE codestream_seek (CORE_ADDR place)
// OBSOLETE {
// OBSOLETE codestream_next_addr = place / CODESTREAM_BUFSIZ;
// OBSOLETE codestream_next_addr *= CODESTREAM_BUFSIZ;
// OBSOLETE codestream_cnt = 0;
// OBSOLETE codestream_fill (1);
// OBSOLETE while (codestream_tell () != place)
// OBSOLETE codestream_get ();
// OBSOLETE }
// OBSOLETE
// OBSOLETE /* This function is currently unused but leave in for now. */
// OBSOLETE
// OBSOLETE static void
// OBSOLETE codestream_read (unsigned int *buf, int count)
// OBSOLETE {
// OBSOLETE unsigned int *p;
// OBSOLETE int i;
// OBSOLETE p = buf;
// OBSOLETE for (i = 0; i < count; i++)
// OBSOLETE *p++ = codestream_get ();
// OBSOLETE }
// OBSOLETE
// OBSOLETE /* Set up prologue scanning and return the first insn. */
// OBSOLETE
// OBSOLETE static unsigned int
// OBSOLETE setup_prologue_scan (CORE_ADDR pc)
// OBSOLETE {
// OBSOLETE unsigned int insn;
// OBSOLETE
// OBSOLETE codestream_seek (pc);
// OBSOLETE insn = codestream_get ();
// OBSOLETE
// OBSOLETE return insn;
// OBSOLETE }
// OBSOLETE
// OBSOLETE /*
// OBSOLETE * Find & return amount a local space allocated, and advance codestream to
// OBSOLETE * first register push (if any).
// OBSOLETE * If entry sequence doesn't make sense, return -1, and leave
// OBSOLETE * codestream pointer random.
// OBSOLETE */
// OBSOLETE
// OBSOLETE static long
// OBSOLETE arc_get_frame_setup (CORE_ADDR pc)
// OBSOLETE {
// OBSOLETE unsigned int insn;
// OBSOLETE /* Size of frame or -1 if unrecognizable prologue. */
// OBSOLETE int frame_size = -1;
// OBSOLETE /* An initial "sub sp,sp,N" may or may not be for a stdarg fn. */
// OBSOLETE int maybe_stdarg_decr = -1;
// OBSOLETE
// OBSOLETE insn = setup_prologue_scan (pc);
// OBSOLETE
// OBSOLETE /* The authority for what appears here is the home-grown ABI.
// OBSOLETE The most recent version is 1.2. */
// OBSOLETE
// OBSOLETE /* First insn may be "sub sp,sp,N" if stdarg fn. */
// OBSOLETE if ((insn & BUILD_INSN (-1, -1, -1, -1, 0))
// OBSOLETE == BUILD_INSN (10, SP_REGNUM, SP_REGNUM, SHIMM_REGNUM, 0))
// OBSOLETE {
// OBSOLETE maybe_stdarg_decr = X_D (insn);
// OBSOLETE insn = codestream_get ();
// OBSOLETE }
// OBSOLETE
// OBSOLETE if ((insn & BUILD_INSN (-1, 0, -1, -1, -1)) /* st blink,[sp,4] */
// OBSOLETE == BUILD_INSN (2, 0, SP_REGNUM, BLINK_REGNUM, 4))
// OBSOLETE {
// OBSOLETE insn = codestream_get ();
// OBSOLETE /* Frame may not be necessary, even though blink is saved.
// OBSOLETE At least this is something we recognize. */
// OBSOLETE frame_size = 0;
// OBSOLETE }
// OBSOLETE
// OBSOLETE if ((insn & BUILD_INSN (-1, 0, -1, -1, -1)) /* st fp,[sp] */
// OBSOLETE == BUILD_INSN (2, 0, SP_REGNUM, FP_REGNUM, 0))
// OBSOLETE {
// OBSOLETE insn = codestream_get ();
// OBSOLETE if ((insn & BUILD_INSN (-1, -1, -1, -1, 0))
// OBSOLETE != BUILD_INSN (12, FP_REGNUM, SP_REGNUM, SP_REGNUM, 0))
// OBSOLETE return -1;
// OBSOLETE
// OBSOLETE /* Check for stack adjustment sub sp,sp,N. */
// OBSOLETE insn = codestream_peek ();
// OBSOLETE if ((insn & BUILD_INSN (-1, -1, -1, 0, 0))
// OBSOLETE == BUILD_INSN (10, SP_REGNUM, SP_REGNUM, 0, 0))
// OBSOLETE {
// OBSOLETE if (LIMM_P (X_C (insn)))
// OBSOLETE frame_size = codestream_get ();
// OBSOLETE else if (SHIMM_P (X_C (insn)))
// OBSOLETE frame_size = X_D (insn);
// OBSOLETE else
// OBSOLETE return -1;
// OBSOLETE if (frame_size < 0)
// OBSOLETE return -1;
// OBSOLETE
// OBSOLETE codestream_get ();
// OBSOLETE
// OBSOLETE /* This sequence is used to get the address of the return
// OBSOLETE buffer for a function that returns a structure. */
// OBSOLETE insn = codestream_peek ();
// OBSOLETE if ((insn & OPMASK) == 0x60000000)
// OBSOLETE codestream_get ();
// OBSOLETE }
// OBSOLETE /* Frameless fn. */
// OBSOLETE else
// OBSOLETE {
// OBSOLETE frame_size = 0;
// OBSOLETE }
// OBSOLETE }
// OBSOLETE
// OBSOLETE /* If we found a "sub sp,sp,N" and nothing else, it may or may not be a
// OBSOLETE stdarg fn. The stdarg decrement is not treated as part of the frame size,
// OBSOLETE so we have a dilemma: what do we return? For now, if we get a
// OBSOLETE "sub sp,sp,N" and nothing else assume this isn't a stdarg fn. One way
// OBSOLETE to fix this completely would be to add a bit to the function descriptor
// OBSOLETE that says the function is a stdarg function. */
// OBSOLETE
// OBSOLETE if (frame_size < 0 && maybe_stdarg_decr > 0)
// OBSOLETE return maybe_stdarg_decr;
// OBSOLETE return frame_size;
// OBSOLETE }
// OBSOLETE
// OBSOLETE /* Given a pc value, skip it forward past the function prologue by
// OBSOLETE disassembling instructions that appear to be a prologue.
// OBSOLETE
// OBSOLETE If FRAMELESS_P is set, we are only testing to see if the function
// OBSOLETE is frameless. If it is a frameless function, return PC unchanged.
// OBSOLETE This allows a quicker answer. */
// OBSOLETE
// OBSOLETE CORE_ADDR
// OBSOLETE arc_skip_prologue (CORE_ADDR pc, int frameless_p)
// OBSOLETE {
// OBSOLETE unsigned int insn;
// OBSOLETE int i, frame_size;
// OBSOLETE
// OBSOLETE if ((frame_size = arc_get_frame_setup (pc)) < 0)
// OBSOLETE return (pc);
// OBSOLETE
// OBSOLETE if (frameless_p)
// OBSOLETE return frame_size == 0 ? pc : codestream_tell ();
// OBSOLETE
// OBSOLETE /* Skip over register saves. */
// OBSOLETE for (i = 0; i < 8; i++)
// OBSOLETE {
// OBSOLETE insn = codestream_peek ();
// OBSOLETE if ((insn & BUILD_INSN (-1, 0, -1, 0, 0))
// OBSOLETE != BUILD_INSN (2, 0, SP_REGNUM, 0, 0))
// OBSOLETE break; /* not st insn */
// OBSOLETE if (!ARC_CALL_SAVED_REG (X_C (insn)))
// OBSOLETE break;
// OBSOLETE codestream_get ();
// OBSOLETE }
// OBSOLETE
// OBSOLETE return codestream_tell ();
// OBSOLETE }
// OBSOLETE
// OBSOLETE /* Is the prologue at PC frameless? */
// OBSOLETE
// OBSOLETE int
// OBSOLETE arc_prologue_frameless_p (CORE_ADDR pc)
// OBSOLETE {
// OBSOLETE return (pc == arc_skip_prologue (pc, 1));
// OBSOLETE }
// OBSOLETE
// OBSOLETE /* Return the return address for a frame.
// OBSOLETE This is used to implement FRAME_SAVED_PC.
// OBSOLETE This is taken from frameless_look_for_prologue. */
// OBSOLETE
// OBSOLETE CORE_ADDR
// OBSOLETE arc_frame_saved_pc (struct frame_info *frame)
// OBSOLETE {
// OBSOLETE CORE_ADDR func_start;
// OBSOLETE unsigned int insn;
// OBSOLETE
// OBSOLETE func_start = get_pc_function_start (frame->pc) + FUNCTION_START_OFFSET;
// OBSOLETE if (func_start == 0)
// OBSOLETE {
// OBSOLETE /* Best guess. */
// OBSOLETE return ARC_PC_TO_REAL_ADDRESS (read_memory_integer (FRAME_FP (frame) + 4, 4));
// OBSOLETE }
// OBSOLETE
// OBSOLETE /* The authority for what appears here is the home-grown ABI.
// OBSOLETE The most recent version is 1.2. */
// OBSOLETE
// OBSOLETE insn = setup_prologue_scan (func_start);
// OBSOLETE
// OBSOLETE /* First insn may be "sub sp,sp,N" if stdarg fn. */
// OBSOLETE if ((insn & BUILD_INSN (-1, -1, -1, -1, 0))
// OBSOLETE == BUILD_INSN (10, SP_REGNUM, SP_REGNUM, SHIMM_REGNUM, 0))
// OBSOLETE insn = codestream_get ();
// OBSOLETE
// OBSOLETE /* If the next insn is "st blink,[sp,4]" we can get blink from there.
// OBSOLETE Otherwise this is a leaf function and we can use blink. Note that
// OBSOLETE this still allows for the case where a leaf function saves/clobbers/
// OBSOLETE restores blink. */
// OBSOLETE
// OBSOLETE if ((insn & BUILD_INSN (-1, 0, -1, -1, -1)) /* st blink,[sp,4] */
// OBSOLETE != BUILD_INSN (2, 0, SP_REGNUM, BLINK_REGNUM, 4))
// OBSOLETE return ARC_PC_TO_REAL_ADDRESS (read_register (BLINK_REGNUM));
// OBSOLETE else
// OBSOLETE return ARC_PC_TO_REAL_ADDRESS (read_memory_integer (FRAME_FP (frame) + 4, 4));
// OBSOLETE }
// OBSOLETE
// OBSOLETE /*
// OBSOLETE * Parse the first few instructions of the function to see
// OBSOLETE * what registers were stored.
// OBSOLETE *
// OBSOLETE * The startup sequence can be at the start of the function.
// OBSOLETE * 'st blink,[sp+4], st fp,[sp], mov fp,sp'
// OBSOLETE *
// OBSOLETE * Local space is allocated just below by sub sp,sp,nnn.
// OBSOLETE * Next, the registers used by this function are stored (as offsets from sp).
// OBSOLETE */
// OBSOLETE
// OBSOLETE void
// OBSOLETE frame_find_saved_regs (struct frame_info *fip, struct frame_saved_regs *fsrp)
// OBSOLETE {
// OBSOLETE long locals;
// OBSOLETE unsigned int insn;
// OBSOLETE CORE_ADDR dummy_bottom;
// OBSOLETE CORE_ADDR adr;
// OBSOLETE int i, regnum, offset;
// OBSOLETE
// OBSOLETE memset (fsrp, 0, sizeof *fsrp);
// OBSOLETE
// OBSOLETE /* If frame is the end of a dummy, compute where the beginning would be. */
// OBSOLETE dummy_bottom = fip->frame - 4 - REGISTER_BYTES - CALL_DUMMY_LENGTH;
// OBSOLETE
// OBSOLETE /* Check if the PC is in the stack, in a dummy frame. */
// OBSOLETE if (dummy_bottom <= fip->pc && fip->pc <= fip->frame)
// OBSOLETE {
// OBSOLETE /* all regs were saved by push_call_dummy () */
// OBSOLETE adr = fip->frame;
// OBSOLETE for (i = 0; i < NUM_REGS; i++)
// OBSOLETE {
// OBSOLETE adr -= REGISTER_RAW_SIZE (i);
// OBSOLETE fsrp->regs[i] = adr;
// OBSOLETE }
// OBSOLETE return;
// OBSOLETE }
// OBSOLETE
// OBSOLETE locals = arc_get_frame_setup (get_pc_function_start (fip->pc));
// OBSOLETE
// OBSOLETE if (locals >= 0)
// OBSOLETE {
// OBSOLETE /* Set `adr' to the value of `sp'. */
// OBSOLETE adr = fip->frame - locals;
// OBSOLETE for (i = 0; i < 8; i++)
// OBSOLETE {
// OBSOLETE insn = codestream_get ();
// OBSOLETE if ((insn & BUILD_INSN (-1, 0, -1, 0, 0))
// OBSOLETE != BUILD_INSN (2, 0, SP_REGNUM, 0, 0))
// OBSOLETE break;
// OBSOLETE regnum = X_C (insn);
// OBSOLETE offset = X_D (insn);
// OBSOLETE fsrp->regs[regnum] = adr + offset;
// OBSOLETE }
// OBSOLETE }
// OBSOLETE
// OBSOLETE fsrp->regs[PC_REGNUM] = fip->frame + 4;
// OBSOLETE fsrp->regs[FP_REGNUM] = fip->frame;
// OBSOLETE }
// OBSOLETE
// OBSOLETE void
// OBSOLETE arc_push_dummy_frame (void)
// OBSOLETE {
// OBSOLETE CORE_ADDR sp = read_register (SP_REGNUM);
// OBSOLETE int regnum;
// OBSOLETE char regbuf[MAX_REGISTER_RAW_SIZE];
// OBSOLETE
// OBSOLETE read_register_gen (PC_REGNUM, regbuf);
// OBSOLETE write_memory (sp + 4, regbuf, REGISTER_SIZE);
// OBSOLETE read_register_gen (FP_REGNUM, regbuf);
// OBSOLETE write_memory (sp, regbuf, REGISTER_SIZE);
// OBSOLETE write_register (FP_REGNUM, sp);
// OBSOLETE for (regnum = 0; regnum < NUM_REGS; regnum++)
// OBSOLETE {
// OBSOLETE read_register_gen (regnum, regbuf);
// OBSOLETE sp = push_bytes (sp, regbuf, REGISTER_RAW_SIZE (regnum));
// OBSOLETE }
// OBSOLETE sp += (2 * REGISTER_SIZE);
// OBSOLETE write_register (SP_REGNUM, sp);
// OBSOLETE }
// OBSOLETE
// OBSOLETE void
// OBSOLETE arc_pop_frame (void)
// OBSOLETE {
// OBSOLETE struct frame_info *frame = get_current_frame ();
// OBSOLETE CORE_ADDR fp;
// OBSOLETE int regnum;
// OBSOLETE struct frame_saved_regs fsr;
// OBSOLETE char regbuf[MAX_REGISTER_RAW_SIZE];
// OBSOLETE
// OBSOLETE fp = FRAME_FP (frame);
// OBSOLETE get_frame_saved_regs (frame, &fsr);
// OBSOLETE for (regnum = 0; regnum < NUM_REGS; regnum++)
// OBSOLETE {
// OBSOLETE CORE_ADDR adr;
// OBSOLETE adr = fsr.regs[regnum];
// OBSOLETE if (adr)
// OBSOLETE {
// OBSOLETE read_memory (adr, regbuf, REGISTER_RAW_SIZE (regnum));
// OBSOLETE write_register_bytes (REGISTER_BYTE (regnum), regbuf,
// OBSOLETE REGISTER_RAW_SIZE (regnum));
// OBSOLETE }
// OBSOLETE }
// OBSOLETE write_register (FP_REGNUM, read_memory_integer (fp, 4));
// OBSOLETE write_register (PC_REGNUM, read_memory_integer (fp + 4, 4));
// OBSOLETE write_register (SP_REGNUM, fp + 8);
// OBSOLETE flush_cached_frames ();
// OBSOLETE }
// OBSOLETE
// OBSOLETE /* Simulate single-step. */
// OBSOLETE
// OBSOLETE typedef enum
// OBSOLETE {
// OBSOLETE NORMAL4, /* a normal 4 byte insn */
// OBSOLETE NORMAL8, /* a normal 8 byte insn */
// OBSOLETE BRANCH4, /* a 4 byte branch insn, including ones without delay slots */
// OBSOLETE BRANCH8, /* an 8 byte branch insn, including ones with delay slots */
// OBSOLETE }
// OBSOLETE insn_type;
// OBSOLETE
// OBSOLETE /* Return the type of INSN and store in TARGET the destination address of a
// OBSOLETE branch if this is one. */
// OBSOLETE /* ??? Need to verify all cases are properly handled. */
// OBSOLETE
// OBSOLETE static insn_type
// OBSOLETE get_insn_type (unsigned long insn, CORE_ADDR pc, CORE_ADDR *target)
// OBSOLETE {
// OBSOLETE unsigned long limm;
// OBSOLETE
// OBSOLETE switch (insn >> 27)
// OBSOLETE {
// OBSOLETE case 0:
// OBSOLETE case 1:
// OBSOLETE case 2: /* load/store insns */
// OBSOLETE if (LIMM_P (X_A (insn))
// OBSOLETE || LIMM_P (X_B (insn))
// OBSOLETE || LIMM_P (X_C (insn)))
// OBSOLETE return NORMAL8;
// OBSOLETE return NORMAL4;
// OBSOLETE case 4:
// OBSOLETE case 5:
// OBSOLETE case 6: /* branch insns */
// OBSOLETE *target = pc + 4 + X_L (insn);
// OBSOLETE /* ??? It isn't clear that this is always the right answer.
// OBSOLETE The problem occurs when the next insn is an 8 byte insn. If the
// OBSOLETE branch is conditional there's no worry as there shouldn't be an 8
// OBSOLETE byte insn following. The programmer may be cheating if s/he knows
// OBSOLETE the branch will never be taken, but we don't deal with that.
// OBSOLETE Note that the programmer is also allowed to play games by putting
// OBSOLETE an insn with long immediate data in the delay slot and then duplicate
// OBSOLETE the long immediate data at the branch target. Ugh! */
// OBSOLETE if (X_N (insn) == 0)
// OBSOLETE return BRANCH4;
// OBSOLETE return BRANCH8;
// OBSOLETE case 7: /* jump insns */
// OBSOLETE if (LIMM_P (X_B (insn)))
// OBSOLETE {
// OBSOLETE limm = read_memory_integer (pc + 4, 4);
// OBSOLETE *target = ARC_PC_TO_REAL_ADDRESS (limm);
// OBSOLETE return BRANCH8;
// OBSOLETE }
// OBSOLETE if (SHIMM_P (X_B (insn)))
// OBSOLETE *target = ARC_PC_TO_REAL_ADDRESS (X_D (insn));
// OBSOLETE else
// OBSOLETE *target = ARC_PC_TO_REAL_ADDRESS (read_register (X_B (insn)));
// OBSOLETE if (X_Q (insn) == 0 && X_N (insn) == 0)
// OBSOLETE return BRANCH4;
// OBSOLETE return BRANCH8;
// OBSOLETE default: /* arithmetic insns, etc. */
// OBSOLETE if (LIMM_P (X_A (insn))
// OBSOLETE || LIMM_P (X_B (insn))
// OBSOLETE || LIMM_P (X_C (insn)))
// OBSOLETE return NORMAL8;
// OBSOLETE return NORMAL4;
// OBSOLETE }
// OBSOLETE }
// OBSOLETE
// OBSOLETE /* single_step() is called just before we want to resume the inferior, if we
// OBSOLETE want to single-step it but there is no hardware or kernel single-step
// OBSOLETE support. We find all the possible targets of the coming instruction and
// OBSOLETE breakpoint them.
// OBSOLETE
// OBSOLETE single_step is also called just after the inferior stops. If we had
// OBSOLETE set up a simulated single-step, we undo our damage. */
// OBSOLETE
// OBSOLETE void
// OBSOLETE arc_software_single_step (enum target_signal ignore, /* sig but we don't need it */
// OBSOLETE int insert_breakpoints_p)
// OBSOLETE {
// OBSOLETE static CORE_ADDR next_pc, target;
// OBSOLETE static int brktrg_p;
// OBSOLETE typedef char binsn_quantum[BREAKPOINT_MAX];
// OBSOLETE static binsn_quantum break_mem[2];
// OBSOLETE
// OBSOLETE if (insert_breakpoints_p)
// OBSOLETE {
// OBSOLETE insn_type type;
// OBSOLETE CORE_ADDR pc;
// OBSOLETE unsigned long insn;
// OBSOLETE
// OBSOLETE pc = read_register (PC_REGNUM);
// OBSOLETE insn = read_memory_integer (pc, 4);
// OBSOLETE type = get_insn_type (insn, pc, &target);
// OBSOLETE
// OBSOLETE /* Always set a breakpoint for the insn after the branch. */
// OBSOLETE next_pc = pc + ((type == NORMAL8 || type == BRANCH8) ? 8 : 4);
// OBSOLETE target_insert_breakpoint (next_pc, break_mem[0]);
// OBSOLETE
// OBSOLETE brktrg_p = 0;
// OBSOLETE
// OBSOLETE if ((type == BRANCH4 || type == BRANCH8)
// OBSOLETE /* Watch out for branches to the following location.
// OBSOLETE We just stored a breakpoint there and another call to
// OBSOLETE target_insert_breakpoint will think the real insn is the
// OBSOLETE breakpoint we just stored there. */
// OBSOLETE && target != next_pc)
// OBSOLETE {
// OBSOLETE brktrg_p = 1;
// OBSOLETE target_insert_breakpoint (target, break_mem[1]);
// OBSOLETE }
// OBSOLETE
// OBSOLETE }
// OBSOLETE else
// OBSOLETE {
// OBSOLETE /* Remove breakpoints. */
// OBSOLETE target_remove_breakpoint (next_pc, break_mem[0]);
// OBSOLETE
// OBSOLETE if (brktrg_p)
// OBSOLETE target_remove_breakpoint (target, break_mem[1]);
// OBSOLETE
// OBSOLETE /* Fix the pc. */
// OBSOLETE stop_pc -= DECR_PC_AFTER_BREAK;
// OBSOLETE write_pc (stop_pc);
// OBSOLETE }
// OBSOLETE }
// OBSOLETE
// OBSOLETE /* Because of Multi-arch, GET_LONGJMP_TARGET is always defined. So test
// OBSOLETE for a definition of JB_PC. */
// OBSOLETE #ifdef JB_PC
// OBSOLETE /* Figure out where the longjmp will land. Slurp the args out of the stack.
// OBSOLETE We expect the first arg to be a pointer to the jmp_buf structure from which
// OBSOLETE we extract the pc (JB_PC) that we will land at. The pc is copied into PC.
// OBSOLETE This routine returns true on success. */
// OBSOLETE
// OBSOLETE int
// OBSOLETE get_longjmp_target (CORE_ADDR *pc)
// OBSOLETE {
// OBSOLETE char buf[TARGET_PTR_BIT / TARGET_CHAR_BIT];
// OBSOLETE CORE_ADDR sp, jb_addr;
// OBSOLETE
// OBSOLETE sp = read_register (SP_REGNUM);
// OBSOLETE
// OBSOLETE if (target_read_memory (sp + SP_ARG0, /* Offset of first arg on stack */
// OBSOLETE buf,
// OBSOLETE TARGET_PTR_BIT / TARGET_CHAR_BIT))
// OBSOLETE return 0;
// OBSOLETE
// OBSOLETE jb_addr = extract_address (buf, TARGET_PTR_BIT / TARGET_CHAR_BIT);
// OBSOLETE
// OBSOLETE if (target_read_memory (jb_addr + JB_PC * JB_ELEMENT_SIZE, buf,
// OBSOLETE TARGET_PTR_BIT / TARGET_CHAR_BIT))
// OBSOLETE return 0;
// OBSOLETE
// OBSOLETE *pc = extract_address (buf, TARGET_PTR_BIT / TARGET_CHAR_BIT);
// OBSOLETE
// OBSOLETE return 1;
// OBSOLETE }
// OBSOLETE #endif /* GET_LONGJMP_TARGET */
// OBSOLETE
// OBSOLETE /* Disassemble one instruction. */
// OBSOLETE
// OBSOLETE static int
// OBSOLETE arc_print_insn (bfd_vma vma, disassemble_info *info)
// OBSOLETE {
// OBSOLETE static int current_mach;
// OBSOLETE static int current_endian;
// OBSOLETE static disassembler_ftype current_disasm;
// OBSOLETE
// OBSOLETE if (current_disasm == NULL
// OBSOLETE || arc_bfd_mach_type != current_mach
// OBSOLETE || TARGET_BYTE_ORDER != current_endian)
// OBSOLETE {
// OBSOLETE current_mach = arc_bfd_mach_type;
// OBSOLETE current_endian = TARGET_BYTE_ORDER;
// OBSOLETE current_disasm = arc_get_disassembler (NULL);
// OBSOLETE }
// OBSOLETE
// OBSOLETE return (*current_disasm) (vma, info);
// OBSOLETE }
// OBSOLETE
// OBSOLETE /* Command to set cpu type. */
// OBSOLETE
// OBSOLETE void
// OBSOLETE arc_set_cpu_type_command (char *args, int from_tty)
// OBSOLETE {
// OBSOLETE int i;
// OBSOLETE
// OBSOLETE if (tmp_arc_cpu_type == NULL || *tmp_arc_cpu_type == '\0')
// OBSOLETE {
// OBSOLETE printf_unfiltered ("The known ARC cpu types are as follows:\n");
// OBSOLETE for (i = 0; arc_cpu_type_table[i].name != NULL; ++i)
// OBSOLETE printf_unfiltered ("%s\n", arc_cpu_type_table[i].name);
// OBSOLETE
// OBSOLETE /* Restore the value. */
// OBSOLETE tmp_arc_cpu_type = xstrdup (arc_cpu_type);
// OBSOLETE
// OBSOLETE return;
// OBSOLETE }
// OBSOLETE
// OBSOLETE if (!arc_set_cpu_type (tmp_arc_cpu_type))
// OBSOLETE {
// OBSOLETE error ("Unknown cpu type `%s'.", tmp_arc_cpu_type);
// OBSOLETE /* Restore its value. */
// OBSOLETE tmp_arc_cpu_type = xstrdup (arc_cpu_type);
// OBSOLETE }
// OBSOLETE }
// OBSOLETE
// OBSOLETE static void
// OBSOLETE arc_show_cpu_type_command (char *args, int from_tty)
// OBSOLETE {
// OBSOLETE }
// OBSOLETE
// OBSOLETE /* Modify the actual cpu type.
// OBSOLETE Result is a boolean indicating success. */
// OBSOLETE
// OBSOLETE static int
// OBSOLETE arc_set_cpu_type (char *str)
// OBSOLETE {
// OBSOLETE int i, j;
// OBSOLETE
// OBSOLETE if (str == NULL)
// OBSOLETE return 0;
// OBSOLETE
// OBSOLETE for (i = 0; arc_cpu_type_table[i].name != NULL; ++i)
// OBSOLETE {
// OBSOLETE if (strcasecmp (str, arc_cpu_type_table[i].name) == 0)
// OBSOLETE {
// OBSOLETE arc_cpu_type = str;
// OBSOLETE arc_bfd_mach_type = arc_cpu_type_table[i].value;
// OBSOLETE return 1;
// OBSOLETE }
// OBSOLETE }
// OBSOLETE
// OBSOLETE return 0;
// OBSOLETE }
// OBSOLETE
// OBSOLETE void
// OBSOLETE _initialize_arc_tdep (void)
// OBSOLETE {
// OBSOLETE struct cmd_list_element *c;
// OBSOLETE
// OBSOLETE c = add_set_cmd ("cpu", class_support, var_string_noescape,
// OBSOLETE (char *) &tmp_arc_cpu_type,
// OBSOLETE "Set the type of ARC cpu in use.\n\
// OBSOLETE This command has two purposes. In a multi-cpu system it lets one\n\
// OBSOLETE change the cpu being debugged. It also gives one access to\n\
// OBSOLETE cpu-type-specific registers and recognize cpu-type-specific instructions.\
// OBSOLETE ",
// OBSOLETE &setlist);
// OBSOLETE set_cmd_cfunc (c, arc_set_cpu_type_command);
// OBSOLETE c = add_show_from_set (c, &showlist);
// OBSOLETE set_cmd_cfunc (c, arc_show_cpu_type_command);
// OBSOLETE
// OBSOLETE /* We have to use xstrdup() here because the `set' command frees it
// OBSOLETE before setting a new value. */
// OBSOLETE tmp_arc_cpu_type = xstrdup (DEFAULT_ARC_CPU_TYPE);
// OBSOLETE arc_set_cpu_type (tmp_arc_cpu_type);
// OBSOLETE
// OBSOLETE c = add_set_cmd ("displaypipeline", class_support, var_zinteger,
// OBSOLETE (char *) &display_pipeline_p,
// OBSOLETE "Set pipeline display (simulator only).\n\
// OBSOLETE When enabled, the state of the pipeline after each cycle is displayed.",
// OBSOLETE &setlist);
// OBSOLETE c = add_show_from_set (c, &showlist);
// OBSOLETE
// OBSOLETE c = add_set_cmd ("debugpipeline", class_support, var_zinteger,
// OBSOLETE (char *) &debug_pipeline_p,
// OBSOLETE "Set pipeline debug display (simulator only).\n\
// OBSOLETE When enabled, debugging information about the pipeline is displayed.",
// OBSOLETE &setlist);
// OBSOLETE c = add_show_from_set (c, &showlist);
// OBSOLETE
// OBSOLETE c = add_set_cmd ("cputimer", class_support, var_zinteger,
// OBSOLETE (char *) &cpu_timer,
// OBSOLETE "Set maximum cycle count (simulator only).\n\
// OBSOLETE Control will return to gdb if the timer expires.\n\
// OBSOLETE A negative value disables the timer.",
// OBSOLETE &setlist);
// OBSOLETE c = add_show_from_set (c, &showlist);
// OBSOLETE
// OBSOLETE tm_print_insn = arc_print_insn;
// OBSOLETE }

File diff suppressed because it is too large Load diff

View file

@ -1,663 +0,0 @@
// OBSOLETE /* Chill language support routines for GDB, the GNU debugger.
// OBSOLETE Copyright 1992, 1993, 1994, 1995, 1996, 2000, 2001, 2002
// 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 "defs.h"
// OBSOLETE #include "symtab.h"
// OBSOLETE #include "gdbtypes.h"
// OBSOLETE #include "value.h"
// OBSOLETE #include "expression.h"
// OBSOLETE #include "parser-defs.h"
// OBSOLETE #include "language.h"
// OBSOLETE #include "ch-lang.h"
// OBSOLETE #include "valprint.h"
// OBSOLETE
// OBSOLETE extern void _initialize_chill_language (void);
// OBSOLETE
// OBSOLETE static struct value *evaluate_subexp_chill (struct type *, struct expression *,
// OBSOLETE int *, enum noside);
// OBSOLETE
// OBSOLETE static struct value *value_chill_max_min (enum exp_opcode, struct value *);
// OBSOLETE
// OBSOLETE static struct value *value_chill_card (struct value *);
// OBSOLETE
// OBSOLETE static struct value *value_chill_length (struct value *);
// OBSOLETE
// OBSOLETE static struct type *chill_create_fundamental_type (struct objfile *, int);
// OBSOLETE
// OBSOLETE static void chill_printstr (struct ui_file * stream, char *string,
// OBSOLETE unsigned int length, int width,
// OBSOLETE int force_ellipses);
// OBSOLETE
// OBSOLETE static void chill_printchar (int, struct ui_file *);
// OBSOLETE
// OBSOLETE /* For now, Chill uses a simple mangling algorithm whereby you simply
// OBSOLETE discard everything after the occurance of two successive CPLUS_MARKER
// OBSOLETE characters to derive the demangled form. */
// OBSOLETE
// OBSOLETE char *
// OBSOLETE chill_demangle (const char *mangled)
// OBSOLETE {
// OBSOLETE const char *joiner = NULL;
// OBSOLETE char *demangled;
// OBSOLETE const char *cp = mangled;
// OBSOLETE
// OBSOLETE while (*cp)
// OBSOLETE {
// OBSOLETE if (is_cplus_marker (*cp))
// OBSOLETE {
// OBSOLETE joiner = cp;
// OBSOLETE break;
// OBSOLETE }
// OBSOLETE cp++;
// OBSOLETE }
// OBSOLETE if (joiner != NULL && *(joiner + 1) == *joiner)
// OBSOLETE {
// OBSOLETE demangled = savestring (mangled, joiner - mangled);
// OBSOLETE }
// OBSOLETE else
// OBSOLETE {
// OBSOLETE demangled = NULL;
// OBSOLETE }
// OBSOLETE return (demangled);
// OBSOLETE }
// OBSOLETE
// OBSOLETE static void
// OBSOLETE chill_printchar (register int c, struct ui_file *stream)
// OBSOLETE {
// OBSOLETE c &= 0xFF; /* Avoid sign bit follies */
// OBSOLETE
// OBSOLETE if (PRINT_LITERAL_FORM (c))
// OBSOLETE {
// OBSOLETE if (c == '\'' || c == '^')
// OBSOLETE fprintf_filtered (stream, "'%c%c'", c, c);
// OBSOLETE else
// OBSOLETE fprintf_filtered (stream, "'%c'", c);
// OBSOLETE }
// OBSOLETE else
// OBSOLETE {
// OBSOLETE fprintf_filtered (stream, "'^(%u)'", (unsigned int) c);
// OBSOLETE }
// OBSOLETE }
// OBSOLETE
// OBSOLETE /* Print the character string STRING, printing at most LENGTH characters.
// OBSOLETE Printing stops early if the number hits print_max; repeat counts
// OBSOLETE are printed as appropriate. Print ellipses at the end if we
// OBSOLETE had to stop before printing LENGTH characters, or if FORCE_ELLIPSES.
// OBSOLETE Note that gdb maintains the length of strings without counting the
// OBSOLETE terminating null byte, while chill strings are typically written with
// OBSOLETE an explicit null byte. So we always assume an implied null byte
// OBSOLETE until gdb is able to maintain non-null terminated strings as well
// OBSOLETE as null terminated strings (FIXME).
// OBSOLETE */
// OBSOLETE
// OBSOLETE static void
// OBSOLETE chill_printstr (struct ui_file *stream, char *string, unsigned int length,
// OBSOLETE int width, int force_ellipses)
// OBSOLETE {
// OBSOLETE register unsigned int i;
// OBSOLETE unsigned int things_printed = 0;
// OBSOLETE int in_literal_form = 0;
// OBSOLETE int in_control_form = 0;
// OBSOLETE int need_slashslash = 0;
// OBSOLETE unsigned int c;
// OBSOLETE
// OBSOLETE if (length == 0)
// OBSOLETE {
// OBSOLETE fputs_filtered ("\"\"", stream);
// OBSOLETE return;
// OBSOLETE }
// OBSOLETE
// OBSOLETE for (i = 0; i < length && things_printed < print_max; ++i)
// OBSOLETE {
// OBSOLETE /* Position of the character we are examining
// OBSOLETE to see whether it is repeated. */
// OBSOLETE unsigned int rep1;
// OBSOLETE /* Number of repetitions we have detected so far. */
// OBSOLETE unsigned int reps;
// OBSOLETE
// OBSOLETE QUIT;
// OBSOLETE
// OBSOLETE if (need_slashslash)
// OBSOLETE {
// OBSOLETE fputs_filtered ("//", stream);
// OBSOLETE need_slashslash = 0;
// OBSOLETE }
// OBSOLETE
// OBSOLETE rep1 = i + 1;
// OBSOLETE reps = 1;
// OBSOLETE while (rep1 < length && string[rep1] == string[i])
// OBSOLETE {
// OBSOLETE ++rep1;
// OBSOLETE ++reps;
// OBSOLETE }
// OBSOLETE
// OBSOLETE c = string[i];
// OBSOLETE if (reps > repeat_count_threshold)
// OBSOLETE {
// OBSOLETE if (in_control_form || in_literal_form)
// OBSOLETE {
// OBSOLETE if (in_control_form)
// OBSOLETE fputs_filtered (")", stream);
// OBSOLETE fputs_filtered ("\"//", stream);
// OBSOLETE in_control_form = in_literal_form = 0;
// OBSOLETE }
// OBSOLETE chill_printchar (c, stream);
// OBSOLETE fprintf_filtered (stream, "<repeats %u times>", reps);
// OBSOLETE i = rep1 - 1;
// OBSOLETE things_printed += repeat_count_threshold;
// OBSOLETE need_slashslash = 1;
// OBSOLETE }
// OBSOLETE else
// OBSOLETE {
// OBSOLETE if (!in_literal_form && !in_control_form)
// OBSOLETE fputs_filtered ("\"", stream);
// OBSOLETE if (PRINT_LITERAL_FORM (c))
// OBSOLETE {
// OBSOLETE if (!in_literal_form)
// OBSOLETE {
// OBSOLETE if (in_control_form)
// OBSOLETE {
// OBSOLETE fputs_filtered (")", stream);
// OBSOLETE in_control_form = 0;
// OBSOLETE }
// OBSOLETE in_literal_form = 1;
// OBSOLETE }
// OBSOLETE fprintf_filtered (stream, "%c", c);
// OBSOLETE if (c == '"' || c == '^')
// OBSOLETE /* duplicate this one as must be done at input */
// OBSOLETE fprintf_filtered (stream, "%c", c);
// OBSOLETE }
// OBSOLETE else
// OBSOLETE {
// OBSOLETE if (!in_control_form)
// OBSOLETE {
// OBSOLETE if (in_literal_form)
// OBSOLETE {
// OBSOLETE in_literal_form = 0;
// OBSOLETE }
// OBSOLETE fputs_filtered ("^(", stream);
// OBSOLETE in_control_form = 1;
// OBSOLETE }
// OBSOLETE else
// OBSOLETE fprintf_filtered (stream, ",");
// OBSOLETE c = c & 0xff;
// OBSOLETE fprintf_filtered (stream, "%u", (unsigned int) c);
// OBSOLETE }
// OBSOLETE ++things_printed;
// OBSOLETE }
// OBSOLETE }
// OBSOLETE
// OBSOLETE /* Terminate the quotes if necessary. */
// OBSOLETE if (in_control_form)
// OBSOLETE {
// OBSOLETE fputs_filtered (")", stream);
// OBSOLETE }
// OBSOLETE if (in_literal_form || in_control_form)
// OBSOLETE {
// OBSOLETE fputs_filtered ("\"", stream);
// OBSOLETE }
// OBSOLETE if (force_ellipses || (i < length))
// OBSOLETE {
// OBSOLETE fputs_filtered ("...", stream);
// OBSOLETE }
// OBSOLETE }
// OBSOLETE
// OBSOLETE static struct type *
// OBSOLETE chill_create_fundamental_type (struct objfile *objfile, int typeid)
// OBSOLETE {
// OBSOLETE register struct type *type = NULL;
// OBSOLETE
// OBSOLETE switch (typeid)
// OBSOLETE {
// OBSOLETE default:
// OBSOLETE /* FIXME: For now, if we are asked to produce a type not in this
// OBSOLETE language, create the equivalent of a C integer type with the
// OBSOLETE name "<?type?>". When all the dust settles from the type
// OBSOLETE reconstruction work, this should probably become an error. */
// OBSOLETE type = init_type (TYPE_CODE_INT, 2, 0, "<?type?>", objfile);
// OBSOLETE warning ("internal error: no chill fundamental type %d", typeid);
// OBSOLETE break;
// OBSOLETE case FT_VOID:
// OBSOLETE /* FIXME: Currently the GNU Chill compiler emits some DWARF entries for
// OBSOLETE typedefs, unrelated to anything directly in the code being compiled,
// OBSOLETE that have some FT_VOID types. Just fake it for now. */
// OBSOLETE type = init_type (TYPE_CODE_VOID, 0, 0, "<?VOID?>", objfile);
// OBSOLETE break;
// OBSOLETE case FT_BOOLEAN:
// OBSOLETE type = init_type (TYPE_CODE_BOOL, 1, TYPE_FLAG_UNSIGNED, "BOOL", objfile);
// OBSOLETE break;
// OBSOLETE case FT_CHAR:
// OBSOLETE type = init_type (TYPE_CODE_CHAR, 1, TYPE_FLAG_UNSIGNED, "CHAR", objfile);
// OBSOLETE break;
// OBSOLETE case FT_SIGNED_CHAR:
// OBSOLETE type = init_type (TYPE_CODE_INT, 1, 0, "BYTE", objfile);
// OBSOLETE break;
// OBSOLETE case FT_UNSIGNED_CHAR:
// OBSOLETE type = init_type (TYPE_CODE_INT, 1, TYPE_FLAG_UNSIGNED, "UBYTE", objfile);
// OBSOLETE break;
// OBSOLETE case FT_SHORT: /* Chill ints are 2 bytes */
// OBSOLETE type = init_type (TYPE_CODE_INT, 2, 0, "INT", objfile);
// OBSOLETE break;
// OBSOLETE case FT_UNSIGNED_SHORT: /* Chill ints are 2 bytes */
// OBSOLETE type = init_type (TYPE_CODE_INT, 2, TYPE_FLAG_UNSIGNED, "UINT", objfile);
// OBSOLETE break;
// OBSOLETE case FT_INTEGER: /* FIXME? */
// OBSOLETE case FT_SIGNED_INTEGER: /* FIXME? */
// OBSOLETE case FT_LONG: /* Chill longs are 4 bytes */
// OBSOLETE case FT_SIGNED_LONG: /* Chill longs are 4 bytes */
// OBSOLETE type = init_type (TYPE_CODE_INT, 4, 0, "LONG", objfile);
// OBSOLETE break;
// OBSOLETE case FT_UNSIGNED_INTEGER: /* FIXME? */
// OBSOLETE case FT_UNSIGNED_LONG: /* Chill longs are 4 bytes */
// OBSOLETE type = init_type (TYPE_CODE_INT, 4, TYPE_FLAG_UNSIGNED, "ULONG", objfile);
// OBSOLETE break;
// OBSOLETE case FT_FLOAT:
// OBSOLETE type = init_type (TYPE_CODE_FLT, 4, 0, "REAL", objfile);
// OBSOLETE break;
// OBSOLETE case FT_DBL_PREC_FLOAT:
// OBSOLETE type = init_type (TYPE_CODE_FLT, 8, 0, "LONG_REAL", objfile);
// OBSOLETE break;
// OBSOLETE }
// OBSOLETE return (type);
// OBSOLETE }
// OBSOLETE
// OBSOLETE
// OBSOLETE /* Table of operators and their precedences for printing expressions. */
// OBSOLETE
// OBSOLETE static const struct op_print chill_op_print_tab[] =
// OBSOLETE {
// OBSOLETE {"AND", BINOP_LOGICAL_AND, PREC_LOGICAL_AND, 0},
// OBSOLETE {"OR", BINOP_LOGICAL_OR, PREC_LOGICAL_OR, 0},
// OBSOLETE {"NOT", UNOP_LOGICAL_NOT, PREC_PREFIX, 0},
// OBSOLETE {"MOD", BINOP_MOD, PREC_MUL, 0},
// OBSOLETE {"REM", BINOP_REM, PREC_MUL, 0},
// OBSOLETE {"SIZE", UNOP_SIZEOF, PREC_BUILTIN_FUNCTION, 0},
// OBSOLETE {"LOWER", UNOP_LOWER, PREC_BUILTIN_FUNCTION, 0},
// OBSOLETE {"UPPER", UNOP_UPPER, PREC_BUILTIN_FUNCTION, 0},
// OBSOLETE {"CARD", UNOP_CARD, PREC_BUILTIN_FUNCTION, 0},
// OBSOLETE {"MAX", UNOP_CHMAX, PREC_BUILTIN_FUNCTION, 0},
// OBSOLETE {"MIN", UNOP_CHMIN, PREC_BUILTIN_FUNCTION, 0},
// OBSOLETE {":=", BINOP_ASSIGN, PREC_ASSIGN, 1},
// OBSOLETE {"=", BINOP_EQUAL, PREC_EQUAL, 0},
// OBSOLETE {"/=", BINOP_NOTEQUAL, PREC_EQUAL, 0},
// OBSOLETE {"<=", BINOP_LEQ, PREC_ORDER, 0},
// OBSOLETE {">=", BINOP_GEQ, PREC_ORDER, 0},
// OBSOLETE {">", BINOP_GTR, PREC_ORDER, 0},
// OBSOLETE {"<", BINOP_LESS, PREC_ORDER, 0},
// OBSOLETE {"+", BINOP_ADD, PREC_ADD, 0},
// OBSOLETE {"-", BINOP_SUB, PREC_ADD, 0},
// OBSOLETE {"*", BINOP_MUL, PREC_MUL, 0},
// OBSOLETE {"/", BINOP_DIV, PREC_MUL, 0},
// OBSOLETE {"//", BINOP_CONCAT, PREC_PREFIX, 0}, /* FIXME: precedence? */
// OBSOLETE {"-", UNOP_NEG, PREC_PREFIX, 0},
// OBSOLETE {"->", UNOP_IND, PREC_SUFFIX, 1},
// OBSOLETE {"->", UNOP_ADDR, PREC_PREFIX, 0},
// OBSOLETE {":", BINOP_RANGE, PREC_ASSIGN, 0},
// OBSOLETE {NULL, 0, 0, 0}
// OBSOLETE };
// OBSOLETE
// OBSOLETE /* The built-in types of Chill. */
// OBSOLETE
// OBSOLETE struct type *builtin_type_chill_bool;
// OBSOLETE struct type *builtin_type_chill_char;
// OBSOLETE struct type *builtin_type_chill_long;
// OBSOLETE struct type *builtin_type_chill_ulong;
// OBSOLETE struct type *builtin_type_chill_real;
// OBSOLETE
// OBSOLETE struct type **const (chill_builtin_types[]) =
// OBSOLETE {
// OBSOLETE &builtin_type_chill_bool,
// OBSOLETE &builtin_type_chill_char,
// OBSOLETE &builtin_type_chill_long,
// OBSOLETE &builtin_type_chill_ulong,
// OBSOLETE &builtin_type_chill_real,
// OBSOLETE 0
// OBSOLETE };
// OBSOLETE
// OBSOLETE /* Calculate LOWER or UPPER of TYPE.
// OBSOLETE Returns the result as an integer.
// OBSOLETE *RESULT_TYPE is the appropriate type for the result. */
// OBSOLETE
// OBSOLETE LONGEST
// OBSOLETE type_lower_upper (enum exp_opcode op, /* Either UNOP_LOWER or UNOP_UPPER */
// OBSOLETE struct type *type, struct type **result_type)
// OBSOLETE {
// OBSOLETE LONGEST low, high;
// OBSOLETE *result_type = type;
// OBSOLETE CHECK_TYPEDEF (type);
// OBSOLETE switch (TYPE_CODE (type))
// OBSOLETE {
// OBSOLETE case TYPE_CODE_STRUCT:
// OBSOLETE *result_type = builtin_type_int;
// OBSOLETE if (chill_varying_type (type))
// OBSOLETE return type_lower_upper (op, TYPE_FIELD_TYPE (type, 1), result_type);
// OBSOLETE break;
// OBSOLETE case TYPE_CODE_ARRAY:
// OBSOLETE case TYPE_CODE_BITSTRING:
// OBSOLETE case TYPE_CODE_STRING:
// OBSOLETE type = TYPE_FIELD_TYPE (type, 0); /* Get index type */
// OBSOLETE
// OBSOLETE /* ... fall through ... */
// OBSOLETE case TYPE_CODE_RANGE:
// OBSOLETE *result_type = TYPE_TARGET_TYPE (type);
// OBSOLETE return op == UNOP_LOWER ? TYPE_LOW_BOUND (type) : TYPE_HIGH_BOUND (type);
// OBSOLETE
// OBSOLETE case TYPE_CODE_ENUM:
// OBSOLETE case TYPE_CODE_BOOL:
// OBSOLETE case TYPE_CODE_INT:
// OBSOLETE case TYPE_CODE_CHAR:
// OBSOLETE if (get_discrete_bounds (type, &low, &high) >= 0)
// OBSOLETE {
// OBSOLETE *result_type = type;
// OBSOLETE return op == UNOP_LOWER ? low : high;
// OBSOLETE }
// OBSOLETE break;
// OBSOLETE case TYPE_CODE_UNDEF:
// OBSOLETE case TYPE_CODE_PTR:
// OBSOLETE case TYPE_CODE_UNION:
// OBSOLETE case TYPE_CODE_FUNC:
// OBSOLETE case TYPE_CODE_FLT:
// OBSOLETE case TYPE_CODE_VOID:
// OBSOLETE case TYPE_CODE_SET:
// OBSOLETE case TYPE_CODE_ERROR:
// OBSOLETE case TYPE_CODE_MEMBER:
// OBSOLETE case TYPE_CODE_METHOD:
// OBSOLETE case TYPE_CODE_REF:
// OBSOLETE case TYPE_CODE_COMPLEX:
// OBSOLETE default:
// OBSOLETE break;
// OBSOLETE }
// OBSOLETE error ("unknown mode for LOWER/UPPER builtin");
// OBSOLETE }
// OBSOLETE
// OBSOLETE static struct value *
// OBSOLETE value_chill_length (struct value *val)
// OBSOLETE {
// OBSOLETE LONGEST tmp;
// OBSOLETE struct type *type = VALUE_TYPE (val);
// OBSOLETE struct type *ttype;
// OBSOLETE CHECK_TYPEDEF (type);
// OBSOLETE switch (TYPE_CODE (type))
// OBSOLETE {
// OBSOLETE case TYPE_CODE_ARRAY:
// OBSOLETE case TYPE_CODE_BITSTRING:
// OBSOLETE case TYPE_CODE_STRING:
// OBSOLETE tmp = type_lower_upper (UNOP_UPPER, type, &ttype)
// OBSOLETE - type_lower_upper (UNOP_LOWER, type, &ttype) + 1;
// OBSOLETE break;
// OBSOLETE case TYPE_CODE_STRUCT:
// OBSOLETE if (chill_varying_type (type))
// OBSOLETE {
// OBSOLETE tmp = unpack_long (TYPE_FIELD_TYPE (type, 0), VALUE_CONTENTS (val));
// OBSOLETE break;
// OBSOLETE }
// OBSOLETE /* ... else fall through ... */
// OBSOLETE default:
// OBSOLETE error ("bad argument to LENGTH builtin");
// OBSOLETE }
// OBSOLETE return value_from_longest (builtin_type_int, tmp);
// OBSOLETE }
// OBSOLETE
// OBSOLETE static struct value *
// OBSOLETE value_chill_card (struct value *val)
// OBSOLETE {
// OBSOLETE LONGEST tmp = 0;
// OBSOLETE struct type *type = VALUE_TYPE (val);
// OBSOLETE CHECK_TYPEDEF (type);
// OBSOLETE
// OBSOLETE if (TYPE_CODE (type) == TYPE_CODE_SET)
// OBSOLETE {
// OBSOLETE struct type *range_type = TYPE_INDEX_TYPE (type);
// OBSOLETE LONGEST lower_bound, upper_bound;
// OBSOLETE int i;
// OBSOLETE
// OBSOLETE get_discrete_bounds (range_type, &lower_bound, &upper_bound);
// OBSOLETE for (i = lower_bound; i <= upper_bound; i++)
// OBSOLETE if (value_bit_index (type, VALUE_CONTENTS (val), i) > 0)
// OBSOLETE tmp++;
// OBSOLETE }
// OBSOLETE else
// OBSOLETE error ("bad argument to CARD builtin");
// OBSOLETE
// OBSOLETE return value_from_longest (builtin_type_int, tmp);
// OBSOLETE }
// OBSOLETE
// OBSOLETE static struct value *
// OBSOLETE value_chill_max_min (enum exp_opcode op, struct value *val)
// OBSOLETE {
// OBSOLETE LONGEST tmp = 0;
// OBSOLETE struct type *type = VALUE_TYPE (val);
// OBSOLETE struct type *elttype;
// OBSOLETE CHECK_TYPEDEF (type);
// OBSOLETE
// OBSOLETE if (TYPE_CODE (type) == TYPE_CODE_SET)
// OBSOLETE {
// OBSOLETE LONGEST lower_bound, upper_bound;
// OBSOLETE int i, empty = 1;
// OBSOLETE
// OBSOLETE elttype = TYPE_INDEX_TYPE (type);
// OBSOLETE CHECK_TYPEDEF (elttype);
// OBSOLETE get_discrete_bounds (elttype, &lower_bound, &upper_bound);
// OBSOLETE
// OBSOLETE if (op == UNOP_CHMAX)
// OBSOLETE {
// OBSOLETE for (i = upper_bound; i >= lower_bound; i--)
// OBSOLETE {
// OBSOLETE if (value_bit_index (type, VALUE_CONTENTS (val), i) > 0)
// OBSOLETE {
// OBSOLETE tmp = i;
// OBSOLETE empty = 0;
// OBSOLETE break;
// OBSOLETE }
// OBSOLETE }
// OBSOLETE }
// OBSOLETE else
// OBSOLETE {
// OBSOLETE for (i = lower_bound; i <= upper_bound; i++)
// OBSOLETE {
// OBSOLETE if (value_bit_index (type, VALUE_CONTENTS (val), i) > 0)
// OBSOLETE {
// OBSOLETE tmp = i;
// OBSOLETE empty = 0;
// OBSOLETE break;
// OBSOLETE }
// OBSOLETE }
// OBSOLETE }
// OBSOLETE if (empty)
// OBSOLETE error ("%s for empty powerset", op == UNOP_CHMAX ? "MAX" : "MIN");
// OBSOLETE }
// OBSOLETE else
// OBSOLETE error ("bad argument to %s builtin", op == UNOP_CHMAX ? "MAX" : "MIN");
// OBSOLETE
// OBSOLETE return value_from_longest (TYPE_CODE (elttype) == TYPE_CODE_RANGE
// OBSOLETE ? TYPE_TARGET_TYPE (elttype)
// OBSOLETE : elttype,
// OBSOLETE tmp);
// OBSOLETE }
// OBSOLETE
// OBSOLETE static struct value *
// OBSOLETE evaluate_subexp_chill (struct type *expect_type,
// OBSOLETE register struct expression *exp, register int *pos,
// OBSOLETE enum noside noside)
// OBSOLETE {
// OBSOLETE int pc = *pos;
// OBSOLETE struct type *type;
// OBSOLETE int tem, nargs;
// OBSOLETE struct value *arg1;
// OBSOLETE struct value **argvec;
// OBSOLETE enum exp_opcode op = exp->elts[*pos].opcode;
// OBSOLETE switch (op)
// OBSOLETE {
// OBSOLETE case MULTI_SUBSCRIPT:
// OBSOLETE if (noside == EVAL_SKIP)
// OBSOLETE break;
// OBSOLETE (*pos) += 3;
// OBSOLETE nargs = longest_to_int (exp->elts[pc + 1].longconst);
// OBSOLETE arg1 = evaluate_subexp_with_coercion (exp, pos, noside);
// OBSOLETE type = check_typedef (VALUE_TYPE (arg1));
// OBSOLETE
// OBSOLETE if (nargs == 1 && TYPE_CODE (type) == TYPE_CODE_INT)
// OBSOLETE {
// OBSOLETE /* Looks like string repetition. */
// OBSOLETE struct value *string = evaluate_subexp_with_coercion (exp, pos,
// OBSOLETE noside);
// OBSOLETE return value_concat (arg1, string);
// OBSOLETE }
// OBSOLETE
// OBSOLETE switch (TYPE_CODE (type))
// OBSOLETE {
// OBSOLETE case TYPE_CODE_PTR:
// OBSOLETE type = check_typedef (TYPE_TARGET_TYPE (type));
// OBSOLETE if (!type || TYPE_CODE (type) != TYPE_CODE_FUNC)
// OBSOLETE error ("reference value used as function");
// OBSOLETE /* ... fall through ... */
// OBSOLETE case TYPE_CODE_FUNC:
// OBSOLETE /* It's a function call. */
// OBSOLETE if (noside == EVAL_AVOID_SIDE_EFFECTS)
// OBSOLETE break;
// OBSOLETE
// OBSOLETE /* Allocate arg vector, including space for the function to be
// OBSOLETE called in argvec[0] and a terminating NULL */
// OBSOLETE argvec = (struct value **) alloca (sizeof (struct value *)
// OBSOLETE * (nargs + 2));
// OBSOLETE argvec[0] = arg1;
// OBSOLETE tem = 1;
// OBSOLETE for (; tem <= nargs && tem <= TYPE_NFIELDS (type); tem++)
// OBSOLETE {
// OBSOLETE argvec[tem]
// OBSOLETE = evaluate_subexp_chill (TYPE_FIELD_TYPE (type, tem - 1),
// OBSOLETE exp, pos, noside);
// OBSOLETE }
// OBSOLETE for (; tem <= nargs; tem++)
// OBSOLETE argvec[tem] = evaluate_subexp_with_coercion (exp, pos, noside);
// OBSOLETE argvec[tem] = 0; /* signal end of arglist */
// OBSOLETE
// OBSOLETE return call_function_by_hand (argvec[0], nargs, argvec + 1);
// OBSOLETE default:
// OBSOLETE break;
// OBSOLETE }
// OBSOLETE
// OBSOLETE while (nargs-- > 0)
// OBSOLETE {
// OBSOLETE struct value *index = evaluate_subexp_with_coercion (exp, pos,
// OBSOLETE noside);
// OBSOLETE arg1 = value_subscript (arg1, index);
// OBSOLETE }
// OBSOLETE return (arg1);
// OBSOLETE
// OBSOLETE case UNOP_LOWER:
// OBSOLETE case UNOP_UPPER:
// OBSOLETE (*pos)++;
// OBSOLETE if (noside == EVAL_SKIP)
// OBSOLETE {
// OBSOLETE (*exp->language_defn->evaluate_exp) (NULL_TYPE, exp, pos, EVAL_SKIP);
// OBSOLETE goto nosideret;
// OBSOLETE }
// OBSOLETE arg1 = (*exp->language_defn->evaluate_exp) (NULL_TYPE, exp, pos,
// OBSOLETE EVAL_AVOID_SIDE_EFFECTS);
// OBSOLETE tem = type_lower_upper (op, VALUE_TYPE (arg1), &type);
// OBSOLETE return value_from_longest (type, tem);
// OBSOLETE
// OBSOLETE case UNOP_LENGTH:
// OBSOLETE (*pos)++;
// OBSOLETE arg1 = (*exp->language_defn->evaluate_exp) (NULL_TYPE, exp, pos, noside);
// OBSOLETE return value_chill_length (arg1);
// OBSOLETE
// OBSOLETE case UNOP_CARD:
// OBSOLETE (*pos)++;
// OBSOLETE arg1 = (*exp->language_defn->evaluate_exp) (NULL_TYPE, exp, pos, noside);
// OBSOLETE return value_chill_card (arg1);
// OBSOLETE
// OBSOLETE case UNOP_CHMAX:
// OBSOLETE case UNOP_CHMIN:
// OBSOLETE (*pos)++;
// OBSOLETE arg1 = (*exp->language_defn->evaluate_exp) (NULL_TYPE, exp, pos, noside);
// OBSOLETE return value_chill_max_min (op, arg1);
// OBSOLETE
// OBSOLETE case BINOP_COMMA:
// OBSOLETE error ("',' operator used in invalid context");
// OBSOLETE
// OBSOLETE default:
// OBSOLETE break;
// OBSOLETE }
// OBSOLETE
// OBSOLETE return evaluate_subexp_standard (expect_type, exp, pos, noside);
// OBSOLETE nosideret:
// OBSOLETE return value_from_longest (builtin_type_long, (LONGEST) 1);
// OBSOLETE }
// OBSOLETE
// OBSOLETE const struct language_defn chill_language_defn =
// OBSOLETE {
// OBSOLETE "chill",
// OBSOLETE language_chill,
// OBSOLETE chill_builtin_types,
// OBSOLETE range_check_on,
// OBSOLETE type_check_on,
// OBSOLETE case_sensitive_on,
// OBSOLETE chill_parse, /* parser */
// OBSOLETE chill_error, /* parser error function */
// OBSOLETE evaluate_subexp_chill,
// OBSOLETE chill_printchar, /* print a character constant */
// OBSOLETE chill_printstr, /* function to print a string constant */
// OBSOLETE NULL, /* Function to print a single char */
// OBSOLETE chill_create_fundamental_type, /* Create fundamental type in this language */
// OBSOLETE chill_print_type, /* Print a type using appropriate syntax */
// OBSOLETE chill_val_print, /* Print a value using appropriate syntax */
// OBSOLETE chill_value_print, /* Print a top-levl value */
// OBSOLETE {"", "B'", "", ""}, /* Binary format info */
// OBSOLETE {"O'%lo", "O'", "o", ""}, /* Octal format info */
// OBSOLETE {"D'%ld", "D'", "d", ""}, /* Decimal format info */
// OBSOLETE {"H'%lx", "H'", "x", ""}, /* Hex format info */
// OBSOLETE chill_op_print_tab, /* expression operators for printing */
// OBSOLETE 0, /* arrays are first-class (not c-style) */
// OBSOLETE 0, /* String lower bound */
// OBSOLETE &builtin_type_chill_char, /* Type of string elements */
// OBSOLETE LANG_MAGIC
// OBSOLETE };
// OBSOLETE
// OBSOLETE /* Initialization for Chill */
// OBSOLETE
// OBSOLETE void
// OBSOLETE _initialize_chill_language (void)
// OBSOLETE {
// OBSOLETE builtin_type_chill_bool =
// OBSOLETE init_type (TYPE_CODE_BOOL, TARGET_CHAR_BIT / TARGET_CHAR_BIT,
// OBSOLETE TYPE_FLAG_UNSIGNED,
// OBSOLETE "BOOL", (struct objfile *) NULL);
// OBSOLETE builtin_type_chill_char =
// OBSOLETE init_type (TYPE_CODE_CHAR, TARGET_CHAR_BIT / TARGET_CHAR_BIT,
// OBSOLETE TYPE_FLAG_UNSIGNED,
// OBSOLETE "CHAR", (struct objfile *) NULL);
// OBSOLETE builtin_type_chill_long =
// OBSOLETE init_type (TYPE_CODE_INT, TARGET_LONG_BIT / TARGET_CHAR_BIT,
// OBSOLETE 0,
// OBSOLETE "LONG", (struct objfile *) NULL);
// OBSOLETE builtin_type_chill_ulong =
// OBSOLETE init_type (TYPE_CODE_INT, TARGET_LONG_BIT / TARGET_CHAR_BIT,
// OBSOLETE TYPE_FLAG_UNSIGNED,
// OBSOLETE "ULONG", (struct objfile *) NULL);
// OBSOLETE builtin_type_chill_real =
// OBSOLETE init_type (TYPE_CODE_FLT, TARGET_DOUBLE_BIT / TARGET_CHAR_BIT,
// OBSOLETE 0,
// OBSOLETE "LONG_REAL", (struct objfile *) NULL);
// OBSOLETE
// OBSOLETE add_language (&chill_language_defn);
// OBSOLETE }

View file

@ -1,41 +0,0 @@
// OBSOLETE /* Chill language support definitions for GDB, the GNU debugger.
// OBSOLETE Copyright 1992, 1994, 1996, 1998, 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 /* Forward decls for prototypes */
// OBSOLETE struct value;
// OBSOLETE
// OBSOLETE extern int chill_parse (void); /* Defined in ch-exp.y */
// OBSOLETE
// OBSOLETE extern void chill_error (char *); /* Defined in ch-exp.y */
// OBSOLETE
// OBSOLETE /* Defined in ch-typeprint.c */
// OBSOLETE extern void chill_print_type (struct type *, char *, struct ui_file *, int,
// OBSOLETE int);
// OBSOLETE
// OBSOLETE extern int chill_val_print (struct type *, char *, int, CORE_ADDR,
// OBSOLETE struct ui_file *, int, int, int,
// OBSOLETE enum val_prettyprint);
// OBSOLETE
// OBSOLETE extern int chill_value_print (struct value *, struct ui_file *,
// OBSOLETE int, enum val_prettyprint);
// OBSOLETE
// OBSOLETE extern LONGEST
// OBSOLETE type_lower_upper (enum exp_opcode, struct type *, struct type **);

View file

@ -1,340 +0,0 @@
// OBSOLETE /* Support for printing Chill types for GDB, the GNU debugger.
// OBSOLETE Copyright 1986, 1988, 1989, 1991, 1992, 1993, 1994, 1995, 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 "defs.h"
// OBSOLETE #include "gdb_obstack.h"
// OBSOLETE #include "bfd.h" /* Binary File Description */
// OBSOLETE #include "symtab.h"
// OBSOLETE #include "gdbtypes.h"
// OBSOLETE #include "expression.h"
// OBSOLETE #include "value.h"
// OBSOLETE #include "gdbcore.h"
// OBSOLETE #include "target.h"
// OBSOLETE #include "language.h"
// OBSOLETE #include "ch-lang.h"
// OBSOLETE #include "typeprint.h"
// OBSOLETE
// OBSOLETE #include "gdb_string.h"
// OBSOLETE #include <errno.h>
// OBSOLETE
// OBSOLETE static void chill_type_print_base (struct type *, struct ui_file *, int, int);
// OBSOLETE
// OBSOLETE void
// OBSOLETE chill_print_type (struct type *type, char *varstring, struct ui_file *stream,
// OBSOLETE int show, int level)
// OBSOLETE {
// OBSOLETE if (varstring != NULL && *varstring != '\0')
// OBSOLETE {
// OBSOLETE fputs_filtered (varstring, stream);
// OBSOLETE fputs_filtered (" ", stream);
// OBSOLETE }
// OBSOLETE chill_type_print_base (type, stream, show, level);
// OBSOLETE }
// OBSOLETE
// OBSOLETE /* Print the name of the type (or the ultimate pointer target,
// OBSOLETE function value or array element).
// OBSOLETE
// OBSOLETE SHOW nonzero means don't print this type as just its name;
// OBSOLETE show its real definition even if it has a name.
// OBSOLETE SHOW zero means print just typename or tag if there is one
// OBSOLETE SHOW negative means abbreviate structure elements.
// OBSOLETE SHOW is decremented for printing of structure elements.
// OBSOLETE
// OBSOLETE LEVEL is the depth to indent by.
// OBSOLETE We increase it for some recursive calls. */
// OBSOLETE
// OBSOLETE static void
// OBSOLETE chill_type_print_base (struct type *type, struct ui_file *stream, int show,
// OBSOLETE int level)
// OBSOLETE {
// OBSOLETE register int len;
// OBSOLETE register int i;
// OBSOLETE struct type *index_type;
// OBSOLETE struct type *range_type;
// OBSOLETE LONGEST low_bound;
// OBSOLETE LONGEST high_bound;
// OBSOLETE
// OBSOLETE QUIT;
// OBSOLETE
// OBSOLETE wrap_here (" ");
// OBSOLETE if (type == NULL)
// OBSOLETE {
// OBSOLETE fputs_filtered ("<type unknown>", stream);
// OBSOLETE return;
// OBSOLETE }
// OBSOLETE
// OBSOLETE /* When SHOW is zero or less, and there is a valid type name, then always
// OBSOLETE just print the type name directly from the type. */
// OBSOLETE
// OBSOLETE if ((show <= 0) && (TYPE_NAME (type) != NULL))
// OBSOLETE {
// OBSOLETE fputs_filtered (TYPE_NAME (type), stream);
// OBSOLETE return;
// OBSOLETE }
// OBSOLETE
// OBSOLETE if (TYPE_CODE (type) != TYPE_CODE_TYPEDEF)
// OBSOLETE CHECK_TYPEDEF (type);
// OBSOLETE
// OBSOLETE switch (TYPE_CODE (type))
// OBSOLETE {
// OBSOLETE case TYPE_CODE_TYPEDEF:
// OBSOLETE chill_type_print_base (TYPE_TARGET_TYPE (type), stream, 0, level);
// OBSOLETE break;
// OBSOLETE case TYPE_CODE_PTR:
// OBSOLETE if (TYPE_CODE (TYPE_TARGET_TYPE (type)) == TYPE_CODE_VOID)
// OBSOLETE {
// OBSOLETE fprintf_filtered (stream,
// OBSOLETE TYPE_NAME (type) ? TYPE_NAME (type) : "PTR");
// OBSOLETE break;
// OBSOLETE }
// OBSOLETE fprintf_filtered (stream, "REF ");
// OBSOLETE chill_type_print_base (TYPE_TARGET_TYPE (type), stream, 0, level);
// OBSOLETE break;
// OBSOLETE
// OBSOLETE case TYPE_CODE_BOOL:
// OBSOLETE /* FIXME: we should probably just print the TYPE_NAME, in case
// OBSOLETE anyone ever fixes the compiler to give us the real names
// OBSOLETE in the presence of the chill equivalent of typedef (assuming
// OBSOLETE there is one). */
// OBSOLETE fprintf_filtered (stream,
// OBSOLETE TYPE_NAME (type) ? TYPE_NAME (type) : "BOOL");
// OBSOLETE break;
// OBSOLETE
// OBSOLETE case TYPE_CODE_ARRAY:
// OBSOLETE fputs_filtered ("ARRAY (", stream);
// OBSOLETE range_type = TYPE_FIELD_TYPE (type, 0);
// OBSOLETE if (TYPE_CODE (range_type) != TYPE_CODE_RANGE)
// OBSOLETE chill_print_type (range_type, "", stream, 0, level);
// OBSOLETE else
// OBSOLETE {
// OBSOLETE index_type = TYPE_TARGET_TYPE (range_type);
// OBSOLETE low_bound = TYPE_FIELD_BITPOS (range_type, 0);
// OBSOLETE high_bound = TYPE_FIELD_BITPOS (range_type, 1);
// OBSOLETE print_type_scalar (index_type, low_bound, stream);
// OBSOLETE fputs_filtered (":", stream);
// OBSOLETE print_type_scalar (index_type, high_bound, stream);
// OBSOLETE }
// OBSOLETE fputs_filtered (") ", stream);
// OBSOLETE chill_print_type (TYPE_TARGET_TYPE (type), "", stream, 0, level);
// OBSOLETE break;
// OBSOLETE
// OBSOLETE case TYPE_CODE_BITSTRING:
// OBSOLETE fprintf_filtered (stream, "BOOLS (%d)",
// OBSOLETE TYPE_FIELD_BITPOS (TYPE_FIELD_TYPE (type, 0), 1) + 1);
// OBSOLETE break;
// OBSOLETE
// OBSOLETE case TYPE_CODE_SET:
// OBSOLETE fputs_filtered ("POWERSET ", stream);
// OBSOLETE chill_print_type (TYPE_INDEX_TYPE (type), "", stream,
// OBSOLETE show - 1, level);
// OBSOLETE break;
// OBSOLETE
// OBSOLETE case TYPE_CODE_STRING:
// OBSOLETE range_type = TYPE_FIELD_TYPE (type, 0);
// OBSOLETE index_type = TYPE_TARGET_TYPE (range_type);
// OBSOLETE high_bound = TYPE_FIELD_BITPOS (range_type, 1);
// OBSOLETE fputs_filtered ("CHARS (", stream);
// OBSOLETE print_type_scalar (index_type, high_bound + 1, stream);
// OBSOLETE fputs_filtered (")", stream);
// OBSOLETE break;
// OBSOLETE
// OBSOLETE case TYPE_CODE_MEMBER:
// OBSOLETE fprintf_filtered (stream, "MEMBER ");
// OBSOLETE chill_type_print_base (TYPE_TARGET_TYPE (type), stream, 0, level);
// OBSOLETE break;
// OBSOLETE case TYPE_CODE_REF:
// OBSOLETE fprintf_filtered (stream, "/*LOC*/ ");
// OBSOLETE chill_type_print_base (TYPE_TARGET_TYPE (type), stream, show, level);
// OBSOLETE break;
// OBSOLETE case TYPE_CODE_FUNC:
// OBSOLETE fprintf_filtered (stream, "PROC (");
// OBSOLETE len = TYPE_NFIELDS (type);
// OBSOLETE for (i = 0; i < len; i++)
// OBSOLETE {
// OBSOLETE struct type *param_type = TYPE_FIELD_TYPE (type, i);
// OBSOLETE if (i > 0)
// OBSOLETE {
// OBSOLETE fputs_filtered (", ", stream);
// OBSOLETE wrap_here (" ");
// OBSOLETE }
// OBSOLETE if (TYPE_CODE (param_type) == TYPE_CODE_REF)
// OBSOLETE {
// OBSOLETE chill_type_print_base (TYPE_TARGET_TYPE (param_type),
// OBSOLETE stream, 0, level);
// OBSOLETE fputs_filtered (" LOC", stream);
// OBSOLETE }
// OBSOLETE else
// OBSOLETE chill_type_print_base (param_type, stream, show, level);
// OBSOLETE }
// OBSOLETE fprintf_filtered (stream, ")");
// OBSOLETE if (TYPE_CODE (TYPE_TARGET_TYPE (type)) != TYPE_CODE_VOID)
// OBSOLETE {
// OBSOLETE fputs_filtered (" RETURNS (", stream);
// OBSOLETE chill_type_print_base (TYPE_TARGET_TYPE (type), stream, 0, level);
// OBSOLETE fputs_filtered (")", stream);
// OBSOLETE }
// OBSOLETE break;
// OBSOLETE
// OBSOLETE case TYPE_CODE_STRUCT:
// OBSOLETE if (chill_varying_type (type))
// OBSOLETE {
// OBSOLETE chill_type_print_base (TYPE_FIELD_TYPE (type, 1),
// OBSOLETE stream, 0, level);
// OBSOLETE fputs_filtered (" VARYING", stream);
// OBSOLETE }
// OBSOLETE else
// OBSOLETE {
// OBSOLETE fprintf_filtered (stream, "STRUCT ");
// OBSOLETE
// OBSOLETE fprintf_filtered (stream, "(\n");
// OBSOLETE if ((TYPE_NFIELDS (type) == 0) && (TYPE_NFN_FIELDS (type) == 0))
// OBSOLETE {
// OBSOLETE if (TYPE_STUB (type))
// OBSOLETE {
// OBSOLETE fprintfi_filtered (level + 4, stream, "<incomplete type>\n");
// OBSOLETE }
// OBSOLETE else
// OBSOLETE {
// OBSOLETE fprintfi_filtered (level + 4, stream, "<no data fields>\n");
// OBSOLETE }
// OBSOLETE }
// OBSOLETE else
// OBSOLETE {
// OBSOLETE len = TYPE_NFIELDS (type);
// OBSOLETE for (i = TYPE_N_BASECLASSES (type); i < len; i++)
// OBSOLETE {
// OBSOLETE struct type *field_type = TYPE_FIELD_TYPE (type, i);
// OBSOLETE QUIT;
// OBSOLETE print_spaces_filtered (level + 4, stream);
// OBSOLETE if (TYPE_CODE (field_type) == TYPE_CODE_UNION)
// OBSOLETE {
// OBSOLETE int j; /* variant number */
// OBSOLETE fputs_filtered ("CASE OF\n", stream);
// OBSOLETE for (j = 0; j < TYPE_NFIELDS (field_type); j++)
// OBSOLETE {
// OBSOLETE int k; /* variant field index */
// OBSOLETE struct type *variant_type
// OBSOLETE = TYPE_FIELD_TYPE (field_type, j);
// OBSOLETE int var_len = TYPE_NFIELDS (variant_type);
// OBSOLETE print_spaces_filtered (level + 4, stream);
// OBSOLETE if (strcmp (TYPE_FIELD_NAME (field_type, j),
// OBSOLETE "else") == 0)
// OBSOLETE fputs_filtered ("ELSE\n", stream);
// OBSOLETE else
// OBSOLETE fputs_filtered (":\n", stream);
// OBSOLETE if (TYPE_CODE (variant_type) != TYPE_CODE_STRUCT)
// OBSOLETE error ("variant record confusion");
// OBSOLETE for (k = 0; k < var_len; k++)
// OBSOLETE {
// OBSOLETE print_spaces_filtered (level + 8, stream);
// OBSOLETE chill_print_type (TYPE_FIELD_TYPE (variant_type, k),
// OBSOLETE TYPE_FIELD_NAME (variant_type, k),
// OBSOLETE stream, show - 1, level + 8);
// OBSOLETE if (k < (var_len - 1))
// OBSOLETE fputs_filtered (",", stream);
// OBSOLETE fputs_filtered ("\n", stream);
// OBSOLETE }
// OBSOLETE }
// OBSOLETE print_spaces_filtered (level + 4, stream);
// OBSOLETE fputs_filtered ("ESAC", stream);
// OBSOLETE }
// OBSOLETE else
// OBSOLETE chill_print_type (field_type,
// OBSOLETE TYPE_FIELD_NAME (type, i),
// OBSOLETE stream, show - 1, level + 4);
// OBSOLETE if (i < (len - 1))
// OBSOLETE {
// OBSOLETE fputs_filtered (",", stream);
// OBSOLETE }
// OBSOLETE fputs_filtered ("\n", stream);
// OBSOLETE }
// OBSOLETE }
// OBSOLETE fprintfi_filtered (level, stream, ")");
// OBSOLETE }
// OBSOLETE break;
// OBSOLETE
// OBSOLETE case TYPE_CODE_RANGE:
// OBSOLETE {
// OBSOLETE struct type *target = TYPE_TARGET_TYPE (type);
// OBSOLETE if (target && TYPE_NAME (target))
// OBSOLETE fputs_filtered (TYPE_NAME (target), stream);
// OBSOLETE else
// OBSOLETE fputs_filtered ("RANGE", stream);
// OBSOLETE if (target == NULL)
// OBSOLETE target = builtin_type_long;
// OBSOLETE fputs_filtered (" (", stream);
// OBSOLETE print_type_scalar (target, TYPE_LOW_BOUND (type), stream);
// OBSOLETE fputs_filtered (":", stream);
// OBSOLETE print_type_scalar (target, TYPE_HIGH_BOUND (type), stream);
// OBSOLETE fputs_filtered (")", stream);
// OBSOLETE }
// OBSOLETE break;
// OBSOLETE
// OBSOLETE case TYPE_CODE_ENUM:
// OBSOLETE {
// OBSOLETE register int lastval = 0;
// OBSOLETE fprintf_filtered (stream, "SET (");
// OBSOLETE len = TYPE_NFIELDS (type);
// OBSOLETE for (i = 0; i < len; i++)
// OBSOLETE {
// OBSOLETE QUIT;
// OBSOLETE if (i)
// OBSOLETE fprintf_filtered (stream, ", ");
// OBSOLETE wrap_here (" ");
// OBSOLETE fputs_filtered (TYPE_FIELD_NAME (type, i), stream);
// OBSOLETE if (lastval != TYPE_FIELD_BITPOS (type, i))
// OBSOLETE {
// OBSOLETE fprintf_filtered (stream, " = %d", TYPE_FIELD_BITPOS (type, i));
// OBSOLETE lastval = TYPE_FIELD_BITPOS (type, i);
// OBSOLETE }
// OBSOLETE lastval++;
// OBSOLETE }
// OBSOLETE fprintf_filtered (stream, ")");
// OBSOLETE }
// OBSOLETE break;
// OBSOLETE
// OBSOLETE case TYPE_CODE_VOID:
// OBSOLETE case TYPE_CODE_UNDEF:
// OBSOLETE case TYPE_CODE_ERROR:
// OBSOLETE case TYPE_CODE_UNION:
// OBSOLETE case TYPE_CODE_METHOD:
// OBSOLETE error ("missing language support in chill_type_print_base");
// OBSOLETE break;
// OBSOLETE
// OBSOLETE default:
// OBSOLETE
// OBSOLETE /* Handle types not explicitly handled by the other cases,
// OBSOLETE such as fundamental types. For these, just print whatever
// OBSOLETE the type name is, as recorded in the type itself. If there
// OBSOLETE is no type name, then complain. */
// OBSOLETE
// OBSOLETE if (TYPE_NAME (type) != NULL)
// OBSOLETE {
// OBSOLETE fputs_filtered (TYPE_NAME (type), stream);
// OBSOLETE }
// OBSOLETE else
// OBSOLETE {
// OBSOLETE error ("Unrecognized type code (%d) in symbol table.",
// OBSOLETE TYPE_CODE (type));
// OBSOLETE }
// OBSOLETE break;
// OBSOLETE }
// OBSOLETE }

View file

@ -1,605 +0,0 @@
// OBSOLETE /* Support for printing Chill values for GDB, the GNU debugger.
// OBSOLETE Copyright 1986, 1988, 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
// OBSOLETE 1998, 2000, 2001
// 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 "defs.h"
// OBSOLETE #include "gdb_obstack.h"
// OBSOLETE #include "symtab.h"
// OBSOLETE #include "gdbtypes.h"
// OBSOLETE #include "valprint.h"
// OBSOLETE #include "expression.h"
// OBSOLETE #include "value.h"
// OBSOLETE #include "language.h"
// OBSOLETE #include "demangle.h"
// OBSOLETE #include "c-lang.h" /* For c_val_print */
// OBSOLETE #include "typeprint.h"
// OBSOLETE #include "ch-lang.h"
// OBSOLETE #include "annotate.h"
// OBSOLETE
// OBSOLETE static void chill_print_value_fields (struct type *, char *,
// OBSOLETE struct ui_file *, int, int,
// OBSOLETE enum val_prettyprint, struct type **);
// OBSOLETE
// OBSOLETE static void chill_print_type_scalar (struct type *, LONGEST,
// OBSOLETE struct ui_file *);
// OBSOLETE
// OBSOLETE static void chill_val_print_array_elements (struct type *, char *,
// OBSOLETE CORE_ADDR, struct ui_file *,
// OBSOLETE int, int, int,
// OBSOLETE enum val_prettyprint);
// OBSOLETE
// OBSOLETE
// OBSOLETE /* Print integral scalar data VAL, of type TYPE, onto stdio stream STREAM.
// OBSOLETE Used to print data from type structures in a specified type. For example,
// OBSOLETE array bounds may be characters or booleans in some languages, and this
// OBSOLETE allows the ranges to be printed in their "natural" form rather than as
// OBSOLETE decimal integer values. */
// OBSOLETE
// OBSOLETE static void
// OBSOLETE chill_print_type_scalar (struct type *type, LONGEST val, struct ui_file *stream)
// OBSOLETE {
// OBSOLETE switch (TYPE_CODE (type))
// OBSOLETE {
// OBSOLETE case TYPE_CODE_RANGE:
// OBSOLETE if (TYPE_TARGET_TYPE (type))
// OBSOLETE {
// OBSOLETE chill_print_type_scalar (TYPE_TARGET_TYPE (type), val, stream);
// OBSOLETE return;
// OBSOLETE }
// OBSOLETE break;
// OBSOLETE case TYPE_CODE_UNDEF:
// OBSOLETE case TYPE_CODE_PTR:
// OBSOLETE case TYPE_CODE_ARRAY:
// OBSOLETE case TYPE_CODE_STRUCT:
// OBSOLETE case TYPE_CODE_UNION:
// OBSOLETE case TYPE_CODE_ENUM:
// OBSOLETE case TYPE_CODE_FUNC:
// OBSOLETE case TYPE_CODE_INT:
// OBSOLETE case TYPE_CODE_FLT:
// OBSOLETE case TYPE_CODE_VOID:
// OBSOLETE case TYPE_CODE_SET:
// OBSOLETE case TYPE_CODE_STRING:
// OBSOLETE case TYPE_CODE_BITSTRING:
// OBSOLETE case TYPE_CODE_ERROR:
// OBSOLETE case TYPE_CODE_MEMBER:
// OBSOLETE case TYPE_CODE_METHOD:
// OBSOLETE case TYPE_CODE_REF:
// OBSOLETE case TYPE_CODE_CHAR:
// OBSOLETE case TYPE_CODE_BOOL:
// OBSOLETE case TYPE_CODE_COMPLEX:
// OBSOLETE case TYPE_CODE_TYPEDEF:
// OBSOLETE default:
// OBSOLETE break;
// OBSOLETE }
// OBSOLETE print_type_scalar (type, val, stream);
// OBSOLETE }
// OBSOLETE
// OBSOLETE /* Print the elements of an array.
// OBSOLETE Similar to val_print_array_elements, but prints
// OBSOLETE element indexes (in Chill syntax). */
// OBSOLETE
// OBSOLETE static void
// OBSOLETE chill_val_print_array_elements (struct type *type, char *valaddr,
// OBSOLETE CORE_ADDR address, struct ui_file *stream,
// OBSOLETE int format, int deref_ref, int recurse,
// OBSOLETE enum val_prettyprint pretty)
// OBSOLETE {
// OBSOLETE unsigned int i = 0;
// OBSOLETE unsigned int things_printed = 0;
// OBSOLETE unsigned len;
// OBSOLETE struct type *elttype;
// OBSOLETE struct type *range_type = TYPE_FIELD_TYPE (type, 0);
// OBSOLETE struct type *index_type = TYPE_TARGET_TYPE (range_type);
// OBSOLETE unsigned eltlen;
// OBSOLETE /* Position of the array element we are examining to see
// OBSOLETE whether it is repeated. */
// OBSOLETE unsigned int rep1;
// OBSOLETE /* Number of repetitions we have detected so far. */
// OBSOLETE unsigned int reps;
// OBSOLETE LONGEST low_bound = TYPE_FIELD_BITPOS (range_type, 0);
// OBSOLETE
// OBSOLETE elttype = check_typedef (TYPE_TARGET_TYPE (type));
// OBSOLETE eltlen = TYPE_LENGTH (elttype);
// OBSOLETE len = TYPE_LENGTH (type) / eltlen;
// OBSOLETE
// OBSOLETE annotate_array_section_begin (i, elttype);
// OBSOLETE
// OBSOLETE for (; i < len && things_printed < print_max; i++)
// OBSOLETE {
// OBSOLETE if (i != 0)
// OBSOLETE {
// OBSOLETE if (prettyprint_arrays)
// OBSOLETE {
// OBSOLETE fprintf_filtered (stream, ",\n");
// OBSOLETE print_spaces_filtered (2 + 2 * recurse, stream);
// OBSOLETE }
// OBSOLETE else
// OBSOLETE {
// OBSOLETE fprintf_filtered (stream, ", ");
// OBSOLETE }
// OBSOLETE }
// OBSOLETE wrap_here (n_spaces (2 + 2 * recurse));
// OBSOLETE
// OBSOLETE rep1 = i + 1;
// OBSOLETE reps = 1;
// OBSOLETE while ((rep1 < len) &&
// OBSOLETE !memcmp (valaddr + i * eltlen, valaddr + rep1 * eltlen, eltlen))
// OBSOLETE {
// OBSOLETE ++reps;
// OBSOLETE ++rep1;
// OBSOLETE }
// OBSOLETE
// OBSOLETE fputs_filtered ("(", stream);
// OBSOLETE chill_print_type_scalar (index_type, low_bound + i, stream);
// OBSOLETE if (reps > 1)
// OBSOLETE {
// OBSOLETE fputs_filtered (":", stream);
// OBSOLETE chill_print_type_scalar (index_type, low_bound + i + reps - 1,
// OBSOLETE stream);
// OBSOLETE fputs_filtered ("): ", stream);
// OBSOLETE val_print (elttype, valaddr + i * eltlen, 0, 0, stream, format,
// OBSOLETE deref_ref, recurse + 1, pretty);
// OBSOLETE
// OBSOLETE i = rep1 - 1;
// OBSOLETE things_printed += 1;
// OBSOLETE }
// OBSOLETE else
// OBSOLETE {
// OBSOLETE fputs_filtered ("): ", stream);
// OBSOLETE val_print (elttype, valaddr + i * eltlen, 0, 0, stream, format,
// OBSOLETE deref_ref, recurse + 1, pretty);
// OBSOLETE annotate_elt ();
// OBSOLETE things_printed++;
// OBSOLETE }
// OBSOLETE }
// OBSOLETE annotate_array_section_end ();
// OBSOLETE if (i < len)
// OBSOLETE {
// OBSOLETE fprintf_filtered (stream, "...");
// OBSOLETE }
// OBSOLETE }
// OBSOLETE
// OBSOLETE /* Print data of type TYPE located at VALADDR (within GDB), which came from
// OBSOLETE the inferior at address ADDRESS, onto stdio stream STREAM according to
// OBSOLETE FORMAT (a letter or 0 for natural format). The data at VALADDR is in
// OBSOLETE target byte order.
// OBSOLETE
// OBSOLETE If the data are a string pointer, returns the number of string characters
// OBSOLETE printed.
// OBSOLETE
// OBSOLETE If DEREF_REF is nonzero, then dereference references, otherwise just print
// OBSOLETE them like pointers.
// OBSOLETE
// OBSOLETE The PRETTY parameter controls prettyprinting. */
// OBSOLETE
// OBSOLETE int
// OBSOLETE chill_val_print (struct type *type, char *valaddr, int embedded_offset,
// OBSOLETE CORE_ADDR address, struct ui_file *stream, int format,
// OBSOLETE int deref_ref, int recurse, enum val_prettyprint pretty)
// OBSOLETE {
// OBSOLETE LONGEST val;
// OBSOLETE unsigned int i = 0; /* Number of characters printed. */
// OBSOLETE struct type *elttype;
// OBSOLETE CORE_ADDR addr;
// OBSOLETE
// OBSOLETE CHECK_TYPEDEF (type);
// OBSOLETE
// OBSOLETE switch (TYPE_CODE (type))
// OBSOLETE {
// OBSOLETE case TYPE_CODE_ARRAY:
// OBSOLETE if (TYPE_LENGTH (type) > 0 && TYPE_LENGTH (TYPE_TARGET_TYPE (type)) > 0)
// OBSOLETE {
// OBSOLETE if (prettyprint_arrays)
// OBSOLETE {
// OBSOLETE print_spaces_filtered (2 + 2 * recurse, stream);
// OBSOLETE }
// OBSOLETE fprintf_filtered (stream, "[");
// OBSOLETE chill_val_print_array_elements (type, valaddr, address, stream,
// OBSOLETE format, deref_ref, recurse, pretty);
// OBSOLETE fprintf_filtered (stream, "]");
// OBSOLETE }
// OBSOLETE else
// OBSOLETE {
// OBSOLETE error ("unimplemented in chill_val_print; unspecified array length");
// OBSOLETE }
// OBSOLETE break;
// OBSOLETE
// OBSOLETE case TYPE_CODE_INT:
// OBSOLETE format = format ? format : output_format;
// OBSOLETE if (format)
// OBSOLETE {
// OBSOLETE print_scalar_formatted (valaddr, type, format, 0, stream);
// OBSOLETE }
// OBSOLETE else
// OBSOLETE {
// OBSOLETE val_print_type_code_int (type, valaddr, stream);
// OBSOLETE }
// OBSOLETE break;
// OBSOLETE
// OBSOLETE case TYPE_CODE_CHAR:
// OBSOLETE format = format ? format : output_format;
// OBSOLETE if (format)
// OBSOLETE {
// OBSOLETE print_scalar_formatted (valaddr, type, format, 0, stream);
// OBSOLETE }
// OBSOLETE else
// OBSOLETE {
// OBSOLETE LA_PRINT_CHAR ((unsigned char) unpack_long (type, valaddr),
// OBSOLETE stream);
// OBSOLETE }
// OBSOLETE break;
// OBSOLETE
// OBSOLETE case TYPE_CODE_FLT:
// OBSOLETE if (format)
// OBSOLETE {
// OBSOLETE print_scalar_formatted (valaddr, type, format, 0, stream);
// OBSOLETE }
// OBSOLETE else
// OBSOLETE {
// OBSOLETE print_floating (valaddr, type, stream);
// OBSOLETE }
// OBSOLETE break;
// OBSOLETE
// OBSOLETE case TYPE_CODE_BOOL:
// OBSOLETE format = format ? format : output_format;
// OBSOLETE if (format)
// OBSOLETE {
// OBSOLETE print_scalar_formatted (valaddr, type, format, 0, stream);
// OBSOLETE }
// OBSOLETE else
// OBSOLETE {
// OBSOLETE /* FIXME: Why is this using builtin_type_chill_bool not type? */
// OBSOLETE val = unpack_long (builtin_type_chill_bool, valaddr);
// OBSOLETE fprintf_filtered (stream, val ? "TRUE" : "FALSE");
// OBSOLETE }
// OBSOLETE break;
// OBSOLETE
// OBSOLETE case TYPE_CODE_UNDEF:
// OBSOLETE /* This happens (without TYPE_FLAG_STUB set) on systems which don't use
// OBSOLETE dbx xrefs (NO_DBX_XREFS in gcc) if a file has a "struct foo *bar"
// OBSOLETE and no complete type for struct foo in that file. */
// OBSOLETE fprintf_filtered (stream, "<incomplete type>");
// OBSOLETE break;
// OBSOLETE
// OBSOLETE case TYPE_CODE_PTR:
// OBSOLETE if (format && format != 's')
// OBSOLETE {
// OBSOLETE print_scalar_formatted (valaddr, type, format, 0, stream);
// OBSOLETE break;
// OBSOLETE }
// OBSOLETE addr = unpack_pointer (type, valaddr);
// OBSOLETE elttype = check_typedef (TYPE_TARGET_TYPE (type));
// OBSOLETE
// OBSOLETE /* We assume a NULL pointer is all zeros ... */
// OBSOLETE if (addr == 0)
// OBSOLETE {
// OBSOLETE fputs_filtered ("NULL", stream);
// OBSOLETE return 0;
// OBSOLETE }
// OBSOLETE
// OBSOLETE if (TYPE_CODE (elttype) == TYPE_CODE_FUNC)
// OBSOLETE {
// OBSOLETE /* Try to print what function it points to. */
// OBSOLETE print_address_demangle (addr, stream, demangle);
// OBSOLETE /* Return value is irrelevant except for string pointers. */
// OBSOLETE return (0);
// OBSOLETE }
// OBSOLETE if (addressprint && format != 's')
// OBSOLETE {
// OBSOLETE print_address_numeric (addr, 1, stream);
// OBSOLETE }
// OBSOLETE
// OBSOLETE /* For a pointer to char or unsigned char, also print the string
// OBSOLETE pointed to, unless pointer is null. */
// OBSOLETE if (TYPE_LENGTH (elttype) == 1
// OBSOLETE && TYPE_CODE (elttype) == TYPE_CODE_CHAR
// OBSOLETE && (format == 0 || format == 's')
// OBSOLETE && addr != 0
// OBSOLETE && /* If print_max is UINT_MAX, the alloca below will fail.
// OBSOLETE In that case don't try to print the string. */
// OBSOLETE print_max < UINT_MAX)
// OBSOLETE i = val_print_string (addr, -1, TYPE_LENGTH (elttype), stream);
// OBSOLETE
// OBSOLETE /* Return number of characters printed, plus one for the
// OBSOLETE terminating null if we have "reached the end". */
// OBSOLETE return (i + (print_max && i != print_max));
// OBSOLETE break;
// OBSOLETE
// OBSOLETE case TYPE_CODE_STRING:
// OBSOLETE i = TYPE_LENGTH (type);
// OBSOLETE LA_PRINT_STRING (stream, valaddr, i, 1, 0);
// OBSOLETE /* Return number of characters printed, plus one for the terminating
// OBSOLETE null if we have "reached the end". */
// OBSOLETE return (i + (print_max && i != print_max));
// OBSOLETE break;
// OBSOLETE
// OBSOLETE case TYPE_CODE_BITSTRING:
// OBSOLETE case TYPE_CODE_SET:
// OBSOLETE elttype = TYPE_INDEX_TYPE (type);
// OBSOLETE CHECK_TYPEDEF (elttype);
// OBSOLETE if (TYPE_STUB (elttype))
// OBSOLETE {
// OBSOLETE fprintf_filtered (stream, "<incomplete type>");
// OBSOLETE gdb_flush (stream);
// OBSOLETE break;
// OBSOLETE }
// OBSOLETE {
// OBSOLETE struct type *range = elttype;
// OBSOLETE LONGEST low_bound, high_bound;
// OBSOLETE int i;
// OBSOLETE int is_bitstring = TYPE_CODE (type) == TYPE_CODE_BITSTRING;
// OBSOLETE int need_comma = 0;
// OBSOLETE
// OBSOLETE if (is_bitstring)
// OBSOLETE fputs_filtered ("B'", stream);
// OBSOLETE else
// OBSOLETE fputs_filtered ("[", stream);
// OBSOLETE
// OBSOLETE i = get_discrete_bounds (range, &low_bound, &high_bound);
// OBSOLETE maybe_bad_bstring:
// OBSOLETE if (i < 0)
// OBSOLETE {
// OBSOLETE fputs_filtered ("<error value>", stream);
// OBSOLETE goto done;
// OBSOLETE }
// OBSOLETE
// OBSOLETE for (i = low_bound; i <= high_bound; i++)
// OBSOLETE {
// OBSOLETE int element = value_bit_index (type, valaddr, i);
// OBSOLETE if (element < 0)
// OBSOLETE {
// OBSOLETE i = element;
// OBSOLETE goto maybe_bad_bstring;
// OBSOLETE }
// OBSOLETE if (is_bitstring)
// OBSOLETE fprintf_filtered (stream, "%d", element);
// OBSOLETE else if (element)
// OBSOLETE {
// OBSOLETE if (need_comma)
// OBSOLETE fputs_filtered (", ", stream);
// OBSOLETE chill_print_type_scalar (range, (LONGEST) i, stream);
// OBSOLETE need_comma = 1;
// OBSOLETE
// OBSOLETE /* Look for a continuous range of true elements. */
// OBSOLETE if (i + 1 <= high_bound && value_bit_index (type, valaddr, ++i))
// OBSOLETE {
// OBSOLETE int j = i; /* j is the upper bound so far of the range */
// OBSOLETE fputs_filtered (":", stream);
// OBSOLETE while (i + 1 <= high_bound
// OBSOLETE && value_bit_index (type, valaddr, ++i))
// OBSOLETE j = i;
// OBSOLETE chill_print_type_scalar (range, (LONGEST) j, stream);
// OBSOLETE }
// OBSOLETE }
// OBSOLETE }
// OBSOLETE done:
// OBSOLETE if (is_bitstring)
// OBSOLETE fputs_filtered ("'", stream);
// OBSOLETE else
// OBSOLETE fputs_filtered ("]", stream);
// OBSOLETE }
// OBSOLETE break;
// OBSOLETE
// OBSOLETE case TYPE_CODE_STRUCT:
// OBSOLETE if (chill_varying_type (type))
// OBSOLETE {
// OBSOLETE struct type *inner = check_typedef (TYPE_FIELD_TYPE (type, 1));
// OBSOLETE long length = unpack_long (TYPE_FIELD_TYPE (type, 0), valaddr);
// OBSOLETE char *data_addr = valaddr + TYPE_FIELD_BITPOS (type, 1) / 8;
// OBSOLETE
// OBSOLETE switch (TYPE_CODE (inner))
// OBSOLETE {
// OBSOLETE case TYPE_CODE_STRING:
// OBSOLETE if (length > TYPE_LENGTH (type) - 2)
// OBSOLETE {
// OBSOLETE fprintf_filtered (stream,
// OBSOLETE "<dynamic length %ld > static length %d> *invalid*",
// OBSOLETE length, TYPE_LENGTH (type));
// OBSOLETE
// OBSOLETE /* Don't print the string; doing so might produce a
// OBSOLETE segfault. */
// OBSOLETE return length;
// OBSOLETE }
// OBSOLETE LA_PRINT_STRING (stream, data_addr, length, 1, 0);
// OBSOLETE return length;
// OBSOLETE default:
// OBSOLETE break;
// OBSOLETE }
// OBSOLETE }
// OBSOLETE chill_print_value_fields (type, valaddr, stream, format, recurse, pretty,
// OBSOLETE 0);
// OBSOLETE break;
// OBSOLETE
// OBSOLETE case TYPE_CODE_REF:
// OBSOLETE if (addressprint)
// OBSOLETE {
// OBSOLETE fprintf_filtered (stream, "LOC(");
// OBSOLETE print_address_numeric
// OBSOLETE (extract_address (valaddr, TARGET_PTR_BIT / HOST_CHAR_BIT),
// OBSOLETE 1,
// OBSOLETE stream);
// OBSOLETE fprintf_filtered (stream, ")");
// OBSOLETE if (deref_ref)
// OBSOLETE fputs_filtered (": ", stream);
// OBSOLETE }
// OBSOLETE /* De-reference the reference. */
// OBSOLETE if (deref_ref)
// OBSOLETE {
// OBSOLETE if (TYPE_CODE (TYPE_TARGET_TYPE (type)) != TYPE_CODE_UNDEF)
// OBSOLETE {
// OBSOLETE struct value *deref_val =
// OBSOLETE value_at
// OBSOLETE (TYPE_TARGET_TYPE (type),
// OBSOLETE unpack_pointer (lookup_pointer_type (builtin_type_void),
// OBSOLETE valaddr),
// OBSOLETE NULL);
// OBSOLETE val_print (VALUE_TYPE (deref_val),
// OBSOLETE VALUE_CONTENTS (deref_val),
// OBSOLETE 0,
// OBSOLETE VALUE_ADDRESS (deref_val), stream, format,
// OBSOLETE deref_ref, recurse + 1, pretty);
// OBSOLETE }
// OBSOLETE else
// OBSOLETE fputs_filtered ("???", stream);
// OBSOLETE }
// OBSOLETE break;
// OBSOLETE
// OBSOLETE case TYPE_CODE_ENUM:
// OBSOLETE c_val_print (type, valaddr, 0, address, stream, format,
// OBSOLETE deref_ref, recurse, pretty);
// OBSOLETE break;
// OBSOLETE
// OBSOLETE case TYPE_CODE_RANGE:
// OBSOLETE if (TYPE_TARGET_TYPE (type))
// OBSOLETE chill_val_print (TYPE_TARGET_TYPE (type), valaddr, 0, address, stream,
// OBSOLETE format, deref_ref, recurse, pretty);
// OBSOLETE break;
// OBSOLETE
// OBSOLETE case TYPE_CODE_MEMBER:
// OBSOLETE case TYPE_CODE_UNION:
// OBSOLETE case TYPE_CODE_FUNC:
// OBSOLETE case TYPE_CODE_VOID:
// OBSOLETE case TYPE_CODE_ERROR:
// OBSOLETE default:
// OBSOLETE /* Let's defer printing to the C printer, rather than
// OBSOLETE print an error message. FIXME! */
// OBSOLETE c_val_print (type, valaddr, 0, address, stream, format,
// OBSOLETE deref_ref, recurse, pretty);
// OBSOLETE }
// OBSOLETE gdb_flush (stream);
// OBSOLETE return (0);
// OBSOLETE }
// OBSOLETE
// OBSOLETE /* Mutually recursive subroutines of cplus_print_value and c_val_print to
// OBSOLETE print out a structure's fields: cp_print_value_fields and cplus_print_value.
// OBSOLETE
// OBSOLETE TYPE, VALADDR, STREAM, RECURSE, and PRETTY have the
// OBSOLETE same meanings as in cplus_print_value and c_val_print.
// OBSOLETE
// OBSOLETE DONT_PRINT is an array of baseclass types that we
// OBSOLETE should not print, or zero if called from top level. */
// OBSOLETE
// OBSOLETE static void
// OBSOLETE chill_print_value_fields (struct type *type, char *valaddr,
// OBSOLETE struct ui_file *stream, int format, int recurse,
// OBSOLETE enum val_prettyprint pretty, struct type **dont_print)
// OBSOLETE {
// OBSOLETE int i, len;
// OBSOLETE int fields_seen = 0;
// OBSOLETE
// OBSOLETE CHECK_TYPEDEF (type);
// OBSOLETE
// OBSOLETE fprintf_filtered (stream, "[");
// OBSOLETE len = TYPE_NFIELDS (type);
// OBSOLETE if (len == 0)
// OBSOLETE {
// OBSOLETE fprintf_filtered (stream, "<No data fields>");
// OBSOLETE }
// OBSOLETE else
// OBSOLETE {
// OBSOLETE for (i = 0; i < len; i++)
// OBSOLETE {
// OBSOLETE if (fields_seen)
// OBSOLETE {
// OBSOLETE fprintf_filtered (stream, ", ");
// OBSOLETE }
// OBSOLETE fields_seen = 1;
// OBSOLETE if (pretty)
// OBSOLETE {
// OBSOLETE fprintf_filtered (stream, "\n");
// OBSOLETE print_spaces_filtered (2 + 2 * recurse, stream);
// OBSOLETE }
// OBSOLETE else
// OBSOLETE {
// OBSOLETE wrap_here (n_spaces (2 + 2 * recurse));
// OBSOLETE }
// OBSOLETE fputs_filtered (".", stream);
// OBSOLETE fprintf_symbol_filtered (stream, TYPE_FIELD_NAME (type, i),
// OBSOLETE language_chill, DMGL_NO_OPTS);
// OBSOLETE fputs_filtered (": ", stream);
// OBSOLETE if (TYPE_FIELD_PACKED (type, i))
// OBSOLETE {
// OBSOLETE struct value *v;
// OBSOLETE
// OBSOLETE /* Bitfields require special handling, especially due to byte
// OBSOLETE order problems. */
// OBSOLETE v = value_from_longest (TYPE_FIELD_TYPE (type, i),
// OBSOLETE unpack_field_as_long (type, valaddr, i));
// OBSOLETE
// OBSOLETE chill_val_print (TYPE_FIELD_TYPE (type, i), VALUE_CONTENTS (v), 0, 0,
// OBSOLETE stream, format, 0, recurse + 1, pretty);
// OBSOLETE }
// OBSOLETE else
// OBSOLETE {
// OBSOLETE chill_val_print (TYPE_FIELD_TYPE (type, i),
// OBSOLETE valaddr + TYPE_FIELD_BITPOS (type, i) / 8, 0,
// OBSOLETE 0, stream, format, 0, recurse + 1, pretty);
// OBSOLETE }
// OBSOLETE }
// OBSOLETE if (pretty)
// OBSOLETE {
// OBSOLETE fprintf_filtered (stream, "\n");
// OBSOLETE print_spaces_filtered (2 * recurse, stream);
// OBSOLETE }
// OBSOLETE }
// OBSOLETE fprintf_filtered (stream, "]");
// OBSOLETE }
// OBSOLETE
// OBSOLETE int
// OBSOLETE chill_value_print (struct value *val, struct ui_file *stream, int format,
// OBSOLETE enum val_prettyprint pretty)
// OBSOLETE {
// OBSOLETE struct type *type = VALUE_TYPE (val);
// OBSOLETE struct type *real_type = check_typedef (type);
// OBSOLETE
// OBSOLETE /* If it is a pointer, indicate what it points to.
// OBSOLETE
// OBSOLETE Print type also if it is a reference. */
// OBSOLETE
// OBSOLETE if (TYPE_CODE (real_type) == TYPE_CODE_PTR ||
// OBSOLETE TYPE_CODE (real_type) == TYPE_CODE_REF)
// OBSOLETE {
// OBSOLETE char *valaddr = VALUE_CONTENTS (val);
// OBSOLETE CORE_ADDR addr = unpack_pointer (type, valaddr);
// OBSOLETE if (TYPE_CODE (type) != TYPE_CODE_PTR || addr != 0)
// OBSOLETE {
// OBSOLETE int i;
// OBSOLETE char *name = TYPE_NAME (type);
// OBSOLETE if (name)
// OBSOLETE fputs_filtered (name, stream);
// OBSOLETE else if (TYPE_CODE (TYPE_TARGET_TYPE (type)) == TYPE_CODE_VOID)
// OBSOLETE fputs_filtered ("PTR", stream);
// OBSOLETE else
// OBSOLETE {
// OBSOLETE fprintf_filtered (stream, "(");
// OBSOLETE type_print (type, "", stream, -1);
// OBSOLETE fprintf_filtered (stream, ")");
// OBSOLETE }
// OBSOLETE fprintf_filtered (stream, "(");
// OBSOLETE i = val_print (type, valaddr, 0, VALUE_ADDRESS (val),
// OBSOLETE stream, format, 1, 0, pretty);
// OBSOLETE fprintf_filtered (stream, ")");
// OBSOLETE return i;
// OBSOLETE }
// OBSOLETE }
// OBSOLETE return (val_print (type, VALUE_CONTENTS (val), 0,
// OBSOLETE VALUE_ADDRESS (val), stream, format, 1, 0, pretty));
// OBSOLETE }

View file

@ -1,3 +0,0 @@
# OBSOLETE # Target: ARC processor
# OBSOLETE TDEPFILES = arc-tdep.o
# OBSOLETE TM_FILE = tm-arc.h

View file

@ -1,336 +0,0 @@
// OBSOLETE /* Parameters for target machine ARC, for GDB, the GNU debugger.
// OBSOLETE Copyright 1995, 1996, 1998, 1999, 2000 Free Software Foundation, Inc.
// OBSOLETE Contributed by Cygnus Support.
// 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 /* Used by arc-tdep.c to set the default cpu type. */
// OBSOLETE #define DEFAULT_ARC_CPU_TYPE "base"
// OBSOLETE
// OBSOLETE /* Offset from address of function to start of its code.
// OBSOLETE Zero on most machines. */
// OBSOLETE #define FUNCTION_START_OFFSET 0
// OBSOLETE
// OBSOLETE /* Advance PC across any function entry prologue instructions
// OBSOLETE to reach some "real" code. */
// OBSOLETE
// OBSOLETE #define SKIP_PROLOGUE(pc) (arc_skip_prologue (pc, 0))
// OBSOLETE extern CORE_ADDR arc_skip_prologue (CORE_ADDR, int);
// OBSOLETE
// OBSOLETE #define PROLOGUE_FRAMELESS_P(pc) arc_prologue_frameless_p(pc)
// OBSOLETE extern int arc_prologue_frameless_p (CORE_ADDR);
// OBSOLETE
// OBSOLETE /* Sequence of bytes for breakpoint instruction.
// OBSOLETE ??? The current value is "sr -1,[-1]" and is for the simulator only.
// OBSOLETE The simulator watches for this and does the right thing.
// OBSOLETE The hardware version will have to associate with each breakpoint
// OBSOLETE the sequence "flag 1; nop; nop; nop". IE: The breakpoint insn will not
// OBSOLETE be a fixed set of bits but instead will be a branch to a semi-random
// OBSOLETE address. Presumably this will be cleaned up for "second silicon". */
// OBSOLETE #define BIG_BREAKPOINT { 0x12, 0x1f, 0xff, 0xff }
// OBSOLETE #define LITTLE_BREAKPOINT { 0xff, 0xff, 0x1f, 0x12 }
// OBSOLETE
// OBSOLETE /* Given the exposed pipeline, there isn't any one correct value.
// OBSOLETE However, this value must be 4. GDB can't handle any other value (other than
// OBSOLETE zero). See for example infrun.c:
// OBSOLETE "prev_pc != stop_pc - DECR_PC_AFTER_BREAK" */
// OBSOLETE /* FIXME */
// OBSOLETE #define DECR_PC_AFTER_BREAK 8
// OBSOLETE
// OBSOLETE /* We don't have a reliable single step facility.
// OBSOLETE ??? We do have a cycle single step facility, but that won't work. */
// OBSOLETE #define SOFTWARE_SINGLE_STEP_P() 1
// OBSOLETE extern void arc_software_single_step (enum target_signal, int);
// OBSOLETE #define SOFTWARE_SINGLE_STEP(sig,bp_p) arc_software_single_step (sig, bp_p)
// OBSOLETE
// OBSOLETE /* FIXME: Need to set STEP_SKIPS_DELAY. */
// OBSOLETE
// OBSOLETE /* Given a pc value as defined by the hardware, return the real address.
// OBSOLETE Remember that on the ARC blink contains that status register which
// OBSOLETE includes PC + flags (so we have to mask out the flags). */
// OBSOLETE #define ARC_PC_TO_REAL_ADDRESS(pc) (((pc) & 0xffffff) << 2)
// OBSOLETE
// OBSOLETE /* Immediately after a function call, return the saved pc.
// OBSOLETE Can't always go through the frames for this because on some machines
// OBSOLETE the new frame is not set up until the new function
// OBSOLETE executes some instructions. */
// OBSOLETE
// OBSOLETE #define SAVED_PC_AFTER_CALL(frame) \
// OBSOLETE (ARC_PC_TO_REAL_ADDRESS (read_register (BLINK_REGNUM)))
// OBSOLETE
// OBSOLETE /* Stack grows upward */
// OBSOLETE
// OBSOLETE #define INNER_THAN(lhs,rhs) ((lhs) < (rhs))
// OBSOLETE
// OBSOLETE /* Say how long (ordinary) registers are. This is a piece of bogosity
// OBSOLETE used in push_word and a few other places; REGISTER_RAW_SIZE is the
// OBSOLETE real way to know how big a register is. */
// OBSOLETE #define REGISTER_SIZE 4
// OBSOLETE
// OBSOLETE /* Number of machine registers */
// OBSOLETE #define NUM_REGS 92
// OBSOLETE
// OBSOLETE /* Initializer for an array of names of registers.
// OBSOLETE There should be NUM_REGS strings in this initializer. */
// OBSOLETE
// OBSOLETE #define REGISTER_NAMES \
// OBSOLETE { \
// OBSOLETE /* 0 */ "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", \
// OBSOLETE /* 8 */ "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15", \
// OBSOLETE /* 16 */ "r16", "r17", "r18", "r19", "r20", "r21", "r22", "r23", \
// OBSOLETE /* 24 */ "r24", "r25", "r26", "fp", "sp", "ilink1", "ilink2", "blink", \
// OBSOLETE /* 32 */ "r32", "r33", "r34", "r35", "r36", "r37", "r38", "r39", \
// OBSOLETE /* 40 */ "r40", "r41", "r42", "r43", "r44", "r45", "r46", "r47", \
// OBSOLETE /* 48 */ "r48", "r49", "r50", "r51", "r52", "r53", "r54", "r55", \
// OBSOLETE /* 56 */ "r56", "mlo", "mmid", "mhi", "lp_count", \
// OBSOLETE /* 61 */ "status", "sema", "lp_start", "lp_end", "identity", "debug", \
// OBSOLETE /* 67 */ "aux10", "aux11", "aux12", "aux13", "aux14", \
// OBSOLETE /* 72 */ "aux15", "aux16", "aux17", "aux18", "aux19", \
// OBSOLETE /* 77 */ "aux1a", "aux1b", "aux1c", "aux1d", "aux1e", \
// OBSOLETE /* 82 */ "aux1f", "aux20", "aux21", "aux22", \
// OBSOLETE /* 86 */ "aux30", "aux31", "aux32", "aux33", "aux40", \
// OBSOLETE /* 91 */ "pc" \
// OBSOLETE }
// OBSOLETE
// OBSOLETE /* Register numbers of various important registers (used to index
// OBSOLETE into arrays of register names and register values). */
// OBSOLETE
// OBSOLETE #define R0_REGNUM 0 /* First local register */
// OBSOLETE #define R59_REGNUM 59 /* Last local register */
// OBSOLETE #define FP_REGNUM 27 /* Contains address of executing stack frame */
// OBSOLETE #define SP_REGNUM 28 /* stack pointer */
// OBSOLETE #define BLINK_REGNUM 31 /* link register */
// OBSOLETE #define STA_REGNUM 61 /* processor status word */
// OBSOLETE #define PC_REGNUM 91 /* instruction pointer */
// OBSOLETE #define AUX_BEG_REGNUM 61 /* aux reg begins */
// OBSOLETE #define AUX_END_REGNUM 90 /* aux reg ends, pc not real aux reg */
// OBSOLETE
// OBSOLETE /* Fake registers used to mark immediate data. */
// OBSOLETE #define SHIMM_FLAG_REGNUM 61
// OBSOLETE #define LIMM_REGNUM 62
// OBSOLETE #define SHIMM_REGNUM 63
// OBSOLETE
// OBSOLETE #define AUX_REG_MAP \
// OBSOLETE { \
// OBSOLETE { 0, 1, 2, 3, 4, 5, \
// OBSOLETE 16, -1, -1, -1, -1, \
// OBSOLETE -1, -1, -1, -1, -1, \
// OBSOLETE -1, -1, -1, -1, 30, \
// OBSOLETE -1, 32, 33, -1, \
// OBSOLETE 48, 49, 50, 51, 64, \
// OBSOLETE 0 \
// OBSOLETE }, \
// OBSOLETE { 0, 1, 2, 3, 4, 5, \
// OBSOLETE 16, -1, -1, -1, -1, \
// OBSOLETE -1, -1, -1, -1, -1, \
// OBSOLETE -1, -1, -1, -1, 30, \
// OBSOLETE 31, 32, 33, -1, \
// OBSOLETE -1, -1, -1, -1, -1, \
// OBSOLETE 0 \
// OBSOLETE }, \
// OBSOLETE { 0, 1, 2, 3, 4, 5, \
// OBSOLETE 16, 17, 18, 19, 20, \
// OBSOLETE 21, 22, 23, 24, 25, \
// OBSOLETE 26, 27, 28, 29, 30, \
// OBSOLETE 31, 32, 33, 34, \
// OBSOLETE -1, -1, -1, -1, -1, \
// OBSOLETE 0 \
// OBSOLETE } \
// OBSOLETE }
// OBSOLETE
// OBSOLETE #define PFP_REGNUM R0_REGNUM /* Previous frame pointer */
// OBSOLETE
// OBSOLETE /* Total amount of space needed to store our copies of the machine's
// OBSOLETE register state, the array `registers'. */
// OBSOLETE #define REGISTER_BYTES (NUM_REGS * 4)
// OBSOLETE
// OBSOLETE /* Index within `registers' of the first byte of the space for register N. */
// OBSOLETE #define REGISTER_BYTE(N) (4*(N))
// OBSOLETE
// OBSOLETE /* Number of bytes of storage in the actual machine representation
// OBSOLETE for register N. */
// OBSOLETE #define REGISTER_RAW_SIZE(N) 4
// OBSOLETE
// OBSOLETE /* Number of bytes of storage in the program's representation for register N. */
// OBSOLETE #define REGISTER_VIRTUAL_SIZE(N) 4
// OBSOLETE
// OBSOLETE /* Largest value REGISTER_RAW_SIZE can have. */
// OBSOLETE #define MAX_REGISTER_RAW_SIZE 4
// OBSOLETE
// OBSOLETE /* Largest value REGISTER_VIRTUAL_SIZE can have. */
// OBSOLETE #define MAX_REGISTER_VIRTUAL_SIZE 4
// OBSOLETE
// OBSOLETE /* Return the GDB type object for the "standard" data type
// OBSOLETE of data in register N. */
// OBSOLETE #define REGISTER_VIRTUAL_TYPE(N) (builtin_type_int)
// OBSOLETE
// OBSOLETE
// OBSOLETE /* Macros for understanding function return values... */
// OBSOLETE
// OBSOLETE /* Does the specified function use the "struct returning" convention
// OBSOLETE or the "value returning" convention? The "value returning" convention
// OBSOLETE almost invariably returns the entire value in registers. The
// OBSOLETE "struct returning" convention often returns the entire value in
// OBSOLETE memory, and passes a pointer (out of or into the function) saying
// OBSOLETE where the value (is or should go).
// OBSOLETE
// OBSOLETE Since this sometimes depends on whether it was compiled with GCC,
// OBSOLETE this is also an argument. This is used in call_function to build a
// OBSOLETE stack, and in value_being_returned to print return values.
// OBSOLETE
// OBSOLETE On arc, a structure is always retunred with pointer in r0. */
// OBSOLETE
// OBSOLETE #define USE_STRUCT_CONVENTION(gcc_p, type) 1
// 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. This is only called if USE_STRUCT_CONVENTION for this
// OBSOLETE type is 0.
// OBSOLETE */
// OBSOLETE #define DEPRECATED_EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
// OBSOLETE memcpy(VALBUF, REGBUF+REGISTER_BYTE(R0_REGNUM), TYPE_LENGTH (TYPE))
// OBSOLETE
// OBSOLETE /* If USE_STRUCT_CONVENTION produces a 1,
// OBSOLETE extract from an array REGBUF containing the (raw) register state
// OBSOLETE the address in which a function should return its structure value,
// OBSOLETE as a CORE_ADDR (or an expression that can be used as one). */
// OBSOLETE #define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) \
// OBSOLETE (error("Don't know where large structure is returned on arc"), 0)
// OBSOLETE
// OBSOLETE /* Write into appropriate registers a function return value
// OBSOLETE of type TYPE, given in virtual format, for "value returning" functions.
// OBSOLETE For 'return' command: not (yet) implemented for arc. */
// OBSOLETE #define STORE_RETURN_VALUE(TYPE,VALBUF) \
// OBSOLETE error ("Returning values from functions is not implemented in arc gdb")
// OBSOLETE
// OBSOLETE /* Store the address of the place in which to copy the structure the
// OBSOLETE subroutine will return. This is called from call_function. */
// OBSOLETE #define STORE_STRUCT_RETURN(ADDR, SP) \
// OBSOLETE error ("Returning values from functions is not implemented in arc gdb")
// OBSOLETE
// OBSOLETE
// OBSOLETE /* Describe the pointer in each stack frame to the previous stack frame
// OBSOLETE (its caller). */
// OBSOLETE
// OBSOLETE /* We cache information about saved registers in the frame structure,
// OBSOLETE to save us from having to re-scan function prologues every time
// OBSOLETE a register in a non-current frame is accessed. */
// OBSOLETE
// OBSOLETE #define EXTRA_FRAME_INFO \
// OBSOLETE struct frame_saved_regs *fsr; \
// OBSOLETE CORE_ADDR arg_pointer;
// OBSOLETE
// OBSOLETE /* Zero the frame_saved_regs pointer when the frame is initialized,
// OBSOLETE so that FRAME_FIND_SAVED_REGS () will know to allocate and
// OBSOLETE initialize a frame_saved_regs struct the first time it is called.
// OBSOLETE Set the arg_pointer to -1, which is not valid; 0 and other values
// OBSOLETE indicate real, cached values. */
// OBSOLETE
// OBSOLETE #define INIT_EXTRA_FRAME_INFO(fromleaf, fi) \
// OBSOLETE ((fi)->fsr = 0, (fi)->arg_pointer = -1)
// OBSOLETE
// OBSOLETE /* FRAME_CHAIN takes a frame's nominal address
// OBSOLETE and produces the frame's chain-pointer.
// OBSOLETE However, if FRAME_CHAIN_VALID returns zero,
// OBSOLETE it means the given frame is the outermost one and has no caller. */
// OBSOLETE /* On the arc, we get the chain pointer by reading the PFP saved
// OBSOLETE on the stack. */
// OBSOLETE /* The PFP and RPC is in fp and fp+4. */
// OBSOLETE
// OBSOLETE #define FRAME_CHAIN(thisframe) \
// OBSOLETE (read_memory_integer (FRAME_FP (thisframe), 4))
// OBSOLETE
// OBSOLETE /* FRAME_CHAIN_VALID returns zero if the given frame is the outermost one
// OBSOLETE and has no caller. */
// OBSOLETE #define FRAME_CHAIN_VALID(chain, thisframe) nonnull_frame_chain_valid (chain, thisframe)
// OBSOLETE
// OBSOLETE /* An expression that tells us whether the function invocation represented
// OBSOLETE by FI does not have a frame on the stack associated with it. */
// OBSOLETE
// OBSOLETE #define FRAMELESS_FUNCTION_INVOCATION(FI) \
// OBSOLETE (((FI)->signal_handler_caller) ? 0 : frameless_look_for_prologue (FI))
// OBSOLETE
// OBSOLETE /* Where is the PC for a specific frame.
// OBSOLETE A leaf function may never save blink, so we have to check for that here. */
// OBSOLETE
// OBSOLETE #define FRAME_SAVED_PC(frame) (arc_frame_saved_pc (frame))
// OBSOLETE struct frame_info; /* in case frame.h not included yet */
// OBSOLETE CORE_ADDR arc_frame_saved_pc (struct frame_info *);
// OBSOLETE
// OBSOLETE /* If the argument is on the stack, it will be here.
// OBSOLETE We cache this value in the frame info if we've already looked it up. */
// OBSOLETE /* ??? Is the arg_pointer check necessary? */
// OBSOLETE
// OBSOLETE #define FRAME_ARGS_ADDRESS(fi) \
// OBSOLETE (((fi)->arg_pointer != -1) ? (fi)->arg_pointer : (fi)->frame)
// OBSOLETE
// OBSOLETE /* This is the same except it should return 0 when
// OBSOLETE it does not really know where the args are, rather than guessing.
// OBSOLETE This value is not cached since it is only used infrequently. */
// OBSOLETE
// OBSOLETE #define FRAME_LOCALS_ADDRESS(fi) ((fi)->frame)
// OBSOLETE
// OBSOLETE /* Set NUMARGS to the number of args passed to a frame.
// OBSOLETE Can return -1, meaning no way to tell. */
// OBSOLETE
// OBSOLETE #define FRAME_NUM_ARGS(fi) (-1)
// OBSOLETE
// OBSOLETE /* Return number of bytes at start of arglist that are not really args. */
// OBSOLETE
// OBSOLETE #define FRAME_ARGS_SKIP 0
// OBSOLETE
// OBSOLETE /* Produce the positions of the saved registers in a stack frame. */
// OBSOLETE
// OBSOLETE #define FRAME_FIND_SAVED_REGS(frame_info_addr, sr) \
// OBSOLETE frame_find_saved_regs (frame_info_addr, &sr)
// OBSOLETE extern void frame_find_saved_regs (); /* See arc-tdep.c */
// OBSOLETE
// OBSOLETE
// OBSOLETE /* Things needed for making calls to functions in the inferior process */
// OBSOLETE void arc_push_dummy_frame (void);
// OBSOLETE #define PUSH_DUMMY_FRAME \
// OBSOLETE arc_push_dummy_frame ()
// OBSOLETE
// OBSOLETE /* Discard from the stack the innermost frame, restoring all registers. */
// OBSOLETE void arc_pop_frame (void);
// OBSOLETE #define POP_FRAME \
// OBSOLETE arc_pop_frame ()
// OBSOLETE
// OBSOLETE /* This sequence of words is the instructions bl xxxx, flag 1 */
// OBSOLETE #define CALL_DUMMY { 0x28000000, 0x1fbe8001 }
// OBSOLETE #define CALL_DUMMY_LENGTH 8
// OBSOLETE
// OBSOLETE /* Start execution at beginning of dummy */
// OBSOLETE #define CALL_DUMMY_START_OFFSET 0
// OBSOLETE
// OBSOLETE /* Insert the specified number of args and function address
// OBSOLETE into a call sequence of the above form stored at 'dummyname'. */
// OBSOLETE #define FIX_CALL_DUMMY(dummyname, pc, fun, nargs, args, type, gcc_p) \
// OBSOLETE { \
// OBSOLETE int from, to, delta, loc; \
// OBSOLETE loc = (int)(read_register (SP_REGNUM) - CALL_DUMMY_LENGTH); \
// OBSOLETE from = loc + 4; \
// OBSOLETE to = (int)(fun); \
// OBSOLETE delta = (to - from) >> 2; \
// OBSOLETE *((char *)(dummyname) + 1) = (delta & 0x1); \
// OBSOLETE *((char *)(dummyname) + 2) = ((delta >> 1) & 0xff); \
// OBSOLETE *((char *)(dummyname) + 3) = ((delta >> 9) & 0xff); \
// OBSOLETE *((char *)(dummyname) + 4) = ((delta >> 17) & 0x7); \
// OBSOLETE }

View file

@ -1,5 +0,0 @@
# OBSOLETE # Target: Mitsubishi D30V processor
# OBSOLETE TDEPFILES= d30v-tdep.o
# OBSOLETE TM_FILE= tm-d30v.h
# OBSOLETE SIM_OBS= remote-sim.o
# OBSOLETE SIM= ../sim/d30v/libsim.a

View file

@ -1,323 +0,0 @@
/* OBSOLETE /* Target-specific definition for the Mitsubishi D30V */
/* OBSOLETE Copyright 1997, 1998, 1999, 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 #ifndef TM_D30V_H */
/* OBSOLETE #define TM_D30V_H */
/* OBSOLETE */
/* OBSOLETE #include "regcache.h" */
/* OBSOLETE */
/* OBSOLETE /* Offset from address of function to start of its code. */
/* OBSOLETE Zero on most machines. */ */
/* OBSOLETE */
/* OBSOLETE #define FUNCTION_START_OFFSET 0 */
/* OBSOLETE */
/* OBSOLETE /* these are the addresses the D30V-EVA board maps data */ */
/* OBSOLETE /* and instruction memory to. */ */
/* OBSOLETE */
/* OBSOLETE #define DMEM_START 0x20000000 */
/* OBSOLETE #define IMEM_START 0x00000000 /* was 0x10000000 */ */
/* OBSOLETE #define STACK_START 0x20007ffe */
/* OBSOLETE */
/* OBSOLETE /* Forward decls for prototypes */ */
/* OBSOLETE struct frame_info; */
/* OBSOLETE struct frame_saved_regs; */
/* OBSOLETE struct type; */
/* OBSOLETE struct value; */
/* OBSOLETE */
/* OBSOLETE /* Advance PC across any function entry prologue instructions */
/* OBSOLETE to reach some "real" code. */ */
/* OBSOLETE */
/* OBSOLETE extern CORE_ADDR d30v_skip_prologue (CORE_ADDR); */
/* OBSOLETE #define SKIP_PROLOGUE(ip) (d30v_skip_prologue (ip)) */
/* OBSOLETE */
/* OBSOLETE */
/* OBSOLETE /* Stack grows downward. */ */
/* OBSOLETE #define INNER_THAN(lhs,rhs) ((lhs) < (rhs)) */
/* OBSOLETE */
/* OBSOLETE /* for a breakpoint, use "dbt || nop" */ */
/* OBSOLETE #define BREAKPOINT {0x00, 0xb0, 0x00, 0x00,\ */
/* OBSOLETE 0x00, 0xf0, 0x00, 0x00} */
/* OBSOLETE */
/* OBSOLETE /* If your kernel resets the pc after the trap happens you may need to */
/* OBSOLETE define this before including this file. */ */
/* OBSOLETE #define DECR_PC_AFTER_BREAK 0 */
/* OBSOLETE */
/* OBSOLETE #define REGISTER_NAMES \ */
/* OBSOLETE { "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", \ */
/* OBSOLETE "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15", \ */
/* OBSOLETE "r16", "r17", "r18", "r19", "r20", "r21", "r22", "r23", \ */
/* OBSOLETE "r24", "r25", "r26", "r27", "r28", "r29", "r30", "r31", \ */
/* OBSOLETE "r32", "r33", "r34", "r35", "r36", "r37", "r38", "r39", \ */
/* OBSOLETE "r40", "r41", "r42", "r43", "r44", "r45", "r46", "r47", \ */
/* OBSOLETE "r48", "r49", "r50", "r51", "r52", "r53", "r54", "r55", \ */
/* OBSOLETE "r56", "r57", "r58", "r59", "r60", "r61", "r62", "r63", \ */
/* OBSOLETE "spi", "spu", \ */
/* OBSOLETE "psw", "bpsw", "pc", "bpc", "dpsw", "dpc", "cr6", "rpt_c", \ */
/* OBSOLETE "rpt_s", "rpt_e", "mod_s", "mod_e", "cr12", "cr13", "iba", "eit_vb",\ */
/* OBSOLETE "int_s", "int_m", "a0", "a1" \ */
/* OBSOLETE } */
/* OBSOLETE */
/* OBSOLETE #define NUM_REGS 86 */
/* OBSOLETE */
/* OBSOLETE /* Register numbers of various important registers. */
/* OBSOLETE Note that some of these values are "real" register numbers, */
/* OBSOLETE and correspond to the general registers of the machine, */
/* OBSOLETE and some are "phony" register numbers which are too large */
/* OBSOLETE to be actual register numbers as far as the user is concerned */
/* OBSOLETE but do serve to get the desired values when passed to read_register. */ */
/* OBSOLETE */
/* OBSOLETE #define R0_REGNUM 0 */
/* OBSOLETE #define FP_REGNUM 61 */
/* OBSOLETE #define LR_REGNUM 62 */
/* OBSOLETE #define SP_REGNUM 63 */
/* OBSOLETE #define SPI_REGNUM 64 /* Interrupt stack pointer */ */
/* OBSOLETE #define SPU_REGNUM 65 /* User stack pointer */ */
/* OBSOLETE #define CREGS_START 66 */
/* OBSOLETE */
/* OBSOLETE #define PSW_REGNUM (CREGS_START + 0) /* psw, bpsw, or dpsw??? */ */
/* OBSOLETE #define PSW_SM (((unsigned long)0x80000000) >> 0) /* Stack mode: 0/SPI */ */
/* OBSOLETE /* 1/SPU */ */
/* OBSOLETE #define PSW_EA (((unsigned long)0x80000000) >> 2) /* Execution status */ */
/* OBSOLETE #define PSW_DB (((unsigned long)0x80000000) >> 3) /* Debug mode */ */
/* OBSOLETE #define PSW_DS (((unsigned long)0x80000000) >> 4) /* Debug EIT status */ */
/* OBSOLETE #define PSW_IE (((unsigned long)0x80000000) >> 5) /* Interrupt enable */ */
/* OBSOLETE #define PSW_RP (((unsigned long)0x80000000) >> 6) /* Repeat enable */ */
/* OBSOLETE #define PSW_MD (((unsigned long)0x80000000) >> 7) /* Modulo enable */ */
/* OBSOLETE #define PSW_F0 (((unsigned long)0x80000000) >> 17) /* F0 flag */ */
/* OBSOLETE #define PSW_F1 (((unsigned long)0x80000000) >> 19) /* F1 flag */ */
/* OBSOLETE #define PSW_F2 (((unsigned long)0x80000000) >> 21) /* F2 flag */ */
/* OBSOLETE #define PSW_F3 (((unsigned long)0x80000000) >> 23) /* F3 flag */ */
/* OBSOLETE #define PSW_S (((unsigned long)0x80000000) >> 25) /* Saturation flag */ */
/* OBSOLETE #define PSW_V (((unsigned long)0x80000000) >> 27) /* Overflow flag */ */
/* OBSOLETE #define PSW_VA (((unsigned long)0x80000000) >> 29) /* Accum. overflow */ */
/* OBSOLETE #define PSW_C (((unsigned long)0x80000000) >> 31) /* Carry/Borrow flag */ */
/* OBSOLETE */
/* OBSOLETE #define BPSW_REGNUM (CREGS_START + 1) /* Backup PSW (on interrupt) */ */
/* OBSOLETE #define PC_REGNUM (CREGS_START + 2) /* pc, bpc, or dpc??? */ */
/* OBSOLETE #define BPC_REGNUM (CREGS_START + 3) /* Backup PC (on interrupt) */ */
/* OBSOLETE #define DPSW_REGNUM (CREGS_START + 4) /* Backup PSW (on debug trap) */ */
/* OBSOLETE #define DPC_REGNUM (CREGS_START + 5) /* Backup PC (on debug trap) */ */
/* OBSOLETE #define RPT_C_REGNUM (CREGS_START + 7) /* Loop count */ */
/* OBSOLETE #define RPT_S_REGNUM (CREGS_START + 8) /* Loop start address */ */
/* OBSOLETE #define RPT_E_REGNUM (CREGS_START + 9) /* Loop end address */ */
/* OBSOLETE #define MOD_S_REGNUM (CREGS_START + 10) */
/* OBSOLETE #define MOD_E_REGNUM (CREGS_START + 11) */
/* OBSOLETE #define IBA_REGNUM (CREGS_START + 14) /* Instruction break address */ */
/* OBSOLETE #define EIT_VB_REGNUM (CREGS_START + 15) /* Vector base address */ */
/* OBSOLETE #define INT_S_REGNUM (CREGS_START + 16) /* Interrupt status */ */
/* OBSOLETE #define INT_M_REGNUM (CREGS_START + 17) /* Interrupt mask */ */
/* OBSOLETE #define A0_REGNUM 84 */
/* OBSOLETE #define A1_REGNUM 85 */
/* OBSOLETE */
/* OBSOLETE /* Say how much memory is needed to store a copy of the register set */ */
/* OBSOLETE #define REGISTER_BYTES ((NUM_REGS - 2) * 4 + 2 * 8) */
/* OBSOLETE */
/* OBSOLETE /* Index within `registers' of the first byte of the space for */
/* OBSOLETE register N. */ */
/* OBSOLETE */
/* OBSOLETE #define REGISTER_BYTE(N) \ */
/* OBSOLETE ( ((N) >= A0_REGNUM) ? ( ((N) - A0_REGNUM) * 8 + A0_REGNUM * 4 ) : ((N) * 4) ) */
/* OBSOLETE */
/* OBSOLETE /* Number of bytes of storage in the actual machine representation */
/* OBSOLETE for register N. */ */
/* OBSOLETE */
/* OBSOLETE #define REGISTER_RAW_SIZE(N) ( ((N) >= A0_REGNUM) ? 8 : 4 ) */
/* OBSOLETE */
/* OBSOLETE /* Number of bytes of storage in the program's representation */
/* OBSOLETE for register N. */ */
/* OBSOLETE #define REGISTER_VIRTUAL_SIZE(N) REGISTER_RAW_SIZE(N) */
/* OBSOLETE */
/* OBSOLETE /* Largest value REGISTER_RAW_SIZE can have. */ */
/* OBSOLETE */
/* OBSOLETE #define MAX_REGISTER_RAW_SIZE 8 */
/* OBSOLETE */
/* OBSOLETE /* Largest value REGISTER_VIRTUAL_SIZE can have. */ */
/* OBSOLETE */
/* OBSOLETE #define MAX_REGISTER_VIRTUAL_SIZE 8 */
/* OBSOLETE */
/* OBSOLETE /* Return the GDB type object for the "standard" data type */
/* OBSOLETE of data in register N. */ */
/* OBSOLETE */
/* OBSOLETE #define REGISTER_VIRTUAL_TYPE(N) \ */
/* OBSOLETE ( ((N) < A0_REGNUM ) ? builtin_type_long : builtin_type_long_long) */
/* OBSOLETE */
/* OBSOLETE /* Writing to r0 is a noop (not an error or exception or anything like */
/* OBSOLETE that, however). */ */
/* OBSOLETE */
/* OBSOLETE #define CANNOT_STORE_REGISTER(regno) ((regno) == R0_REGNUM) */
/* OBSOLETE */
/* OBSOLETE void d30v_do_registers_info (int regnum, int fpregs); */
/* OBSOLETE */
/* OBSOLETE #define DO_REGISTERS_INFO d30v_do_registers_info */
/* OBSOLETE */
/* OBSOLETE /* Store the address of the place in which to copy the structure the */
/* OBSOLETE subroutine will return. This is called from call_function. */
/* OBSOLETE */
/* OBSOLETE We store structs through a pointer passed in R2 */ */
/* OBSOLETE */
/* OBSOLETE #define STORE_STRUCT_RETURN(ADDR, SP) \ */
/* OBSOLETE { write_register (2, (ADDR)); } */
/* OBSOLETE */
/* OBSOLETE */
/* OBSOLETE /* Write into appropriate registers a function return value */
/* OBSOLETE of type TYPE, given in virtual format. */
/* OBSOLETE */
/* OBSOLETE Things always get returned in R2/R3 */ */
/* OBSOLETE */
/* OBSOLETE #define STORE_RETURN_VALUE(TYPE,VALBUF) \ */
/* OBSOLETE write_register_bytes (REGISTER_BYTE(2), VALBUF, TYPE_LENGTH (TYPE)) */
/* OBSOLETE */
/* OBSOLETE */
/* OBSOLETE /* Extract from an array REGBUF containing the (raw) register state */
/* OBSOLETE the address in which a function should return its structure value, */
/* OBSOLETE as a CORE_ADDR (or an expression that can be used as one). */ */
/* OBSOLETE #define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) (((CORE_ADDR *)(REGBUF))[2]) */
/* OBSOLETE */
/* OBSOLETE */
/* OBSOLETE /* Define other aspects of the stack frame. */
/* OBSOLETE we keep a copy of the worked out return pc lying around, since it */
/* OBSOLETE is a useful bit of info */ */
/* OBSOLETE */
/* OBSOLETE #define EXTRA_FRAME_INFO \ */
/* OBSOLETE CORE_ADDR return_pc; \ */
/* OBSOLETE CORE_ADDR dummy; \ */
/* OBSOLETE int frameless; \ */
/* OBSOLETE int size; */
/* OBSOLETE */
/* OBSOLETE #define INIT_EXTRA_FRAME_INFO(fromleaf, fi) \ */
/* OBSOLETE d30v_init_extra_frame_info(fromleaf, fi) */
/* OBSOLETE */
/* OBSOLETE extern void d30v_init_extra_frame_info (int fromleaf, struct frame_info *fi); */
/* OBSOLETE */
/* OBSOLETE /* A macro that tells us whether the function invocation represented */
/* OBSOLETE by FI does not have a frame on the stack associated with it. If it */
/* OBSOLETE does not, FRAMELESS is set to 1, else 0. */ */
/* OBSOLETE */
/* OBSOLETE #define FRAMELESS_FUNCTION_INVOCATION(FI) \ */
/* OBSOLETE (frameless_look_for_prologue (FI)) */
/* OBSOLETE */
/* OBSOLETE CORE_ADDR d30v_frame_chain (struct frame_info *frame); */
/* OBSOLETE #define FRAME_CHAIN(FRAME) d30v_frame_chain(FRAME) */
/* OBSOLETE extern int d30v_frame_chain_valid (CORE_ADDR, struct frame_info *); */
/* OBSOLETE #define FRAME_CHAIN_VALID(chain, thisframe) d30v_frame_chain_valid (chain, thisframe) */
/* OBSOLETE #define FRAME_SAVED_PC(FRAME) ((FRAME)->return_pc) */
/* OBSOLETE #define FRAME_ARGS_ADDRESS(fi) (fi)->frame */
/* OBSOLETE #define FRAME_LOCALS_ADDRESS(fi) (fi)->frame */
/* OBSOLETE */
/* OBSOLETE void d30v_init_frame_pc (int fromleaf, struct frame_info *prev); */
/* OBSOLETE #define INIT_FRAME_PC_FIRST(fromleaf, prev) d30v_init_frame_pc(fromleaf, prev) */
/* OBSOLETE #define INIT_FRAME_PC(fromleaf, prev) /* nada */ */
/* OBSOLETE */
/* OBSOLETE /* Immediately after a function call, return the saved pc. We can't */ */
/* OBSOLETE /* use frame->return_pc beause that is determined by reading R62 off the */ */
/* OBSOLETE /* stack and that may not be written yet. */ */
/* OBSOLETE */
/* OBSOLETE #define SAVED_PC_AFTER_CALL(frame) (read_register(LR_REGNUM)) */
/* OBSOLETE */
/* OBSOLETE /* Set VAL to the number of args passed to frame described by FI. */
/* OBSOLETE Can set VAL to -1, meaning no way to tell. */ */
/* OBSOLETE /* We can't tell how many args there are */ */
/* OBSOLETE */
/* OBSOLETE #define FRAME_NUM_ARGS(fi) (-1) */
/* OBSOLETE */
/* OBSOLETE /* Return number of bytes at start of arglist that are not really args. */ */
/* OBSOLETE */
/* OBSOLETE #define FRAME_ARGS_SKIP 0 */
/* OBSOLETE */
/* 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 d30v_frame_find_saved_regs(frame_info, &(frame_saved_regs)) */
/* OBSOLETE */
/* OBSOLETE extern void d30v_frame_find_saved_regs (struct frame_info *, */
/* OBSOLETE struct frame_saved_regs *); */
/* OBSOLETE */
/* OBSOLETE /* DUMMY FRAMES. Need these to support inferior function calls. */
/* OBSOLETE They work like this on D30V: */
/* OBSOLETE First we set a breakpoint at 0 or __start. */
/* OBSOLETE Then we push all the registers onto the stack. */
/* OBSOLETE Then put the function arguments in the proper registers and set r13 */
/* OBSOLETE to our breakpoint address. */
/* OBSOLETE Finally call the function directly. */
/* OBSOLETE When it hits the breakpoint, clear the break point and pop the old */
/* OBSOLETE register contents off the stack. */ */
/* OBSOLETE */
/* OBSOLETE #define CALL_DUMMY { 0 } */
/* OBSOLETE #define PUSH_DUMMY_FRAME */
/* OBSOLETE #define CALL_DUMMY_START_OFFSET 0 */
/* OBSOLETE #define CALL_DUMMY_LOCATION AT_ENTRY_POINT */
/* OBSOLETE #define CALL_DUMMY_BREAKPOINT_OFFSET (0) */
/* OBSOLETE */
/* OBSOLETE extern CORE_ADDR d30v_call_dummy_address (void); */
/* OBSOLETE #define CALL_DUMMY_ADDRESS() d30v_call_dummy_address() */
/* OBSOLETE */
/* OBSOLETE #define FIX_CALL_DUMMY(dummyname, pc, fun, nargs, args, type, gcc_p) \ */
/* OBSOLETE sp = d30v_fix_call_dummy (dummyname, pc, fun, nargs, args, type, gcc_p) */
/* OBSOLETE */
/* OBSOLETE #define PC_IN_CALL_DUMMY(pc, sp, frame_address) ( pc == IMEM_START + 4 ) */
/* OBSOLETE */
/* OBSOLETE extern CORE_ADDR d30v_fix_call_dummy (char *, CORE_ADDR, CORE_ADDR, */
/* OBSOLETE int, struct value **, */
/* OBSOLETE struct type *, int); */
/* OBSOLETE #define PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr) \ */
/* OBSOLETE (d30v_push_arguments((nargs), (args), (sp), (struct_return), (struct_addr))) */
/* OBSOLETE extern CORE_ADDR d30v_push_arguments (int, struct value **, CORE_ADDR, int, */
/* OBSOLETE CORE_ADDR); */
/* OBSOLETE */
/* 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 #define DEPRECATED_EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \ */
/* OBSOLETE d30v_extract_return_value(TYPE, REGBUF, VALBUF) */
/* OBSOLETE extern void d30v_extract_return_value (struct type *, char *, char *); */
/* OBSOLETE */
/* OBSOLETE */
/* OBSOLETE /* Discard from the stack the innermost frame, */
/* OBSOLETE restoring all saved registers. */ */
/* OBSOLETE #define POP_FRAME d30v_pop_frame(); */
/* OBSOLETE extern void d30v_pop_frame (void); */
/* OBSOLETE */
/* OBSOLETE #define REGISTER_SIZE 4 */
/* OBSOLETE */
/* OBSOLETE /* Need to handle SP special, as we need to select between spu and spi. */ */
/* OBSOLETE #if 0 /* XXX until the simulator is fixed */ */
/* OBSOLETE #define TARGET_READ_SP() ((read_register (PSW_REGNUM) & PSW_SM) \ */
/* OBSOLETE ? read_register (SPU_REGNUM) \ */
/* OBSOLETE : read_register (SPI_REGNUM)) */
/* OBSOLETE */
/* OBSOLETE #define TARGET_WRITE_SP(val) ((read_register (PSW_REGNUM) & PSW_SM) \ */
/* OBSOLETE ? write_register (SPU_REGNUM, (val)) \ */
/* OBSOLETE : write_register (SPI_REGNUM, (val))) */
/* OBSOLETE #endif */
/* OBSOLETE */
/* OBSOLETE #define STACK_ALIGN(len) (((len) + 7 ) & ~7) */
/* OBSOLETE */
/* OBSOLETE /* Turn this on to cause remote-sim.c to use sim_set/clear_breakpoint. */ */
/* OBSOLETE */
/* OBSOLETE #define SIM_HAS_BREAKPOINTS */
/* OBSOLETE */
/* OBSOLETE #endif /* TM_D30V_H */ */

View file

@ -1,5 +0,0 @@
# OBSOLETE # Target: Fujitsu FR30 processor
# OBSOLETE TDEPFILES= fr30-tdep.o
# OBSOLETE TM_FILE= tm-fr30.h
# OBSOLETE SIM_OBS = remote-sim.o
# OBSOLETE SIM = ../sim/fr30/libsim.a

View file

@ -1,233 +0,0 @@
// OBSOLETE /* Parameters for execution on a Fujitsu FR30 processor.
// OBSOLETE Copyright 1999, 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 #include "regcache.h"
// OBSOLETE
// OBSOLETE #define FR30_GENREGS 16
// OBSOLETE #define FR30_DEDICATEDREGS 8
// OBSOLETE #define FR30_REGSIZE 4 /* bytes */
// OBSOLETE
// OBSOLETE #define NUM_REGS (FR30_GENREGS + FR30_DEDICATEDREGS)
// OBSOLETE #define REGISTER_BYTES ((FR30_GENREGS + FR30_DEDICATEDREGS)*FR30_REGSIZE)
// OBSOLETE
// OBSOLETE /* Index within `registers' of the first byte of the space for
// OBSOLETE register N. */
// OBSOLETE #define REGISTER_BYTE(N) ((N) * FR30_REGSIZE)
// OBSOLETE
// OBSOLETE /* Initializer for an array of names of registers.
// OBSOLETE There should be NUM_REGS strings in this initializer. */
// OBSOLETE #define REGISTER_NAMES \
// OBSOLETE { "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", "r8", \
// OBSOLETE "r9", "r10", "r11", "r12", "r13", "r14", "r15", \
// OBSOLETE "pc", "ps", "tbr", "rp", "ssp", "usp", "mdh", "mdl" }
// OBSOLETE
// OBSOLETE /* Offset from address of function to start of its code.
// OBSOLETE Zero on most machines. */
// OBSOLETE #define FUNCTION_START_OFFSET 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
// OBSOLETE #define DECR_PC_AFTER_BREAK 0
// OBSOLETE
// OBSOLETE /* Stack grows downward. */
// OBSOLETE
// OBSOLETE #define INNER_THAN(lhs,rhs) ((lhs) < (rhs))
// OBSOLETE
// OBSOLETE #define R0_REGNUM 0
// OBSOLETE #define R1_REGNUM 1
// OBSOLETE #define R2_REGNUM 2
// OBSOLETE #define R3_REGNUM 3
// OBSOLETE #define R4_REGNUM 4
// OBSOLETE #define R5_REGNUM 5
// OBSOLETE #define R6_REGNUM 6
// OBSOLETE #define R7_REGNUM 7
// OBSOLETE #define R8_REGNUM 8
// OBSOLETE #define R9_REGNUM 9
// OBSOLETE #define R10_REGNUM 10
// OBSOLETE #define R11_REGNUM 11
// OBSOLETE #define R12_REGNUM 12
// OBSOLETE #define R13_REGNUM 13
// OBSOLETE #define FP_REGNUM 14 /* Frame pointer */
// OBSOLETE #define SP_REGNUM 15 /* Stack pointer */
// OBSOLETE #define PC_REGNUM 16 /* Program counter */
// OBSOLETE #define RP_REGNUM 19 /* Return pointer */
// OBSOLETE
// OBSOLETE #define FIRST_ARGREG R4_REGNUM /* first arg (or struct ret val addr) */
// OBSOLETE #define LAST_ARGREG R7_REGNUM /* fourth (or third arg) */
// OBSOLETE #define RETVAL_REG R4_REGNUM /* return vaue */
// OBSOLETE
// OBSOLETE /* Say how long (ordinary) registers are. This is a piece of bogosity
// OBSOLETE used in push_word and a few other places; REGISTER_RAW_SIZE is the
// OBSOLETE real way to know how big a register is. */
// OBSOLETE #define REGISTER_SIZE FR30_REGSIZE
// OBSOLETE
// OBSOLETE /* Number of bytes of storage in the actual machine representation
// OBSOLETE for register N. */
// OBSOLETE #define REGISTER_RAW_SIZE(N) FR30_REGSIZE
// OBSOLETE
// OBSOLETE /* Largest value REGISTER_RAW_SIZE can have. */
// OBSOLETE #define MAX_REGISTER_RAW_SIZE FR30_REGSIZE
// OBSOLETE
// OBSOLETE /* Number of bytes of storage in the program's representation
// OBSOLETE for register N. */
// OBSOLETE #define REGISTER_VIRTUAL_SIZE(N) REGISTER_RAW_SIZE(N)
// OBSOLETE
// OBSOLETE /* Largest value REGISTER_VIRTUAL_SIZE can have. */
// OBSOLETE #define MAX_REGISTER_VIRTUAL_SIZE FR30_REGSIZE
// OBSOLETE
// OBSOLETE extern void fr30_pop_frame (void);
// OBSOLETE #define POP_FRAME fr30_pop_frame()
// OBSOLETE
// OBSOLETE #define USE_GENERIC_DUMMY_FRAMES 1
// OBSOLETE #define CALL_DUMMY {0}
// OBSOLETE #define CALL_DUMMY_START_OFFSET (0)
// OBSOLETE #define CALL_DUMMY_BREAKPOINT_OFFSET (0)
// OBSOLETE #define CALL_DUMMY_LOCATION AT_ENTRY_POINT
// OBSOLETE #define FIX_CALL_DUMMY(DUMMY, START, FUNADDR, NARGS, ARGS, TYPE, GCCP)
// OBSOLETE #define CALL_DUMMY_ADDRESS() entry_point_address ()
// OBSOLETE #define PUSH_RETURN_ADDRESS(PC, SP) (write_register(RP_REGNUM, CALL_DUMMY_ADDRESS()), SP)
// OBSOLETE #define PUSH_DUMMY_FRAME generic_push_dummy_frame ()
// OBSOLETE
// OBSOLETE /* Number of bytes at start of arglist that are not really args. */
// OBSOLETE #define FRAME_ARGS_SKIP 0
// OBSOLETE
// OBSOLETE /* Return the GDB type object for the "standard" data type
// OBSOLETE of data in register N. */
// OBSOLETE #define REGISTER_VIRTUAL_TYPE(REG) builtin_type_int
// 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 #define DEPRECATED_EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
// OBSOLETE memcpy (VALBUF, REGBUF + REGISTER_BYTE(RETVAL_REG) + \
// OBSOLETE (TYPE_LENGTH(TYPE) < 4 ? 4 - TYPE_LENGTH(TYPE) : 0), TYPE_LENGTH (TYPE))
// OBSOLETE
// OBSOLETE /* Extract from an array REGBUF containing the (raw) register state
// OBSOLETE the address in which a function should return its structure value,
// OBSOLETE as a CORE_ADDR (or an expression that can be used as one). */
// OBSOLETE #define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) \
// OBSOLETE extract_address (REGBUF + REGISTER_BYTE (RETVAL_REG), \
// OBSOLETE REGISTER_RAW_SIZE (RETVAL_REG))
// OBSOLETE
// OBSOLETE #define STORE_STRUCT_RETURN(ADDR, SP) \
// OBSOLETE { write_register (RETVAL_REG, (ADDR)); }
// OBSOLETE
// OBSOLETE #define FRAME_ARGS_ADDRESS(fi) ((fi)->frame)
// OBSOLETE #define FRAME_LOCALS_ADDRESS(fi) ((fi)->frame)
// OBSOLETE
// OBSOLETE /* Return number of args passed to a frame.
// OBSOLETE Can return -1, meaning no way to tell. */
// OBSOLETE #define FRAME_NUM_ARGS(fi) (-1)
// OBSOLETE
// OBSOLETE /* Forward decls for prototypes */
// OBSOLETE struct frame_info;
// OBSOLETE struct frame_saved_regs;
// OBSOLETE struct type;
// OBSOLETE struct value;
// OBSOLETE
// OBSOLETE #define EXTRA_FRAME_INFO \
// OBSOLETE struct frame_saved_regs fsr; \
// OBSOLETE int framesize; \
// OBSOLETE int frameoffset; \
// OBSOLETE int framereg;
// OBSOLETE
// OBSOLETE extern CORE_ADDR fr30_frame_chain (struct frame_info *fi);
// OBSOLETE #define FRAME_CHAIN(fi) fr30_frame_chain (fi)
// OBSOLETE
// OBSOLETE extern CORE_ADDR fr30_frame_saved_pc (struct frame_info *);
// OBSOLETE #define FRAME_SAVED_PC(fi) (fr30_frame_saved_pc (fi))
// OBSOLETE
// OBSOLETE #define SAVED_PC_AFTER_CALL(fi) read_register (RP_REGNUM)
// OBSOLETE
// OBSOLETE extern CORE_ADDR fr30_skip_prologue (CORE_ADDR pc);
// OBSOLETE #define SKIP_PROLOGUE(pc) (fr30_skip_prologue (pc))
// OBSOLETE
// OBSOLETE /* Write into appropriate registers a function return value of type
// OBSOLETE TYPE, given in virtual format. VALBUF is in the target byte order;
// OBSOLETE it's typically the VALUE_CONTENTS of some struct value, and those
// OBSOLETE are in the target's byte order. */
// OBSOLETE extern void fr30_store_return_value (struct type *type, char *valbuf);
// OBSOLETE
// OBSOLETE #define STORE_RETURN_VALUE(TYPE,VALBUF) \
// OBSOLETE (fr30_store_return_value ((TYPE), (VALBUF)))
// 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 #define FRAME_FIND_SAVED_REGS(fi, regaddr) regaddr = fi->fsr
// OBSOLETE
// OBSOLETE /* Use INT #BREAKPOINT_INTNUM instruction for breakpoint */
// OBSOLETE #define FR30_BREAKOP 0x1f /* opcode, type D instruction */
// OBSOLETE #define BREAKPOINT_INTNUM 9 /* one of the reserved traps */
// OBSOLETE #define BREAKPOINT {FR30_BREAKOP, BREAKPOINT_INTNUM}
// OBSOLETE
// OBSOLETE /* Define this for Wingdb */
// OBSOLETE #define TARGET_FR30
// OBSOLETE
// OBSOLETE /* Define other aspects of the stack frame. */
// OBSOLETE
// OBSOLETE /* An expression that tells us whether the function invocation represented
// OBSOLETE by FI does not have a frame on the stack associated with it. */
// OBSOLETE extern int fr30_frameless_function_invocation (struct frame_info *frame);
// OBSOLETE #define FRAMELESS_FUNCTION_INVOCATION(FI) (fr30_frameless_function_invocation (FI));
// OBSOLETE
// OBSOLETE extern void fr30_init_extra_frame_info (struct frame_info *fi);
// OBSOLETE #define INIT_EXTRA_FRAME_INFO(fromleaf, fi) fr30_init_extra_frame_info (fi)
// OBSOLETE
// OBSOLETE #define FRAME_CHAIN_VALID(FP, FI) generic_file_frame_chain_valid (FP, FI)
// OBSOLETE
// OBSOLETE extern CORE_ADDR
// OBSOLETE fr30_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
// OBSOLETE int struct_return, CORE_ADDR struct_addr);
// OBSOLETE #define PUSH_ARGUMENTS(NARGS, ARGS, SP, STRUCT_RETURN, STRUCT_ADDR) \
// OBSOLETE (fr30_push_arguments (NARGS, ARGS, SP, STRUCT_RETURN, STRUCT_ADDR))
// OBSOLETE
// OBSOLETE #define PC_IN_CALL_DUMMY(PC, SP, FP) generic_pc_in_call_dummy (PC, SP, FP)
// OBSOLETE
// OBSOLETE /* Fujitsu's ABI requires all structs to be passed using a pointer.
// OBSOLETE That is obviously not very efficient, so I am leaving the definitions
// OBSOLETE to make gdb work with GCC style struct passing, in case we decide
// OBSOLETE to go for better performance, rather than for compatibility with
// OBSOLETE Fujitsu (just change STRUCT_ALWAYS_BY_ADDR to 0) */
// OBSOLETE
// OBSOLETE #define STRUCT_ALWAYS_BY_ADDR 1
// OBSOLETE
// OBSOLETE #if(STRUCT_ALWAYS_BY_ADDR)
// OBSOLETE #define REG_STRUCT_HAS_ADDR(gcc_p,type) 1
// OBSOLETE #else
// OBSOLETE /* more standard GCC (optimized) */
// OBSOLETE #define REG_STRUCT_HAS_ADDR(gcc_p,type) \
// OBSOLETE ((TYPE_LENGTH(type) > 4) && (TYPE_LENGTH(type) & 0x3))
// OBSOLETE #endif
// OBSOLETE /* alway return struct by value by input pointer */
// OBSOLETE #define USE_STRUCT_CONVENTION(GCC_P, TYPE) 1
// OBSOLETE
// OBSOLETE /* The stack should always be aligned on a four-word boundary. */
// OBSOLETE #define STACK_ALIGN(len) (((len) + 3) & ~3)
// OBSOLETE
// OBSOLETE /* I think the comment about this in value_arg_coerce is wrong; this
// OBSOLETE should be true on any system where you can rely on the prototyping
// OBSOLETE information. When this is true, value_arg_coerce will promote
// OBSOLETE floats to doubles iff the function is not prototyped. */
// OBSOLETE #define COERCE_FLOAT_TO_DOUBLE(formal, actual) (1)

View file

@ -1,9 +0,0 @@
# OBSOLETE # Host: IBM PS/2 (i386) running AIX PS/2
# OBSOLETE
# OBSOLETE XM_FILE= xm-i386aix.h
# OBSOLETE
# OBSOLETE NAT_FILE= nm-i386aix.h
# OBSOLETE NATDEPFILES= infptrace.o inftarg.o fork-child.o corelow.o i386aix-nat.o
# OBSOLETE
# OBSOLETE # Use gcc. Only coff output can be debugged
# OBSOLETE CC=gcc

View file

@ -1,7 +0,0 @@
# OBSOLETE # This port, for aix ps/2 (i386), will allow you to debug the coff
# OBSOLETE # output generated gcc-2.3.3 + gas. It will not understand IBM's
# OBSOLETE # proprietary debug info.
# OBSOLETE #
# OBSOLETE # Target: IBM PS/2 (i386) running AIX PS/2
# OBSOLETE TDEPFILES= i386-tdep.o i387-tdep.o
# OBSOLETE TM_FILE= tm-i386aix.h

View file

@ -1,6 +0,0 @@
# OBSOLETE # Host: Intel 386 running Mach3
# OBSOLETE
# OBSOLETE NATDEPFILES= i386m3-nat.o m3-nat.o fork-child.o i387-tdep.o core-aout.o
# OBSOLETE NAT_CLIBS= -lmachid -lnetname -lmach
# OBSOLETE XM_FILE= xm-i386m3.h
# OBSOLETE NAT_FILE= nm-m3.h

View file

@ -1,3 +0,0 @@
# OBSOLETE # Target: Intel 386 with a.out under Mach 3
# OBSOLETE TDEPFILES= i386-tdep.o
# OBSOLETE TM_FILE= tm-i386m3.h

View file

@ -1,9 +0,0 @@
# OBSOLETE # Host: Intel 386 running Mach
# OBSOLETE
# OBSOLETE # This is for mach2, maybe, or is obsolete (and seems to have only
# OBSOLETE # host and native, not target). Once we get the mach3 stuff working,
# OBSOLETE # I think it can go away.
# OBSOLETE
# OBSOLETE XM_FILE= xm-i386mach.h
# OBSOLETE NAT_FILE= nm-i386mach.h
# OBSOLETE NATDEPFILES= infptrace.o inftarg.o fork-child.o i386mach-nat.o

View file

@ -1,3 +0,0 @@
# OBSOLETE # Target: Intel 386 running OS9000
# OBSOLETE TDEPFILES= i386-tdep.o remote-os9k.o
# OBSOLETE TM_FILE= tm-i386os9k.h

View file

@ -1,43 +0,0 @@
// OBSOLETE /* Native support for i386 aix ps/2.
// OBSOLETE Copyright 1986, 1987, 1989, 1992, 1993 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 /*
// OBSOLETE * Changes for IBM AIX PS/2 by Minh Tran-Le (tranle@intellicorp.com)
// OBSOLETE * Revision: 5-May-93 00:11:35
// OBSOLETE */
// OBSOLETE
// OBSOLETE #ifndef NM_I386AIX_H
// OBSOLETE #define NM_I386AIX_H 1
// OBSOLETE
// OBSOLETE /* code to execute to print interesting information about the
// OBSOLETE * floating point processor (if any)
// OBSOLETE * No need to define if there is nothing to do.
// OBSOLETE */
// OBSOLETE #define FLOAT_INFO { i386_float_info (); }
// 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 #undef KERNEL_U_ADDR
// OBSOLETE #define KERNEL_U_ADDR 0xf03fd000
// OBSOLETE
// OBSOLETE /* Override copies of {fetch,store}_inferior_registers in infptrace.c. */
// OBSOLETE #define FETCH_INFERIOR_REGISTERS
// OBSOLETE
// OBSOLETE #endif /* NM_I386AIX_H */

View file

@ -1,30 +0,0 @@
// OBSOLETE /* Native definitions for Mach on an Intel 386
// OBSOLETE Copyright 1986, 1987, 1989, 1991, 1992, 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 #include "regcache.h"
// OBSOLETE
// OBSOLETE /* Do implement the attach and detach commands. */
// OBSOLETE /* #define ATTACH_DETACH 1 */
// OBSOLETE
// OBSOLETE /* Override copies of {fetch,store}_inferior_registers in infptrace.c. */
// OBSOLETE #define FETCH_INFERIOR_REGISTERS
// OBSOLETE
// OBSOLETE #define CHILD_PREPARE_TO_STORE() read_register_bytes (0, NULL, REGISTER_BYTES)

View file

@ -1,23 +0,0 @@
// OBSOLETE /* Native-dependent definitions for Intel 386 running Mach 3.
// OBSOLETE Copyright 1994 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 the generic Mach 3 definitions. */
// OBSOLETE
// OBSOLETE #include "config/nm-m3.h"

View file

@ -1,48 +0,0 @@
// OBSOLETE /* Macro defintions for IBM AIX PS/2 (i386).
// OBSOLETE Copyright 1986, 1987, 1989, 1992, 1993, 1994, 1995, 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 /* Changes for IBM AIX PS/2 by Minh Tran-Le (tranle@intellicorp.com). */
// OBSOLETE
// OBSOLETE #ifndef TM_I386AIX_H
// OBSOLETE #define TM_I386AIX_H 1
// OBSOLETE
// OBSOLETE #include "i386/tm-i386.h"
// OBSOLETE #include <sys/reg.h>
// OBSOLETE
// OBSOLETE #ifndef I386
// OBSOLETE #define I386 1
// OBSOLETE #endif
// OBSOLETE
// OBSOLETE /* AIX/i386 has FPU support. However, the native configuration (which
// OBSOLETE is the only supported configuration) doesn't make the FPU control
// OBSOLETE registers available. Override the appropriate symbols such that
// OBSOLETE only the normal FPU registers are included in GDB's register array. */
// OBSOLETE
// OBSOLETE #undef NUM_FPREGS
// OBSOLETE #define NUM_FPREGS (8)
// OBSOLETE
// OBSOLETE #undef NUM_REGS
// OBSOLETE #define NUM_REGS (NUM_GREGS + NUM_FPREGS)
// OBSOLETE
// OBSOLETE #undef REGISTER_BYTES
// OBSOLETE #define REGISTER_BYTES (SIZEOF_GREGS + SIZEOF_FPU_REGS)
// OBSOLETE
// OBSOLETE #endif /* TM_I386AIX_H */

View file

@ -1,56 +0,0 @@
// OBSOLETE /* Macro definitions for i386, Mach 3.0
// OBSOLETE Copyright 1992, 1993, 1995, 1999 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 common definitions for Mach3 systems */
// OBSOLETE #include "config/nm-m3.h"
// OBSOLETE
// OBSOLETE /* Define offsets to access CPROC stack when it does not have
// OBSOLETE * a kernel thread.
// OBSOLETE */
// OBSOLETE #define MACHINE_CPROC_SP_OFFSET 20
// OBSOLETE #define MACHINE_CPROC_PC_OFFSET 16
// OBSOLETE #define MACHINE_CPROC_FP_OFFSET 12
// OBSOLETE
// OBSOLETE /* Thread flavors used in re-setting the T bit.
// OBSOLETE * @@ this is also bad for cross debugging.
// OBSOLETE */
// OBSOLETE #define TRACE_FLAVOR i386_THREAD_STATE
// OBSOLETE #define TRACE_FLAVOR_SIZE i386_THREAD_STATE_COUNT
// OBSOLETE #define TRACE_SET(x,state) \
// OBSOLETE ((struct i386_thread_state *)state)->efl |= 0x100
// OBSOLETE #define TRACE_CLEAR(x,state) \
// OBSOLETE ((((struct i386_thread_state *)state)->efl &= ~0x100), 1)
// OBSOLETE
// OBSOLETE /* we can do it */
// OBSOLETE #define ATTACH_DETACH 1
// OBSOLETE
// OBSOLETE /* Sigh. There should be a file for i386 but no sysv stuff in it */
// OBSOLETE #include "i386/tm-i386.h"
// OBSOLETE
// OBSOLETE /* I want to test this float info code. See comment in tm-i386v.h */
// OBSOLETE #undef FLOAT_INFO
// OBSOLETE #define FLOAT_INFO { i386_mach3_float_info (); }
// OBSOLETE
// OBSOLETE /* Address of end of stack space.
// OBSOLETE * for MACH, see <machine/vmparam.h>
// OBSOLETE * @@@ I don't know what is in the 5 ints...
// OBSOLETE */
// OBSOLETE #undef STACK_END_ADDR
// OBSOLETE #define STACK_END_ADDR (0xc0000000-sizeof(int [5]))

View file

@ -1,38 +0,0 @@
// OBSOLETE /* Macro definitions for i386, Mach 3.0, OSF 1/MK
// OBSOLETE Copyright 1992, 1993, 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 /* Until OSF switches to a newer Mach kernel that has
// OBSOLETE * a different get_emul_vector() interface.
// OBSOLETE */
// OBSOLETE #define MK67 1
// OBSOLETE
// OBSOLETE #include "i386/tm-i386m3.h"
// OBSOLETE
// OBSOLETE /* FIMXE: kettenis/2000-03-26: On OSF 1, `long double' is equivalent
// OBSOLETE to `double'. However, I'm not sure what is the consequence of:
// OBSOLETE
// OBSOLETE #define TARGET_LONG_DOUBLE_FORMAT TARGET_DOUBLE_FORMAT
// OBSOLETE #define TARGET_LONG_DOUBLE_BIT TARGET_DOUBLE_BIT
// OBSOLETE
// OBSOLETE So I'll go with the current status quo instead. It looks like this
// OBSOLETE target won't compile anyway. Perhaps it should be obsoleted? */
// OBSOLETE
// OBSOLETE #undef TARGET_LONG_DOUBLE_FORMAT
// OBSOLETE #undef TARGET_LONG_DOUBLE_BIT

View file

@ -1,29 +0,0 @@
// OBSOLETE /* Macro defintions for AIX PS/2 (i386)
// OBSOLETE Copyright 1986, 1987, 1989, 1992, 1993 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 /*
// OBSOLETE * Changed for IBM AIX ps/2 by Minh Tran Le (tranle@intellicorp.com)
// OBSOLETE * Revision: 23-Oct-92 17:42:49
// OBSOLETE */
// OBSOLETE
// OBSOLETE #include "i386/xm-i386v.h"
// OBSOLETE
// OBSOLETE #undef HAVE_TERMIO
// OBSOLETE #define HAVE_SGTTY

View file

@ -1,33 +0,0 @@
// OBSOLETE /* Definitions to make GDB run on Mach 3 on an Intel 386
// OBSOLETE Copyright 1986, 1987, 1989, 1991, 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 /* Do implement the attach and detach commands. */
// OBSOLETE #define ATTACH_DETACH 1
// OBSOLETE
// OBSOLETE /* Not needeed */
// OBSOLETE #define KERNEL_U_ADDR 0
// OBSOLETE
// OBSOLETE #ifndef EMULATOR_BASE
// OBSOLETE /* For EMULATOR_BASE and EMULATOR_END.
// OBSOLETE * OSF 1/MK has different values in some other place.
// OBSOLETE */
// OBSOLETE #include <machine/vmparam.h>
// OBSOLETE #endif /* EMULATOR_BASE */

View file

@ -1,28 +0,0 @@
// OBSOLETE /* Definitions to make GDB run on Mach on an Intel 386
// OBSOLETE Copyright 1986, 1987, 1989, 1991, 1992, 1994, 1996, 2001
// 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 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 (0x80000000 - (UPAGES * NBPG))
// OBSOLETE
// OBSOLETE /* <errno.h> only defines this if __STDC__!!! */
// OBSOLETE extern int errno;

View file

@ -1,26 +0,0 @@
// OBSOLETE /* Definitions to make GDB run on Mach 3 OSF 1/MK on an Intel 386
// OBSOLETE Copyright 1992, 1993, 1998 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 HAVE_TERMIO 1
// OBSOLETE
// OBSOLETE #define EMULATOR_BASE 0xa0000000
// OBSOLETE #define EMULATOR_END 0xa0040000
// OBSOLETE
// OBSOLETE #include "i386/xm-i386m3.h"

View file

@ -1,5 +0,0 @@
# OBSOLETE # Target: Intel 960 rom monitor
# OBSOLETE TDEPFILES= i960-tdep.o monitor.o mon960-rom.o ttyflush.o xmodem.o dsrec.o
# OBSOLETE TM_FILE= tm-mon960.h
# OBSOLETE SIM_OBS = remote-sim.o
# OBSOLETE SIM = ../sim/i960/libsim.a

View file

@ -1,3 +0,0 @@
# OBSOLETE # Target: Intel 80960, in an embedded system under the NINDY monitor
# OBSOLETE TDEPFILES= i960-tdep.o nindy-tdep.o remote-nindy.o nindy.o Onindy.o ttyflush.o
# OBSOLETE TM_FILE= tm-nindy960.h

View file

@ -1,345 +0,0 @@
// OBSOLETE /* Parameters for target machine Intel 960, for GDB, the GNU debugger.
// OBSOLETE
// OBSOLETE Copyright 1990, 1991, 1993, 1994, 1996, 1998, 1999, 2000, 2002 Free
// OBSOLETE Software Foundation, Inc.
// OBSOLETE
// OBSOLETE Contributed by Intel Corporation.
// 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 /* Definitions to target GDB to any i960. */
// OBSOLETE
// OBSOLETE #ifndef I80960
// OBSOLETE #define I80960
// OBSOLETE #endif
// OBSOLETE
// OBSOLETE #include "doublest.h"
// OBSOLETE
// OBSOLETE /* Hook for the SYMBOL_CLASS of a parameter when decoding DBX symbol
// OBSOLETE information. In the i960, parameters can be stored as locals or as
// OBSOLETE args, depending on the type of the debug record.
// OBSOLETE
// OBSOLETE From empirical observation, gcc960 uses N_LSYM to indicate
// OBSOLETE arguments passed in registers and then copied immediately
// OBSOLETE to the frame, and N_PSYM to indicate arguments passed in a
// OBSOLETE g14-relative argument block. */
// OBSOLETE
// OBSOLETE #define DBX_PARM_SYMBOL_CLASS(type) ((type == N_LSYM)? LOC_LOCAL_ARG: LOC_ARG)
// OBSOLETE
// OBSOLETE /* Offset from address of function to start of its code.
// OBSOLETE Zero on most machines. */
// OBSOLETE
// OBSOLETE #define FUNCTION_START_OFFSET 0
// OBSOLETE
// OBSOLETE /* Advance ip across any function entry prologue instructions
// OBSOLETE to reach some "real" code. */
// OBSOLETE
// OBSOLETE #define SKIP_PROLOGUE(ip) (i960_skip_prologue (ip))
// OBSOLETE extern CORE_ADDR i960_skip_prologue ();
// OBSOLETE
// OBSOLETE /* Immediately after a function call, return the saved ip.
// OBSOLETE Can't always go through the frames for this because on some machines
// OBSOLETE the new frame is not set up until the new function
// OBSOLETE executes some instructions. */
// OBSOLETE
// OBSOLETE #define SAVED_PC_AFTER_CALL(frame) (saved_pc_after_call (frame))
// OBSOLETE extern CORE_ADDR saved_pc_after_call ();
// OBSOLETE
// OBSOLETE /* Stack grows upward */
// OBSOLETE
// OBSOLETE #define INNER_THAN(lhs,rhs) ((lhs) > (rhs))
// OBSOLETE
// OBSOLETE /* Say how long (ordinary) registers are. This is a piece of bogosity
// OBSOLETE used in push_word and a few other places; REGISTER_RAW_SIZE is the
// OBSOLETE real way to know how big a register is. */
// OBSOLETE
// OBSOLETE #define REGISTER_SIZE 4
// OBSOLETE
// OBSOLETE /* Number of machine registers */
// OBSOLETE #define NUM_REGS 40
// OBSOLETE
// OBSOLETE /* Initializer for an array of names of registers.
// OBSOLETE There should be NUM_REGS strings in this initializer. */
// OBSOLETE
// OBSOLETE #define REGISTER_NAMES { \
// OBSOLETE /* 0 */ "pfp", "sp", "rip", "r3", "r4", "r5", "r6", "r7", \
// OBSOLETE /* 8 */ "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15",\
// OBSOLETE /* 16 */ "g0", "g1", "g2", "g3", "g4", "g5", "g6", "g7", \
// OBSOLETE /* 24 */ "g8", "g9", "g10", "g11", "g12", "g13", "g14", "fp", \
// OBSOLETE /* 32 */ "pcw", "ac", "tc", "ip", "fp0", "fp1", "fp2", "fp3",\
// OBSOLETE }
// OBSOLETE
// OBSOLETE /* Register numbers of various important registers (used to index
// OBSOLETE into arrays of register names and register values). */
// OBSOLETE
// OBSOLETE #define R0_REGNUM 0 /* First local register */
// OBSOLETE #define SP_REGNUM 1 /* Contains address of top of stack */
// OBSOLETE #define RIP_REGNUM 2 /* Return instruction pointer (local r2) */
// OBSOLETE #define R15_REGNUM 15 /* Last local register */
// OBSOLETE #define G0_REGNUM 16 /* First global register */
// OBSOLETE #define G13_REGNUM 29 /* g13 - holds struct return address */
// OBSOLETE #define G14_REGNUM 30 /* g14 - ptr to arg block / leafproc return address */
// OBSOLETE #define FP_REGNUM 31 /* Contains address of executing stack frame */
// OBSOLETE #define PCW_REGNUM 32 /* process control word */
// OBSOLETE #define ACW_REGNUM 33 /* arithmetic control word */
// OBSOLETE #define TCW_REGNUM 34 /* trace control word */
// OBSOLETE #define IP_REGNUM 35 /* instruction pointer */
// OBSOLETE #define FP0_REGNUM 36 /* First floating point register */
// OBSOLETE
// OBSOLETE /* Some registers have more than one name */
// OBSOLETE
// OBSOLETE #define PC_REGNUM IP_REGNUM /* GDB refers to ip as the Program Counter */
// OBSOLETE #define PFP_REGNUM R0_REGNUM /* Previous frame pointer */
// OBSOLETE
// OBSOLETE /* Total amount of space needed to store our copies of the machine's
// OBSOLETE register state, the array `registers'. */
// OBSOLETE #define REGISTER_BYTES ((36*4) + (4*10))
// OBSOLETE
// OBSOLETE /* Index within `registers' of the first byte of the space for register N. */
// OBSOLETE
// OBSOLETE #define REGISTER_BYTE(N) ( (N) < FP0_REGNUM ? \
// OBSOLETE (4*(N)) : ((10*(N)) - (6*FP0_REGNUM)) )
// OBSOLETE
// OBSOLETE /* The i960 has register windows, sort of. */
// OBSOLETE
// OBSOLETE extern void i960_get_saved_register (char *raw_buffer,
// OBSOLETE int *optimized,
// OBSOLETE CORE_ADDR *addrp,
// OBSOLETE struct frame_info *frame,
// OBSOLETE int regnum,
// OBSOLETE enum lval_type *lval);
// OBSOLETE
// OBSOLETE #define GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval) \
// OBSOLETE i960_get_saved_register(raw_buffer, optimized, addrp, frame, regnum, lval)
// OBSOLETE
// OBSOLETE
// OBSOLETE /* Number of bytes of storage in the actual machine representation
// OBSOLETE for register N. On the i960, all regs are 4 bytes except for floating
// OBSOLETE point, which are 10. NINDY only sends us 8 byte values for these,
// OBSOLETE which is a pain, but VxWorks handles this correctly, so we must. */
// OBSOLETE
// OBSOLETE #define REGISTER_RAW_SIZE(N) ( (N) < FP0_REGNUM ? 4 : 10 )
// OBSOLETE
// OBSOLETE /* Number of bytes of storage in the program's representation for register N. */
// OBSOLETE
// OBSOLETE #define REGISTER_VIRTUAL_SIZE(N) ( (N) < FP0_REGNUM ? 4 : 8 )
// OBSOLETE
// OBSOLETE /* Largest value REGISTER_RAW_SIZE can have. */
// OBSOLETE
// OBSOLETE #define MAX_REGISTER_RAW_SIZE 10
// OBSOLETE
// OBSOLETE /* Largest value REGISTER_VIRTUAL_SIZE can have. */
// OBSOLETE
// OBSOLETE #define MAX_REGISTER_VIRTUAL_SIZE 8
// OBSOLETE
// OBSOLETE #include "floatformat.h"
// OBSOLETE
// OBSOLETE #define TARGET_LONG_DOUBLE_FORMAT &floatformat_i960_ext
// OBSOLETE
// OBSOLETE /* Return the GDB type object for the "standard" data type
// OBSOLETE of data in register N. */
// OBSOLETE
// OBSOLETE struct type *i960_register_type (int regnum);
// OBSOLETE #define REGISTER_VIRTUAL_TYPE(N) i960_register_type (N)
// OBSOLETE
// OBSOLETE /* Macros for understanding function return values... */
// OBSOLETE
// OBSOLETE /* Does the specified function use the "struct returning" convention
// OBSOLETE or the "value returning" convention? The "value returning" convention
// OBSOLETE almost invariably returns the entire value in registers. The
// OBSOLETE "struct returning" convention often returns the entire value in
// OBSOLETE memory, and passes a pointer (out of or into the function) saying
// OBSOLETE where the value (is or should go).
// OBSOLETE
// OBSOLETE Since this sometimes depends on whether it was compiled with GCC,
// OBSOLETE this is also an argument. This is used in call_function to build a
// OBSOLETE stack, and in value_being_returned to print return values.
// OBSOLETE
// OBSOLETE On i960, a structure is returned in registers g0-g3, if it will fit.
// OBSOLETE If it's more than 16 bytes long, g13 pointed to it on entry. */
// OBSOLETE
// OBSOLETE extern use_struct_convention_fn i960_use_struct_convention;
// OBSOLETE #define USE_STRUCT_CONVENTION(gcc_p, type) i960_use_struct_convention (gcc_p, type)
// 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. This is only called if USE_STRUCT_CONVENTION for this
// OBSOLETE type is 0.
// OBSOLETE
// OBSOLETE On the i960 we just take as many bytes as we need from G0 through G3. */
// OBSOLETE
// OBSOLETE #define DEPRECATED_EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
// OBSOLETE memcpy(VALBUF, REGBUF+REGISTER_BYTE(G0_REGNUM), TYPE_LENGTH (TYPE))
// OBSOLETE
// OBSOLETE /* If USE_STRUCT_CONVENTION produces a 1,
// OBSOLETE extract from an array REGBUF containing the (raw) register state
// OBSOLETE the address in which a function should return its structure value,
// OBSOLETE as a CORE_ADDR (or an expression that can be used as one).
// OBSOLETE
// OBSOLETE Address of where to put structure was passed in in global
// OBSOLETE register g13 on entry. God knows what's in g13 now. The
// OBSOLETE (..., 0) below is to make it appear to return a value, though
// OBSOLETE actually all it does is call error(). */
// OBSOLETE
// OBSOLETE #define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) \
// OBSOLETE (error("Don't know where large structure is returned on i960"), 0)
// OBSOLETE
// OBSOLETE /* Write into appropriate registers a function return value
// OBSOLETE of type TYPE, given in virtual format, for "value returning" functions.
// OBSOLETE
// OBSOLETE For 'return' command: not (yet) implemented for i960. */
// OBSOLETE
// OBSOLETE #define STORE_RETURN_VALUE(TYPE,VALBUF) \
// OBSOLETE error ("Returning values from functions is not implemented in i960 gdb")
// OBSOLETE
// OBSOLETE /* Store the address of the place in which to copy the structure the
// OBSOLETE subroutine will return. This is called from call_function. */
// OBSOLETE
// OBSOLETE #define STORE_STRUCT_RETURN(ADDR, SP) \
// OBSOLETE error ("Returning values from functions is not implemented in i960 gdb")
// OBSOLETE
// OBSOLETE /* Describe the pointer in each stack frame to the previous stack frame
// OBSOLETE (its caller). */
// OBSOLETE
// OBSOLETE /* FRAME_CHAIN takes a frame's nominal address
// OBSOLETE and produces the frame's chain-pointer.
// OBSOLETE
// OBSOLETE However, if FRAME_CHAIN_VALID returns zero,
// OBSOLETE it means the given frame is the outermost one and has no caller. */
// OBSOLETE
// OBSOLETE /* We cache information about saved registers in the frame structure,
// OBSOLETE to save us from having to re-scan function prologues every time
// OBSOLETE a register in a non-current frame is accessed. */
// OBSOLETE
// OBSOLETE #define EXTRA_FRAME_INFO \
// OBSOLETE struct frame_saved_regs *fsr; \
// OBSOLETE CORE_ADDR arg_pointer;
// OBSOLETE
// OBSOLETE /* Zero the frame_saved_regs pointer when the frame is initialized,
// OBSOLETE so that FRAME_FIND_SAVED_REGS () will know to allocate and
// OBSOLETE initialize a frame_saved_regs struct the first time it is called.
// OBSOLETE Set the arg_pointer to -1, which is not valid; 0 and other values
// OBSOLETE indicate real, cached values. */
// OBSOLETE
// OBSOLETE #define INIT_EXTRA_FRAME_INFO(fromleaf, fi) \
// OBSOLETE ((fi)->fsr = 0, (fi)->arg_pointer = -1)
// OBSOLETE
// OBSOLETE /* On the i960, we get the chain pointer by reading the PFP saved
// OBSOLETE on the stack and clearing the status bits. */
// OBSOLETE
// OBSOLETE #define FRAME_CHAIN(thisframe) \
// OBSOLETE (read_memory_integer (FRAME_FP(thisframe), 4) & ~0xf)
// OBSOLETE
// OBSOLETE /* FRAME_CHAIN_VALID returns zero if the given frame is the outermost one
// OBSOLETE and has no caller.
// OBSOLETE
// OBSOLETE On the i960, each various target system type must define FRAME_CHAIN_VALID,
// OBSOLETE since it differs between NINDY and VxWorks, the two currently supported
// OBSOLETE targets types. We leave it undefined here. */
// OBSOLETE
// OBSOLETE
// OBSOLETE /* A macro that tells us whether the function invocation represented
// OBSOLETE by FI does not have a frame on the stack associated with it. If it
// OBSOLETE does not, FRAMELESS is set to 1, else 0. */
// OBSOLETE
// OBSOLETE CORE_ADDR leafproc_return (CORE_ADDR ip);
// OBSOLETE #define FRAMELESS_FUNCTION_INVOCATION(FI) \
// OBSOLETE (leafproc_return ((FI)->pc) != 0)
// OBSOLETE
// OBSOLETE /* Note that in the i960 architecture the return pointer is saved in the
// OBSOLETE *caller's* stack frame.
// OBSOLETE
// OBSOLETE Make sure to zero low-order bits because of bug in 960CA A-step part
// OBSOLETE (instruction addresses should always be word-aligned anyway). */
// OBSOLETE
// OBSOLETE #define FRAME_SAVED_PC(frame) \
// OBSOLETE ((read_memory_integer(FRAME_CHAIN(frame)+8,4)) & ~3)
// OBSOLETE
// OBSOLETE /* On the i960, FRAME_ARGS_ADDRESS should return the value of
// OBSOLETE g14 as passed into the frame, if known. We need a function for this.
// OBSOLETE We cache this value in the frame info if we've already looked it up. */
// OBSOLETE
// OBSOLETE #define FRAME_ARGS_ADDRESS(fi) \
// OBSOLETE (((fi)->arg_pointer != -1)? (fi)->arg_pointer: frame_args_address (fi, 0))
// OBSOLETE extern CORE_ADDR frame_args_address (); /* i960-tdep.c */
// OBSOLETE
// OBSOLETE /* This is the same except it should return 0 when
// OBSOLETE it does not really know where the args are, rather than guessing.
// OBSOLETE This value is not cached since it is only used infrequently. */
// OBSOLETE
// OBSOLETE #define FRAME_ARGS_ADDRESS_CORRECT(fi) (frame_args_address (fi, 1))
// OBSOLETE
// OBSOLETE #define FRAME_LOCALS_ADDRESS(fi) (fi)->frame
// OBSOLETE
// OBSOLETE /* Set NUMARGS to the number of args passed to a frame.
// OBSOLETE Can return -1, meaning no way to tell. */
// OBSOLETE
// OBSOLETE #define FRAME_NUM_ARGS(fi) (-1)
// OBSOLETE
// OBSOLETE /* Return number of bytes at start of arglist that are not really args. */
// OBSOLETE
// OBSOLETE #define FRAME_ARGS_SKIP 0
// OBSOLETE
// OBSOLETE /* Produce the positions of the saved registers in a stack frame. */
// OBSOLETE
// OBSOLETE #define FRAME_FIND_SAVED_REGS(frame_info_addr, sr) \
// OBSOLETE frame_find_saved_regs (frame_info_addr, &sr)
// OBSOLETE extern void frame_find_saved_regs (); /* See i960-tdep.c */
// OBSOLETE
// OBSOLETE /* Things needed for making calls to functions in the inferior process */
// OBSOLETE
// OBSOLETE /* Push an empty stack frame, to record the current ip, etc.
// OBSOLETE
// OBSOLETE Not (yet?) implemented for i960. */
// OBSOLETE
// OBSOLETE #define PUSH_DUMMY_FRAME \
// OBSOLETE error("Function calls into the inferior process are not supported on the i960")
// OBSOLETE
// OBSOLETE /* Discard from the stack the innermost frame, restoring all registers. */
// OBSOLETE
// OBSOLETE
// OBSOLETE void i960_pop_frame (void);
// OBSOLETE #define POP_FRAME \
// OBSOLETE i960_pop_frame ()
// OBSOLETE
// OBSOLETE
// OBSOLETE /* This sequence of words is the instructions
// OBSOLETE
// OBSOLETE callx 0x00000000
// OBSOLETE fmark
// OBSOLETE */
// OBSOLETE
// OBSOLETE /* #define CALL_DUMMY { 0x86003000, 0x00000000, 0x66003e00 } */
// OBSOLETE
// OBSOLETE /* #define CALL_DUMMY_START_OFFSET 0 *//* Start execution at beginning of dummy */
// OBSOLETE
// OBSOLETE /* Indicate that we don't support calling inferior child functions. */
// OBSOLETE
// OBSOLETE #undef CALL_DUMMY
// OBSOLETE
// OBSOLETE /* Insert the specified number of args and function address
// OBSOLETE into a call sequence of the above form stored at 'dummyname'.
// OBSOLETE
// OBSOLETE Ignore arg count on i960. */
// OBSOLETE
// OBSOLETE /* #define FIX_CALL_DUMMY(dummyname, fun, nargs) *(((int *)dummyname)+1) = fun */
// OBSOLETE
// OBSOLETE #undef FIX_CALL_DUMMY
// OBSOLETE
// OBSOLETE
// OBSOLETE /* Interface definitions for kernel debugger KDB */
// OBSOLETE /* (Not relevant to i960.) */

View file

@ -1,69 +0,0 @@
// OBSOLETE /* Parameters for Intel 960 running MON960 monitor, for GDB, the GNU debugger.
// OBSOLETE Copyright 1990, 1991, 1996, 1999, 2000 Free Software Foundation, Inc.
// OBSOLETE Contributed by Intel Corporation and Cygnus Support.
// 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 /*****************************************************************************
// OBSOLETE * Definitions to target GDB to an i960 debugged over a serial line.
// OBSOLETE ******************************************************************************/
// OBSOLETE
// OBSOLETE #include "i960/tm-i960.h"
// OBSOLETE
// OBSOLETE /* forward declarations */
// OBSOLETE struct frame_info;
// OBSOLETE
// OBSOLETE /* redefined from tm-i960.h */
// OBSOLETE /* Number of machine registers */
// OBSOLETE #undef NUM_REGS
// OBSOLETE #define NUM_REGS 40
// OBSOLETE
// OBSOLETE /* Initializer for an array of names of registers.
// OBSOLETE There should be NUM_REGS strings in this initializer. */
// OBSOLETE #undef REGISTER_NAMES
// OBSOLETE #define REGISTER_NAMES { \
// OBSOLETE /* 0 */ "pfp", "sp", "rip", "r3", "r4", "r5", "r6", "r7", \
// OBSOLETE /* 8 */ "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15",\
// OBSOLETE /* 16 */ "g0", "g1", "g2", "g3", "g4", "g5", "g6", "g7", \
// OBSOLETE /* 24 */ "g8", "g9", "g10", "g11", "g12", "g13", "g14", "fp", \
// OBSOLETE /* 32 */ "pc", "ac", "tc", "ip", "fp0", "fp1", "fp2", "fp3",\
// OBSOLETE }
// OBSOLETE
// OBSOLETE /* Override the standard gdb prompt when compiled for this target. */
// OBSOLETE
// OBSOLETE #define DEFAULT_PROMPT "(gdb960) "
// OBSOLETE
// OBSOLETE /* FRAME_CHAIN_VALID returns zero if the given frame is the outermost one
// OBSOLETE and has no caller.
// OBSOLETE
// OBSOLETE On the i960, each various target system type defines FRAME_CHAIN_VALID,
// OBSOLETE since it differs between Nindy, Mon960 and VxWorks, the currently supported
// OBSOLETE target types. */
// OBSOLETE
// OBSOLETE extern int mon960_frame_chain_valid (CORE_ADDR, struct frame_info *);
// OBSOLETE #define FRAME_CHAIN_VALID(chain, thisframe) mon960_frame_chain_valid (chain, thisframe)
// OBSOLETE
// OBSOLETE /* Sequence of bytes for breakpoint instruction */
// OBSOLETE
// OBSOLETE #define BREAKPOINT {0x00, 0x3e, 0x00, 0x66}
// OBSOLETE
// OBSOLETE /* Amount ip must be decremented by after a breakpoint.
// OBSOLETE * This is often the number of bytes in BREAKPOINT but not always.
// OBSOLETE */
// OBSOLETE
// OBSOLETE #define DECR_PC_AFTER_BREAK 4

View file

@ -1,106 +0,0 @@
// OBSOLETE /* Parameters for Intel 960 running NINDY monitor, for GDB, the GNU debugger.
// OBSOLETE Copyright 1990, 1991, 1996, 1999, 2000 Free Software Foundation, Inc.
// OBSOLETE Contributed by Intel Corporation and Cygnus Support.
// 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 /*****************************************************************************
// OBSOLETE * Definitions to target GDB to an i960 debugged over a serial line.
// OBSOLETE ******************************************************************************/
// OBSOLETE
// OBSOLETE #include "i960/tm-i960.h"
// OBSOLETE
// OBSOLETE /* forward declarations */
// OBSOLETE struct frame_info;
// OBSOLETE
// OBSOLETE /* Override the standard gdb prompt when compiled for this target. */
// OBSOLETE
// OBSOLETE #define DEFAULT_PROMPT "(gdb960) "
// OBSOLETE
// OBSOLETE /* Additional command line options accepted by nindy gdb's, for handling
// OBSOLETE the remote-nindy.c interface. These should really be target-specific
// OBSOLETE rather than architecture-specific. */
// OBSOLETE
// OBSOLETE extern int nindy_old_protocol; /* nonzero if old NINDY serial protocol */
// OBSOLETE extern int nindy_initial_brk; /* Send a BREAK to reset board first */
// OBSOLETE extern char *nindy_ttyname; /* Name of serial port to talk to nindy */
// OBSOLETE
// OBSOLETE #define ADDITIONAL_OPTIONS \
// OBSOLETE {"O", no_argument, &nindy_old_protocol, 1}, \
// OBSOLETE {"brk", no_argument, &nindy_initial_brk, 1}, \
// OBSOLETE {"ser", required_argument, 0, 1004}, /* 1004 is magic cookie for ADDL_CASES */
// OBSOLETE
// OBSOLETE #define ADDITIONAL_OPTION_CASES \
// OBSOLETE case 1004: /* -ser option: remote nindy auto-start */ \
// OBSOLETE nindy_ttyname = optarg; \
// OBSOLETE break;
// OBSOLETE
// OBSOLETE #define ADDITIONAL_OPTION_HELP \
// OBSOLETE "\
// OBSOLETE -O Use old protocol to talk to a Nindy target\n\
// OBSOLETE -brk Send a break to a Nindy target to reset it.\n\
// OBSOLETE -ser SERIAL Open remote Nindy session to SERIAL port.\n\
// OBSOLETE "
// OBSOLETE
// OBSOLETE /* If specified on the command line, open tty for talking to nindy,
// OBSOLETE and download the executable file if one was specified. */
// OBSOLETE
// OBSOLETE extern void nindy_open (char *name, int from_tty);
// OBSOLETE #define ADDITIONAL_OPTION_HANDLER \
// OBSOLETE if (nindy_ttyname != NULL) \
// OBSOLETE { \
// OBSOLETE if (catch_command_errors (nindy_open, nindy_ttyname, \
// OBSOLETE !batch, RETURN_MASK_ALL)) \
// OBSOLETE { \
// OBSOLETE if (execarg != NULL) \
// OBSOLETE catch_command_errors (target_load, execarg, !batch, \
// OBSOLETE RETURN_MASK_ALL); \
// OBSOLETE } \
// OBSOLETE }
// OBSOLETE
// OBSOLETE /* If configured for i960 target, we take control before main loop
// OBSOLETE and demand that we configure for a nindy target. */
// OBSOLETE
// OBSOLETE #define BEFORE_MAIN_LOOP_HOOK \
// OBSOLETE nindy_before_main_loop();
// OBSOLETE
// OBSOLETE extern void
// OBSOLETE nindy_before_main_loop (); /* In remote-nindy.c */
// OBSOLETE
// OBSOLETE /* FRAME_CHAIN_VALID returns zero if the given frame is the outermost one
// OBSOLETE and has no caller.
// OBSOLETE
// OBSOLETE On the i960, each various target system type defines FRAME_CHAIN_VALID,
// OBSOLETE since it differs between NINDY and VxWorks, the two currently supported
// OBSOLETE targets types. */
// OBSOLETE
// OBSOLETE extern int nindy_frame_chain_valid (CORE_ADDR, struct frame_info *);
// OBSOLETE #define FRAME_CHAIN_VALID(chain, thisframe) nindy_frame_chain_valid (chain, thisframe)
// OBSOLETE
// OBSOLETE extern int
// OBSOLETE nindy_frame_chain_valid (); /* See nindy-tdep.c */
// OBSOLETE
// OBSOLETE /* Sequence of bytes for breakpoint instruction */
// OBSOLETE
// OBSOLETE #define BREAKPOINT {0x00, 0x3e, 0x00, 0x66}
// OBSOLETE
// OBSOLETE /* Amount ip must be decremented by after a breakpoint.
// OBSOLETE * This is often the number of bytes in BREAKPOINT but not always.
// OBSOLETE */
// OBSOLETE
// OBSOLETE #define DECR_PC_AFTER_BREAK 0

View file

@ -1,52 +0,0 @@
// OBSOLETE /* Parameters for VxWorks Intel 960's, for GDB, the GNU debugger.
// OBSOLETE Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1993, 1998, 1999
// OBSOLETE Free Software Foundation, Inc.
// OBSOLETE Contributed by Cygnus Support.
// 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 "i960/tm-i960.h"
// OBSOLETE #include "config/tm-vxworks.h"
// OBSOLETE
// OBSOLETE /* Under VxWorks the IP isn't filled in. Skip it, go with RIP, which has
// OBSOLETE the real value. */
// OBSOLETE #undef PC_REGNUM
// OBSOLETE #define PC_REGNUM RIP_REGNUM
// OBSOLETE
// OBSOLETE /* We have more complex, useful breakpoints on the target.
// OBSOLETE Amount ip must be decremented by after a breakpoint. */
// OBSOLETE
// OBSOLETE #define DECR_PC_AFTER_BREAK 0
// OBSOLETE
// OBSOLETE /* We are guaranteed to have a zero frame pointer at bottom of stack, too. */
// OBSOLETE
// OBSOLETE #define FRAME_CHAIN_VALID(chain, thisframe) nonnull_frame_chain_valid (chain, thisframe)
// OBSOLETE
// OBSOLETE /* Breakpoint patching is handled at the target end in VxWorks. */
// OBSOLETE /* #define BREAKPOINT {0x00, 0x3e, 0x00, 0x66} */
// OBSOLETE
// OBSOLETE /* Number of registers in a ptrace_getregs call. */
// OBSOLETE
// OBSOLETE #define VX_NUM_REGS (16 + 16 + 3)
// OBSOLETE
// OBSOLETE /* Number of registers in a ptrace_getfpregs call. */
// OBSOLETE
// OBSOLETE /* @@ Can't use this -- the rdb library for the 960 target
// OBSOLETE doesn't support setting or retrieving FP regs. KR */
// OBSOLETE
// OBSOLETE /* #define VX_SIZE_FPREGS (REGISTER_RAW_SIZE (FP0_REGNUM) * 4) */

View file

@ -1,6 +0,0 @@
# OBSOLETE # Target: VxWorks running on an Intel 960
# OBSOLETE TDEPFILES= i960-tdep.o remote-vx.o remote-vx960.o xdr_ld.o xdr_ptrace.o xdr_rdb.o
# OBSOLETE TM_FILE= tm-vx960.h
# OBSOLETE
# OBSOLETE # Define this for the vx-share routines, which don't see param.h.
# OBSOLETE MT_CFLAGS= -DI80960

View file

@ -1,5 +0,0 @@
# OBSOLETE # Host: Apollo m68k, BSD mode.
# OBSOLETE
# OBSOLETE XM_FILE= xm-apollo68b.h
# OBSOLETE NAT_FILE= nm-apollo68b.h
# OBSOLETE NATDEPFILES= infptrace.o inftarg.o fork-child.o a68v-nat.o

View file

@ -1,3 +0,0 @@
# OBSOLETE # Target: Apollo m68k in BSD mode
# OBSOLETE TDEPFILES= m68k-tdep.o dstread.o
# OBSOLETE TM_FILE= tm-apollo68b.h

View file

@ -1,10 +0,0 @@
# OBSOLETE # Host: Apollo, System V mode (?)
# OBSOLETE
# OBSOLETE XM_FILE= xm-apollo68v.h
# OBSOLETE XM_CLIBS= -lPW
# OBSOLETE
# OBSOLETE NAT_FILE= nm-apollo68v.h
# OBSOLETE NATDEPFILES= infptrace.o inftarg.o fork-child.o a68v-nat.o
# OBSOLETE
# OBSOLETE RANLIB=echo >/dev/null
# OBSOLETE CC= cc -A ansi -A runtype,any -A systype,any -U__STDC__ -DNO_SYS_FILE

View file

@ -1,6 +0,0 @@
# OBSOLETE # Host: Hewlett-Packard 9000 series 300, running BSD
# OBSOLETE
# OBSOLETE XM_FILE= xm-hp300bsd.h
# OBSOLETE
# OBSOLETE NAT_FILE= nm-hp300bsd.h
# OBSOLETE NATDEPFILES= infptrace.o inftarg.o fork-child.o corelow.o core-aout.o

View file

@ -1,3 +0,0 @@
# OBSOLETE # Target: Hewlett-Packard 9000 series 300, running BSD
# OBSOLETE TDEPFILES= m68k-tdep.o
# OBSOLETE TM_FILE= tm-hp300bsd.h

View file

@ -1,8 +0,0 @@
# OBSOLETE # Host: Hewlett-Packard 9000 series 300, running HPUX
# OBSOLETE # The following is true because gcc uses a different .o file format
# OBSOLETE # than the native HPUX compiler
# OBSOLETE
# OBSOLETE XM_FILE= xm-hp300hpux.h
# OBSOLETE
# OBSOLETE NAT_FILE= nm-hp300hpux.h
# OBSOLETE NATDEPFILES= infptrace.o inftarg.o fork-child.o hp300ux-nat.o corelow.o core-aout.o

View file

@ -1,8 +0,0 @@
# OBSOLETE # Target: Hewlett-Packard 9000 series 300, running HPUX
# OBSOLETE
# OBSOLETE #msg Note that GDB can only read symbols from programs that were
# OBSOLETE #msg compiled with GCC using GAS.
# OBSOLETE #msg
# OBSOLETE
# OBSOLETE TDEPFILES= m68k-tdep.o
# OBSOLETE TM_FILE= tm-hp300hpux.h

View file

@ -1,6 +0,0 @@
# OBSOLETE # Host: Motorola 88k running SVR3
# OBSOLETE
# OBSOLETE XM_FILE= xm-delta88.h
# OBSOLETE
# OBSOLETE NAT_FILE= nm-m88k.h
# OBSOLETE NATDEPFILES= infptrace.o inftarg.o fork-child.o m88k-nat.o corelow.o core-aout.o

View file

@ -1,3 +0,0 @@
# OBSOLETE # Target: Motorola 88k running SVR3
# OBSOLETE TDEPFILES= m88k-tdep.o
# OBSOLETE TM_FILE= tm-delta88.h

View file

@ -1,8 +0,0 @@
# OBSOLETE # Host: Motorola 88k running SVR4
# OBSOLETE
# OBSOLETE XM_FILE= xm-delta88v4.h
# OBSOLETE
# OBSOLETE NAT_FILE= nm-delta88v4.h
# OBSOLETE NATDEPFILES= fork-child.o m88k-nat.o corelow.o core-regset.o \
# OBSOLETE solib.o solib-svr4.o solib-legacy.o \
# OBSOLETE procfs.o proc-api.o proc-events.o proc-flags.o proc-why.o

View file

@ -1,3 +0,0 @@
# OBSOLETE # Target: Motorola 88k running SVR4
# OBSOLETE TDEPFILES= m88k-tdep.o
# OBSOLETE TM_FILE= tm-delta88v4.h

View file

@ -1,4 +0,0 @@
# OBSOLETE # Host: Motorola 88000 running DGUX
# OBSOLETE XM_FILE= xm-dgux.h
# OBSOLETE NAT_FILE= nm-m88k.h
# OBSOLETE NATDEPFILES= infptrace.o inftarg.o fork-child.o m88k-nat.o

View file

@ -1,3 +0,0 @@
# OBSOLETE # Target: Motorola 88k Binary Compatibility Standard
# OBSOLETE TDEPFILES= m88k-tdep.o remote-bug.o
# OBSOLETE TM_FILE= tm-m88k.h

View file

@ -1,23 +0,0 @@
// OBSOLETE /* Native machine description for Motorola Delta 88 box, for GDB.
// OBSOLETE Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1993
// 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 "m88k/nm-m88k.h"
// OBSOLETE #include "config/nm-sysv4.h"

View file

@ -1,25 +0,0 @@
// OBSOLETE /* Native support macros for m88k, for GDB.
// OBSOLETE Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1992
// 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 FETCH_INFERIOR_REGISTERS
// OBSOLETE
// OBSOLETE #define REGISTER_U_ADDR(addr, blockend, regno) \
// OBSOLETE (addr) = m88k_register_u_addr ((blockend),(regno));

View file

@ -1,28 +0,0 @@
// OBSOLETE /* Target machine description for Motorola Delta 88 box, for GDB.
// OBSOLETE Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1993, 1994
// 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 "m88k/tm-m88k.h"
// OBSOLETE
// OBSOLETE #define DELTA88
// OBSOLETE
// OBSOLETE #define IN_SIGTRAMP(pc, name) ((name) && STREQ ("_sigcode", (name)))
// OBSOLETE #define SIGTRAMP_FRAME_FIXUP(frame) (frame) += 0x20
// OBSOLETE #define SIGTRAMP_SP_FIXUP(sp) (sp) = read_memory_integer((sp), 4)

View file

@ -1,32 +0,0 @@
// OBSOLETE /* Target machine description for Motorola Delta 88 box, for GDB.
// OBSOLETE Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1993, 1994, 1998, 1999
// 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 DELTA88
// OBSOLETE
// OBSOLETE #include "m88k/tm-m88k.h"
// OBSOLETE #include "config/tm-sysv4.h"
// OBSOLETE
// OBSOLETE /* If we don't define this, backtraces go on forever. */
// OBSOLETE #define FRAME_CHAIN_VALID(fp,fi) func_frame_chain_valid (fp, fi)
// OBSOLETE
// OBSOLETE #define IN_SIGTRAMP(pc, name) ((name) && (STREQ ("signalhandler", (name)) \
// OBSOLETE || STREQ("sigacthandler", (name))))
// OBSOLETE #define SIGTRAMP_SP_FIXUP(sp) (sp) = read_memory_integer((sp)+0xcd8, 4)

View file

@ -1,587 +0,0 @@
// OBSOLETE /* Target machine description for generic Motorola 88000, for GDB.
// OBSOLETE
// OBSOLETE Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1993, 1994, 1996,
// OBSOLETE 1998, 1999, 2000, 2002 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 "doublest.h"
// OBSOLETE #include "regcache.h"
// OBSOLETE
// OBSOLETE /* g++ support is not yet included. */
// OBSOLETE
// OBSOLETE /* We cache information about saved registers in the frame structure,
// OBSOLETE to save us from having to re-scan function prologues every time
// OBSOLETE a register in a non-current frame is accessed. */
// OBSOLETE
// OBSOLETE #define EXTRA_FRAME_INFO \
// OBSOLETE struct frame_saved_regs *fsr; \
// OBSOLETE CORE_ADDR locals_pointer; \
// OBSOLETE CORE_ADDR args_pointer;
// OBSOLETE
// OBSOLETE /* Zero the frame_saved_regs pointer when the frame is initialized,
// OBSOLETE so that FRAME_FIND_SAVED_REGS () will know to allocate and
// OBSOLETE initialize a frame_saved_regs struct the first time it is called.
// OBSOLETE Set the arg_pointer to -1, which is not valid; 0 and other values
// OBSOLETE indicate real, cached values. */
// OBSOLETE
// OBSOLETE #define INIT_EXTRA_FRAME_INFO(fromleaf, fi) \
// OBSOLETE init_extra_frame_info (fromleaf, fi)
// OBSOLETE extern void init_extra_frame_info ();
// OBSOLETE
// OBSOLETE /* Offset from address of function to start of its code.
// OBSOLETE Zero on most machines. */
// OBSOLETE
// OBSOLETE #define FUNCTION_START_OFFSET 0
// OBSOLETE
// OBSOLETE /* Advance PC across any function entry prologue instructions
// OBSOLETE to reach some "real" code. */
// OBSOLETE
// OBSOLETE extern CORE_ADDR m88k_skip_prologue (CORE_ADDR);
// OBSOLETE #define SKIP_PROLOGUE(frompc) (m88k_skip_prologue (frompc))
// OBSOLETE
// OBSOLETE /* The m88k kernel aligns all instructions on 4-byte boundaries. The
// OBSOLETE kernel also uses the least significant two bits for its own hocus
// OBSOLETE pocus. When gdb receives an address from the kernel, it needs to
// OBSOLETE preserve those right-most two bits, but gdb also needs to be careful
// OBSOLETE to realize that those two bits are not really a part of the address
// OBSOLETE of an instruction. Shrug. */
// OBSOLETE
// OBSOLETE extern CORE_ADDR m88k_addr_bits_remove (CORE_ADDR);
// OBSOLETE #define ADDR_BITS_REMOVE(addr) m88k_addr_bits_remove (addr)
// OBSOLETE
// OBSOLETE /* Immediately after a function call, return the saved pc.
// OBSOLETE Can't always go through the frames for this because on some machines
// OBSOLETE the new frame is not set up until the new function executes
// OBSOLETE some instructions. */
// OBSOLETE
// OBSOLETE #define SAVED_PC_AFTER_CALL(frame) \
// OBSOLETE (ADDR_BITS_REMOVE (read_register (SRP_REGNUM)))
// OBSOLETE
// OBSOLETE /* Stack grows downward. */
// OBSOLETE
// OBSOLETE #define INNER_THAN(lhs,rhs) ((lhs) < (rhs))
// OBSOLETE
// OBSOLETE /* Sequence of bytes for breakpoint instruction. */
// OBSOLETE
// OBSOLETE /* instruction 0xF000D1FF is 'tb0 0,r0,511'
// OBSOLETE If Bit bit 0 of r0 is clear (always true),
// OBSOLETE initiate exception processing (trap).
// OBSOLETE */
// OBSOLETE #define BREAKPOINT {0xF0, 0x00, 0xD1, 0xFF}
// 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
// OBSOLETE #define DECR_PC_AFTER_BREAK 0
// OBSOLETE
// OBSOLETE /* Say how long (ordinary) registers are. This is a piece of bogosity
// OBSOLETE used in push_word and a few other places; REGISTER_RAW_SIZE is the
// OBSOLETE real way to know how big a register is. */
// OBSOLETE
// OBSOLETE #define REGISTER_SIZE 4
// OBSOLETE
// OBSOLETE /* Number of machine registers */
// OBSOLETE
// OBSOLETE #define GP_REGS (38)
// OBSOLETE #define FP_REGS (32)
// OBSOLETE #define NUM_REGS (GP_REGS + FP_REGS)
// OBSOLETE
// OBSOLETE /* Initializer for an array of names of registers.
// OBSOLETE There should be NUM_REGS strings in this initializer. */
// OBSOLETE
// OBSOLETE #define REGISTER_NAMES {\
// OBSOLETE "r0",\
// OBSOLETE "r1",\
// OBSOLETE "r2",\
// OBSOLETE "r3",\
// OBSOLETE "r4",\
// OBSOLETE "r5",\
// OBSOLETE "r6",\
// OBSOLETE "r7",\
// OBSOLETE "r8",\
// OBSOLETE "r9",\
// OBSOLETE "r10",\
// OBSOLETE "r11",\
// OBSOLETE "r12",\
// OBSOLETE "r13",\
// OBSOLETE "r14",\
// OBSOLETE "r15",\
// OBSOLETE "r16",\
// OBSOLETE "r17",\
// OBSOLETE "r18",\
// OBSOLETE "r19",\
// OBSOLETE "r20",\
// OBSOLETE "r21",\
// OBSOLETE "r22",\
// OBSOLETE "r23",\
// OBSOLETE "r24",\
// OBSOLETE "r25",\
// OBSOLETE "r26",\
// OBSOLETE "r27",\
// OBSOLETE "r28",\
// OBSOLETE "r29",\
// OBSOLETE "r30",\
// OBSOLETE "r31",\
// OBSOLETE "psr",\
// OBSOLETE "fpsr",\
// OBSOLETE "fpcr",\
// OBSOLETE "sxip",\
// OBSOLETE "snip",\
// OBSOLETE "sfip",\
// OBSOLETE "x0",\
// OBSOLETE "x1",\
// OBSOLETE "x2",\
// OBSOLETE "x3",\
// OBSOLETE "x4",\
// OBSOLETE "x5",\
// OBSOLETE "x6",\
// OBSOLETE "x7",\
// OBSOLETE "x8",\
// OBSOLETE "x9",\
// OBSOLETE "x10",\
// OBSOLETE "x11",\
// OBSOLETE "x12",\
// OBSOLETE "x13",\
// OBSOLETE "x14",\
// OBSOLETE "x15",\
// OBSOLETE "x16",\
// OBSOLETE "x17",\
// OBSOLETE "x18",\
// OBSOLETE "x19",\
// OBSOLETE "x20",\
// OBSOLETE "x21",\
// OBSOLETE "x22",\
// OBSOLETE "x23",\
// OBSOLETE "x24",\
// OBSOLETE "x25",\
// OBSOLETE "x26",\
// OBSOLETE "x27",\
// OBSOLETE "x28",\
// OBSOLETE "x29",\
// OBSOLETE "x30",\
// OBSOLETE "x31",\
// OBSOLETE "vbr",\
// OBSOLETE "dmt0",\
// OBSOLETE "dmd0",\
// OBSOLETE "dma0",\
// OBSOLETE "dmt1",\
// OBSOLETE "dmd1",\
// OBSOLETE "dma1",\
// OBSOLETE "dmt2",\
// OBSOLETE "dmd2",\
// OBSOLETE "dma2",\
// OBSOLETE "sr0",\
// OBSOLETE "sr1",\
// OBSOLETE "sr2",\
// OBSOLETE "sr3",\
// OBSOLETE "fpecr",\
// OBSOLETE "fphs1",\
// OBSOLETE "fpls1",\
// OBSOLETE "fphs2",\
// OBSOLETE "fpls2",\
// OBSOLETE "fppt",\
// OBSOLETE "fprh",\
// OBSOLETE "fprl",\
// OBSOLETE "fpit",\
// OBSOLETE "fpsr",\
// OBSOLETE "fpcr",\
// OBSOLETE }
// OBSOLETE
// OBSOLETE
// OBSOLETE /* Register numbers of various important registers.
// OBSOLETE Note that some of these values are "real" register numbers,
// OBSOLETE and correspond to the general registers of the machine,
// OBSOLETE and some are "phony" register numbers which are too large
// OBSOLETE to be actual register numbers as far as the user is concerned
// OBSOLETE but do serve to get the desired values when passed to read_register. */
// OBSOLETE
// OBSOLETE #define R0_REGNUM 0 /* Contains the constant zero */
// OBSOLETE #define SRP_REGNUM 1 /* Contains subroutine return pointer */
// OBSOLETE #define RV_REGNUM 2 /* Contains simple return values */
// OBSOLETE #define SRA_REGNUM 12 /* Contains address of struct return values */
// OBSOLETE #define SP_REGNUM 31 /* Contains address of top of stack */
// OBSOLETE
// OBSOLETE /* Instruction pointer notes...
// OBSOLETE
// OBSOLETE On the m88100:
// OBSOLETE
// OBSOLETE * cr04 = sxip. On exception, contains the excepting pc (probably).
// OBSOLETE On rte, is ignored.
// OBSOLETE
// OBSOLETE * cr05 = snip. On exception, contains the NPC (next pc). On rte,
// OBSOLETE pc is loaded from here.
// OBSOLETE
// OBSOLETE * cr06 = sfip. On exception, contains the NNPC (next next pc). On
// OBSOLETE rte, the NPC is loaded from here.
// OBSOLETE
// OBSOLETE * lower two bits of each are flag bits. Bit 1 is V means address
// OBSOLETE is valid. If address is not valid, bit 0 is ignored. Otherwise,
// OBSOLETE bit 0 is E and asks for an exception to be taken if this
// OBSOLETE instruction is executed.
// OBSOLETE
// OBSOLETE On the m88110:
// OBSOLETE
// OBSOLETE * cr04 = exip. On exception, contains the address of the excepting
// OBSOLETE pc (always). On rte, pc is loaded from here. Bit 0, aka the D
// OBSOLETE bit, is a flag saying that the offending instruction was in a
// OBSOLETE branch delay slot. If set, then cr05 contains the NPC.
// OBSOLETE
// OBSOLETE * cr05 = enip. On exception, if the instruction pointed to by cr04
// OBSOLETE was in a delay slot as indicated by the bit 0 of cr04, aka the D
// OBSOLETE bit, the cr05 contains the NPC. Otherwise ignored.
// OBSOLETE
// OBSOLETE * cr06 is invalid */
// OBSOLETE
// OBSOLETE /* Note that the Harris Unix kernels emulate the m88100's behavior on
// OBSOLETE the m88110. */
// OBSOLETE
// OBSOLETE #define SXIP_REGNUM 35 /* On m88100, Contains Shadow Execute
// OBSOLETE Instruction Pointer. */
// OBSOLETE #define SNIP_REGNUM 36 /* On m88100, Contains Shadow Next
// OBSOLETE Instruction Pointer. */
// OBSOLETE #define SFIP_REGNUM 37 /* On m88100, Contains Shadow Fetched
// OBSOLETE Intruction pointer. */
// OBSOLETE
// OBSOLETE #define EXIP_REGNUM 35 /* On m88110, Contains Exception
// OBSOLETE Executing Instruction Pointer. */
// OBSOLETE #define ENIP_REGNUM 36 /* On m88110, Contains the Exception
// OBSOLETE Next Instruction Pointer. */
// OBSOLETE
// OBSOLETE #define PC_REGNUM SXIP_REGNUM /* Program Counter */
// OBSOLETE #define NPC_REGNUM SNIP_REGNUM /* Next Program Counter */
// OBSOLETE #define M88K_NNPC_REGNUM SFIP_REGNUM /* Next Next Program Counter */
// OBSOLETE
// OBSOLETE
// OBSOLETE #define PSR_REGNUM 32 /* Processor Status Register */
// OBSOLETE #define FPSR_REGNUM 33 /* Floating Point Status Register */
// OBSOLETE #define FPCR_REGNUM 34 /* Floating Point Control Register */
// OBSOLETE #define XFP_REGNUM 38 /* First Extended Float Register */
// OBSOLETE #define X0_REGNUM XFP_REGNUM /* Which also contains the constant zero */
// OBSOLETE
// OBSOLETE /* This is rather a confusing lie. Our m88k port using a stack pointer value
// OBSOLETE for the frame address. Hence, the frame address and the frame pointer are
// OBSOLETE only indirectly related. The value of this macro is the register number
// OBSOLETE fetched by the machine "independent" portions of gdb when they want to know
// OBSOLETE about a frame address. Thus, we lie here and claim that FP_REGNUM is
// OBSOLETE SP_REGNUM. */
// OBSOLETE #define FP_REGNUM SP_REGNUM /* Reg fetched to locate frame when pgm stops */
// OBSOLETE #define ACTUAL_FP_REGNUM 30
// OBSOLETE
// OBSOLETE /* PSR status bit definitions. */
// OBSOLETE
// OBSOLETE #define PSR_MODE 0x80000000
// OBSOLETE #define PSR_BYTE_ORDER 0x40000000
// OBSOLETE #define PSR_SERIAL_MODE 0x20000000
// OBSOLETE #define PSR_CARRY 0x10000000
// OBSOLETE #define PSR_SFU_DISABLE 0x000003f0
// OBSOLETE #define PSR_SFU1_DISABLE 0x00000008
// OBSOLETE #define PSR_MXM 0x00000004
// OBSOLETE #define PSR_IND 0x00000002
// OBSOLETE #define PSR_SFRZ 0x00000001
// OBSOLETE
// OBSOLETE
// OBSOLETE
// OBSOLETE /* The following two comments come from the days prior to the m88110
// OBSOLETE port. The m88110 handles the instruction pointers differently. I
// OBSOLETE do not know what any m88110 kernels do as the m88110 port I'm
// OBSOLETE working with is for an embedded system. rich@cygnus.com
// OBSOLETE 13-sept-93. */
// OBSOLETE
// OBSOLETE /* BCS requires that the SXIP_REGNUM (or PC_REGNUM) contain the
// OBSOLETE address of the next instr to be executed when a breakpoint occurs.
// OBSOLETE Because the kernel gets the next instr (SNIP_REGNUM), the instr in
// OBSOLETE SNIP needs to be put back into SFIP, and the instr in SXIP should
// OBSOLETE be shifted to SNIP */
// OBSOLETE
// OBSOLETE /* Are you sitting down? It turns out that the 88K BCS (binary
// OBSOLETE compatibility standard) folks originally felt that the debugger
// OBSOLETE should be responsible for backing up the IPs, not the kernel (as is
// OBSOLETE usually done). Well, they have reversed their decision, and in
// OBSOLETE future releases our kernel will be handling the backing up of the
// OBSOLETE IPs. So, eventually, we won't need to do the SHIFT_INST_REGS
// OBSOLETE stuff. But, for now, since there are 88K systems out there that do
// OBSOLETE need the debugger to do the IP shifting, and since there will be
// OBSOLETE systems where the kernel does the shifting, the code is a little
// OBSOLETE more complex than perhaps it needs to be (we still go inside
// OBSOLETE SHIFT_INST_REGS, and if the shifting hasn't occurred then gdb goes
// OBSOLETE ahead and shifts). */
// OBSOLETE
// OBSOLETE extern int target_is_m88110;
// OBSOLETE #define SHIFT_INST_REGS() \
// OBSOLETE if (!target_is_m88110) \
// OBSOLETE { \
// OBSOLETE CORE_ADDR pc = read_register (PC_REGNUM); \
// OBSOLETE CORE_ADDR npc = read_register (NPC_REGNUM); \
// OBSOLETE if (pc != npc) \
// OBSOLETE { \
// OBSOLETE write_register (M88K_NNPC_REGNUM, npc); \
// OBSOLETE write_register (NPC_REGNUM, pc); \
// OBSOLETE } \
// OBSOLETE }
// OBSOLETE
// OBSOLETE /* Storing the following registers is a no-op. */
// OBSOLETE #define CANNOT_STORE_REGISTER(regno) (((regno) == R0_REGNUM) \
// OBSOLETE || ((regno) == X0_REGNUM))
// OBSOLETE
// OBSOLETE /* Number of bytes of storage in the actual machine representation
// OBSOLETE for register N. On the m88k, the general purpose registers are 4
// OBSOLETE bytes and the 88110 extended registers are 10 bytes. */
// OBSOLETE
// OBSOLETE #define REGISTER_RAW_SIZE(N) ((N) < XFP_REGNUM ? 4 : 10)
// OBSOLETE
// OBSOLETE /* Total amount of space needed to store our copies of the machine's
// OBSOLETE register state, the array `registers'. */
// OBSOLETE
// OBSOLETE #define REGISTER_BYTES ((GP_REGS * REGISTER_RAW_SIZE(0)) \
// OBSOLETE + (FP_REGS * REGISTER_RAW_SIZE(XFP_REGNUM)))
// OBSOLETE
// OBSOLETE /* Index within `registers' of the first byte of the space for
// OBSOLETE register N. */
// OBSOLETE
// OBSOLETE #define REGISTER_BYTE(N) (((N) * REGISTER_RAW_SIZE(0)) \
// OBSOLETE + ((N) >= XFP_REGNUM \
// OBSOLETE ? (((N) - XFP_REGNUM) \
// OBSOLETE * REGISTER_RAW_SIZE(XFP_REGNUM)) \
// OBSOLETE : 0))
// OBSOLETE
// OBSOLETE /* Number of bytes of storage in the program's representation for
// OBSOLETE register N. On the m88k, all registers are 4 bytes excepting the
// OBSOLETE m88110 extended registers which are 8 byte doubles. */
// OBSOLETE
// OBSOLETE #define REGISTER_VIRTUAL_SIZE(N) ((N) < XFP_REGNUM ? 4 : 8)
// OBSOLETE
// OBSOLETE /* Largest value REGISTER_RAW_SIZE can have. */
// OBSOLETE
// OBSOLETE #define MAX_REGISTER_RAW_SIZE (REGISTER_RAW_SIZE(XFP_REGNUM))
// OBSOLETE
// OBSOLETE /* Largest value REGISTER_VIRTUAL_SIZE can have.
// OBSOLETE Are FPS1, FPS2, FPR "virtual" regisers? */
// OBSOLETE
// OBSOLETE #define MAX_REGISTER_VIRTUAL_SIZE (REGISTER_RAW_SIZE(XFP_REGNUM))
// OBSOLETE
// OBSOLETE /* Return the GDB type object for the "standard" data type
// OBSOLETE of data in register N. */
// OBSOLETE
// OBSOLETE struct type *m88k_register_type (int regnum);
// OBSOLETE #define REGISTER_VIRTUAL_TYPE(N) m88k_register_type (N)
// OBSOLETE
// OBSOLETE /* The 88k call/return conventions call for "small" values to be returned
// OBSOLETE into consecutive registers starting from r2. */
// OBSOLETE
// OBSOLETE #define DEPRECATED_EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
// OBSOLETE memcpy ((VALBUF), &(((char *)REGBUF)[REGISTER_BYTE(RV_REGNUM)]), TYPE_LENGTH (TYPE))
// OBSOLETE
// OBSOLETE #define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) (*(int *)(REGBUF))
// OBSOLETE
// OBSOLETE /* Write into appropriate registers a function return value
// OBSOLETE of type TYPE, given in virtual format. */
// OBSOLETE
// OBSOLETE #define STORE_RETURN_VALUE(TYPE,VALBUF) \
// OBSOLETE write_register_bytes (2*REGISTER_RAW_SIZE(0), (VALBUF), TYPE_LENGTH (TYPE))
// OBSOLETE
// OBSOLETE /* In COFF, if PCC says a parameter is a short or a char, do not
// OBSOLETE change it to int (it seems the convention is to change it). */
// OBSOLETE
// OBSOLETE #define BELIEVE_PCC_PROMOTION 1
// OBSOLETE
// OBSOLETE /* Describe the pointer in each stack frame to the previous stack frame
// OBSOLETE (its caller). */
// OBSOLETE
// OBSOLETE /* FRAME_CHAIN takes a frame's nominal address
// OBSOLETE and produces the frame's chain-pointer.
// OBSOLETE
// OBSOLETE However, if FRAME_CHAIN_VALID returns zero,
// OBSOLETE it means the given frame is the outermost one and has no caller. */
// OBSOLETE
// OBSOLETE extern CORE_ADDR frame_chain ();
// OBSOLETE extern int frame_chain_valid ();
// OBSOLETE extern int frameless_function_invocation ();
// OBSOLETE
// OBSOLETE #define FRAME_CHAIN(thisframe) \
// OBSOLETE frame_chain (thisframe)
// OBSOLETE
// OBSOLETE #define FRAMELESS_FUNCTION_INVOCATION(frame) \
// OBSOLETE (frameless_function_invocation (frame))
// OBSOLETE
// OBSOLETE /* Define other aspects of the stack frame. */
// OBSOLETE
// OBSOLETE #define FRAME_SAVED_PC(FRAME) \
// OBSOLETE frame_saved_pc (FRAME)
// OBSOLETE extern CORE_ADDR frame_saved_pc ();
// OBSOLETE
// OBSOLETE #define FRAME_ARGS_ADDRESS(fi) \
// OBSOLETE frame_args_address (fi)
// OBSOLETE extern CORE_ADDR frame_args_address ();
// OBSOLETE
// OBSOLETE #define FRAME_LOCALS_ADDRESS(fi) \
// OBSOLETE frame_locals_address (fi)
// OBSOLETE extern CORE_ADDR frame_locals_address ();
// OBSOLETE
// OBSOLETE /* Return number of args passed to a frame.
// OBSOLETE Can return -1, meaning no way to tell. */
// OBSOLETE
// OBSOLETE #define FRAME_NUM_ARGS(fi) (-1)
// OBSOLETE
// OBSOLETE /* Return number of bytes at start of arglist that are not really args. */
// OBSOLETE
// OBSOLETE #define FRAME_ARGS_SKIP 0
// 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 /* On the 88k, parameter registers get stored into the so called "homing"
// OBSOLETE area. This *always* happens when you compiled with GCC and use -g.
// OBSOLETE Also, (with GCC and -g) the saving of the parameter register values
// OBSOLETE always happens right within the function prologue code, so these register
// OBSOLETE values can generally be relied upon to be already copied into their
// OBSOLETE respective homing slots by the time you will normally try to look at
// OBSOLETE them (we hope).
// OBSOLETE
// OBSOLETE Note that homing area stack slots are always at *positive* offsets from
// OBSOLETE the frame pointer. Thus, the homing area stack slots for the parameter
// OBSOLETE registers (passed values) for a given function are actually part of the
// OBSOLETE frame area of the caller. This is unusual, but it should not present
// OBSOLETE any special problems for GDB.
// OBSOLETE
// OBSOLETE Note also that on the 88k, we are only interested in finding the
// OBSOLETE registers that might have been saved in memory. This is a subset of
// OBSOLETE the whole set of registers because the standard calling sequence allows
// OBSOLETE the called routine to clobber many registers.
// OBSOLETE
// OBSOLETE We could manage to locate values for all of the so called "preserved"
// OBSOLETE registers (some of which may get saved within any particular frame) but
// OBSOLETE that would require decoding all of the tdesc information. That would be
// OBSOLETE nice information for GDB to have, but it is not strictly manditory if we
// OBSOLETE can live without the ability to look at values within (or backup to)
// OBSOLETE previous frames.
// OBSOLETE */
// OBSOLETE
// OBSOLETE struct frame_saved_regs;
// OBSOLETE struct frame_info;
// OBSOLETE
// OBSOLETE void frame_find_saved_regs (struct frame_info *fi,
// OBSOLETE struct frame_saved_regs *fsr);
// OBSOLETE
// OBSOLETE #define FRAME_FIND_SAVED_REGS(frame_info, frame_saved_regs) \
// OBSOLETE frame_find_saved_regs (frame_info, &frame_saved_regs)
// OBSOLETE
// OBSOLETE
// OBSOLETE #define POP_FRAME pop_frame ()
// OBSOLETE extern void pop_frame ();
// OBSOLETE
// OBSOLETE /* Call function stuff contributed by Kevin Buettner of Motorola. */
// OBSOLETE
// OBSOLETE #define CALL_DUMMY_LOCATION AFTER_TEXT_END
// OBSOLETE
// OBSOLETE extern void m88k_push_dummy_frame ();
// OBSOLETE #define PUSH_DUMMY_FRAME m88k_push_dummy_frame()
// OBSOLETE
// OBSOLETE #define CALL_DUMMY { \
// OBSOLETE 0x67ff00c0, /* 0: subu #sp,#sp,0xc0 */ \
// OBSOLETE 0x243f0004, /* 4: st #r1,#sp,0x4 */ \
// OBSOLETE 0x245f0008, /* 8: st #r2,#sp,0x8 */ \
// OBSOLETE 0x247f000c, /* c: st #r3,#sp,0xc */ \
// OBSOLETE 0x249f0010, /* 10: st #r4,#sp,0x10 */ \
// OBSOLETE 0x24bf0014, /* 14: st #r5,#sp,0x14 */ \
// OBSOLETE 0x24df0018, /* 18: st #r6,#sp,0x18 */ \
// OBSOLETE 0x24ff001c, /* 1c: st #r7,#sp,0x1c */ \
// OBSOLETE 0x251f0020, /* 20: st #r8,#sp,0x20 */ \
// OBSOLETE 0x253f0024, /* 24: st #r9,#sp,0x24 */ \
// OBSOLETE 0x255f0028, /* 28: st #r10,#sp,0x28 */ \
// OBSOLETE 0x257f002c, /* 2c: st #r11,#sp,0x2c */ \
// OBSOLETE 0x259f0030, /* 30: st #r12,#sp,0x30 */ \
// OBSOLETE 0x25bf0034, /* 34: st #r13,#sp,0x34 */ \
// OBSOLETE 0x25df0038, /* 38: st #r14,#sp,0x38 */ \
// OBSOLETE 0x25ff003c, /* 3c: st #r15,#sp,0x3c */ \
// OBSOLETE 0x261f0040, /* 40: st #r16,#sp,0x40 */ \
// OBSOLETE 0x263f0044, /* 44: st #r17,#sp,0x44 */ \
// OBSOLETE 0x265f0048, /* 48: st #r18,#sp,0x48 */ \
// OBSOLETE 0x267f004c, /* 4c: st #r19,#sp,0x4c */ \
// OBSOLETE 0x269f0050, /* 50: st #r20,#sp,0x50 */ \
// OBSOLETE 0x26bf0054, /* 54: st #r21,#sp,0x54 */ \
// OBSOLETE 0x26df0058, /* 58: st #r22,#sp,0x58 */ \
// OBSOLETE 0x26ff005c, /* 5c: st #r23,#sp,0x5c */ \
// OBSOLETE 0x271f0060, /* 60: st #r24,#sp,0x60 */ \
// OBSOLETE 0x273f0064, /* 64: st #r25,#sp,0x64 */ \
// OBSOLETE 0x275f0068, /* 68: st #r26,#sp,0x68 */ \
// OBSOLETE 0x277f006c, /* 6c: st #r27,#sp,0x6c */ \
// OBSOLETE 0x279f0070, /* 70: st #r28,#sp,0x70 */ \
// OBSOLETE 0x27bf0074, /* 74: st #r29,#sp,0x74 */ \
// OBSOLETE 0x27df0078, /* 78: st #r30,#sp,0x78 */ \
// OBSOLETE 0x63df0000, /* 7c: addu #r30,#sp,0x0 */ \
// OBSOLETE 0x145f0000, /* 80: ld #r2,#sp,0x0 */ \
// OBSOLETE 0x147f0004, /* 84: ld #r3,#sp,0x4 */ \
// OBSOLETE 0x149f0008, /* 88: ld #r4,#sp,0x8 */ \
// OBSOLETE 0x14bf000c, /* 8c: ld #r5,#sp,0xc */ \
// OBSOLETE 0x14df0010, /* 90: ld #r6,#sp,0x10 */ \
// OBSOLETE 0x14ff0014, /* 94: ld #r7,#sp,0x14 */ \
// OBSOLETE 0x151f0018, /* 98: ld #r8,#sp,0x18 */ \
// OBSOLETE 0x153f001c, /* 9c: ld #r9,#sp,0x1c */ \
// OBSOLETE 0x5c200000, /* a0: or.u #r1,#r0,0x0 */ \
// OBSOLETE 0x58210000, /* a4: or #r1,#r1,0x0 */ \
// OBSOLETE 0xf400c801, /* a8: jsr #r1 */ \
// OBSOLETE 0xf000d1ff /* ac: tb0 0x0,#r0,0x1ff */ \
// OBSOLETE }
// OBSOLETE
// OBSOLETE #define CALL_DUMMY_START_OFFSET 0x80
// OBSOLETE #define CALL_DUMMY_LENGTH 0xb0
// OBSOLETE
// OBSOLETE /* FIXME: byteswapping. */
// OBSOLETE #define FIX_CALL_DUMMY(dummy, pc, fun, nargs, args, type, gcc_p) \
// OBSOLETE { \
// OBSOLETE *(unsigned long *)((char *) (dummy) + 0xa0) |= \
// OBSOLETE (((unsigned long) (fun)) >> 16); \
// OBSOLETE *(unsigned long *)((char *) (dummy) + 0xa4) |= \
// OBSOLETE (((unsigned long) (fun)) & 0xffff); \
// OBSOLETE }
// OBSOLETE
// OBSOLETE /* Stack must be aligned on 64-bit boundaries when synthesizing
// OBSOLETE function calls. */
// OBSOLETE
// OBSOLETE #define STACK_ALIGN(addr) (((addr) + 7) & -8)
// OBSOLETE
// OBSOLETE #define STORE_STRUCT_RETURN(addr, sp) \
// OBSOLETE write_register (SRA_REGNUM, (addr))
// OBSOLETE
// OBSOLETE #define NEED_TEXT_START_END 1
// OBSOLETE
// OBSOLETE /* According to the MC88100 RISC Microprocessor User's Manual, section
// OBSOLETE 6.4.3.1.2:
// OBSOLETE
// OBSOLETE ... can be made to return to a particular instruction by placing a
// OBSOLETE valid instruction address in the SNIP and the next sequential
// OBSOLETE instruction address in the SFIP (with V bits set and E bits clear).
// OBSOLETE The rte resumes execution at the instruction pointed to by the
// OBSOLETE SNIP, then the SFIP.
// OBSOLETE
// OBSOLETE The E bit is the least significant bit (bit 0). The V (valid) bit is
// OBSOLETE bit 1. This is why we logical or 2 into the values we are writing
// OBSOLETE below. It turns out that SXIP plays no role when returning from an
// OBSOLETE exception so nothing special has to be done with it. We could even
// OBSOLETE (presumably) give it a totally bogus value.
// OBSOLETE
// OBSOLETE -- Kevin Buettner
// OBSOLETE */
// OBSOLETE
// OBSOLETE extern void m88k_target_write_pc (CORE_ADDR pc, ptid_t ptid);
// OBSOLETE #define TARGET_WRITE_PC(VAL, PID) m88k_target_write_pc (VAL, PID)

View file

@ -1,44 +0,0 @@
// OBSOLETE /* Host machine description for Motorola Delta 88 system, for GDB.
// OBSOLETE Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993
// 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 #if !defined (USG)
// OBSOLETE #define USG 1
// OBSOLETE #endif
// OBSOLETE
// OBSOLETE #include <sys/param.h>
// OBSOLETE #include <sys/time.h>
// OBSOLETE
// OBSOLETE #define HAVE_TERMIO
// OBSOLETE
// OBSOLETE /*#define USIZE 2048 */
// OBSOLETE /*#define NBPG NBPC */
// OBSOLETE /* Might be defined in <sys/param.h>. I suspect this define was a relic
// OBSOLETE from before when BFD did core files. */
// OBSOLETE /* #define UPAGES USIZE */
// 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 /* Since registers r0 through r31 are stored directly in the struct ptrace_user,
// OBSOLETE (for m88k BCS)
// OBSOLETE the ptrace_user offsets are sufficient and KERNEL_U_ADDRESS can be 0 */
// OBSOLETE
// OBSOLETE #define KERNEL_U_ADDR 0

View file

@ -1,55 +0,0 @@
// OBSOLETE /* Host-machine dependent parameters for Motorola 88000, for GDB.
// OBSOLETE Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1993, 1998
// 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 #if !defined (USG)
// OBSOLETE #define USG 1
// OBSOLETE #endif
// OBSOLETE
// OBSOLETE #include <sys/param.h>
// OBSOLETE
// OBSOLETE #ifdef __GNUC__
// OBSOLETE #define memcpy __builtin_memcpy
// OBSOLETE /* gcc doesn't have this, at least not gcc 1.92. */
// OBSOLETE /* #define memset __builtin_memset */
// OBSOLETE #define strcmp __builtin_strcmp
// OBSOLETE #endif
// OBSOLETE
// OBSOLETE #define x_foff _x_x._x_offset
// OBSOLETE #define x_fname _x_name
// OBSOLETE #define USER ptrace_user
// OBSOLETE #define _BSD_WAIT_FLAVOR
// OBSOLETE
// OBSOLETE #define HAVE_TERMIO
// OBSOLETE
// OBSOLETE #ifndef USIZE
// OBSOLETE #define USIZE 2048
// OBSOLETE #endif
// OBSOLETE #define NBPG NBPC
// OBSOLETE #define UPAGES USIZE
// 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 /* Since registers r0 through r31 are stored directly in the struct ptrace_user,
// OBSOLETE (for m88k BCS)
// OBSOLETE the ptrace_user offsets are sufficient and KERNEL_U_ADDRESS can be 0 */
// OBSOLETE
// OBSOLETE #define KERNEL_U_ADDR 0

View file

@ -1,537 +0,0 @@
// OBSOLETE /* Native support for Motorola 88k running Harris CX/UX.
// OBSOLETE Copyright 1988, 1990, 1991, 1992, 1993, 1994, 1995, 1998, 1999, 2000,
// OBSOLETE 2001 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 "defs.h"
// OBSOLETE #include "frame.h"
// OBSOLETE #include "inferior.h"
// OBSOLETE
// OBSOLETE #include <sys/types.h>
// OBSOLETE #include <sys/param.h>
// OBSOLETE #include <sys/dir.h>
// OBSOLETE #include <signal.h>
// OBSOLETE #include "gdbcore.h"
// OBSOLETE #include <sys/user.h>
// OBSOLETE
// OBSOLETE #include "bfd.h"
// OBSOLETE #include "symfile.h"
// OBSOLETE #include "objfiles.h"
// OBSOLETE #include "symtab.h"
// OBSOLETE #include "regcache.h"
// OBSOLETE
// OBSOLETE #ifndef USER /* added to support BCS ptrace_user */
// OBSOLETE #define USER ptrace_user
// OBSOLETE #endif
// OBSOLETE #include <sys/ioctl.h>
// OBSOLETE #include <fcntl.h>
// OBSOLETE #include <sys/file.h>
// OBSOLETE #include "gdb_stat.h"
// OBSOLETE
// OBSOLETE #include "symtab.h"
// OBSOLETE #include "setjmp.h"
// OBSOLETE #include "value.h"
// OBSOLETE
// OBSOLETE #include <sys/ptrace.h>
// OBSOLETE
// OBSOLETE /* CX/UX provides them already, but as word offsets instead of char offsets */
// OBSOLETE #define SXIP_OFFSET (PT_SXIP * 4)
// OBSOLETE #define SNIP_OFFSET (PT_SNIP * 4)
// OBSOLETE #define SFIP_OFFSET (PT_SFIP * 4)
// OBSOLETE #define PSR_OFFSET (PT_PSR * sizeof(int))
// OBSOLETE #define FPSR_OFFSET (PT_FPSR * sizeof(int))
// OBSOLETE #define FPCR_OFFSET (PT_FPCR * sizeof(int))
// OBSOLETE
// OBSOLETE #define XREGADDR(r) (((char *)&u.pt_x0-(char *)&u) + \
// OBSOLETE ((r)-X0_REGNUM)*sizeof(X_REGISTER_RAW_TYPE))
// OBSOLETE
// OBSOLETE extern int have_symbol_file_p ();
// OBSOLETE
// OBSOLETE extern jmp_buf stack_jmp;
// OBSOLETE
// OBSOLETE extern int errno;
// OBSOLETE
// OBSOLETE void
// OBSOLETE fetch_inferior_registers (int regno)
// OBSOLETE {
// OBSOLETE register unsigned int regaddr;
// OBSOLETE char buf[MAX_REGISTER_RAW_SIZE];
// OBSOLETE register int i;
// OBSOLETE
// OBSOLETE struct USER u;
// OBSOLETE unsigned int offset;
// OBSOLETE
// OBSOLETE offset = (char *) &u.pt_r0 - (char *) &u;
// OBSOLETE regaddr = offset; /* byte offset to r0; */
// OBSOLETE
// OBSOLETE /* offset = ptrace (3, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) offset, 0) - KERNEL_U_ADDR; */
// OBSOLETE for (regno = 0; regno < PC_REGNUM; regno++)
// OBSOLETE {
// OBSOLETE /*regaddr = register_addr (regno, offset); */
// OBSOLETE /* 88k enhancement */
// OBSOLETE
// OBSOLETE for (i = 0; i < REGISTER_RAW_SIZE (regno); i += sizeof (int))
// OBSOLETE {
// OBSOLETE *(int *) &buf[i] = ptrace (3, PIDGET (inferior_ptid),
// OBSOLETE (PTRACE_ARG3_TYPE) regaddr, 0);
// OBSOLETE regaddr += sizeof (int);
// OBSOLETE }
// OBSOLETE supply_register (regno, buf);
// OBSOLETE }
// OBSOLETE /* now load up registers 32-37; special pc registers */
// OBSOLETE *(int *) &buf[0] = ptrace (3, PIDGET (inferior_ptid),
// OBSOLETE (PTRACE_ARG3_TYPE) PSR_OFFSET, 0);
// OBSOLETE supply_register (PSR_REGNUM, buf);
// OBSOLETE *(int *) &buf[0] = ptrace (3, PIDGET (inferior_ptid),
// OBSOLETE (PTRACE_ARG3_TYPE) FPSR_OFFSET, 0);
// OBSOLETE supply_register (FPSR_REGNUM, buf);
// OBSOLETE *(int *) &buf[0] = ptrace (3, PIDGET (inferior_ptid),
// OBSOLETE (PTRACE_ARG3_TYPE) FPCR_OFFSET, 0);
// OBSOLETE supply_register (FPCR_REGNUM, buf);
// OBSOLETE *(int *) &buf[0] = ptrace (3, PIDGET (inferior_ptid),
// OBSOLETE (PTRACE_ARG3_TYPE) SXIP_OFFSET, 0);
// OBSOLETE supply_register (SXIP_REGNUM, buf);
// OBSOLETE *(int *) &buf[0] = ptrace (3, PIDGET (inferior_ptid),
// OBSOLETE (PTRACE_ARG3_TYPE) SNIP_OFFSET, 0);
// OBSOLETE supply_register (SNIP_REGNUM, buf);
// OBSOLETE *(int *) &buf[0] = ptrace (3, PIDGET (inferior_ptid),
// OBSOLETE (PTRACE_ARG3_TYPE) SFIP_OFFSET, 0);
// OBSOLETE supply_register (SFIP_REGNUM, buf);
// OBSOLETE
// OBSOLETE if (target_is_m88110)
// OBSOLETE {
// OBSOLETE for (regaddr = XREGADDR (X0_REGNUM), regno = X0_REGNUM;
// OBSOLETE regno < NUM_REGS;
// OBSOLETE regno++, regaddr += 16)
// OBSOLETE {
// OBSOLETE X_REGISTER_RAW_TYPE xval;
// OBSOLETE
// OBSOLETE *(int *) &xval.w1 = ptrace (3, PIDGET (inferior_ptid),
// OBSOLETE (PTRACE_ARG3_TYPE) regaddr, 0);
// OBSOLETE *(int *) &xval.w2 = ptrace (3, PIDGET (inferior_ptid),
// OBSOLETE (PTRACE_ARG3_TYPE) (regaddr + 4), 0);
// OBSOLETE *(int *) &xval.w3 = ptrace (3, PIDGET (inferior_ptid),
// OBSOLETE (PTRACE_ARG3_TYPE) (regaddr + 8), 0);
// OBSOLETE *(int *) &xval.w4 = ptrace (3, PIDGET (inferior_ptid),
// OBSOLETE (PTRACE_ARG3_TYPE) (regaddr + 12), 0);
// OBSOLETE supply_register (regno, (void *) &xval);
// OBSOLETE }
// OBSOLETE }
// OBSOLETE }
// OBSOLETE
// OBSOLETE /* Store our register values back into the inferior.
// OBSOLETE If REGNO is -1, do this for all registers.
// OBSOLETE Otherwise, REGNO specifies which register (so we can save time). */
// OBSOLETE
// OBSOLETE void
// OBSOLETE store_inferior_registers (int regno)
// OBSOLETE {
// OBSOLETE register unsigned int regaddr;
// OBSOLETE char buf[80];
// OBSOLETE
// OBSOLETE struct USER u;
// OBSOLETE
// OBSOLETE unsigned int offset = (char *) &u.pt_r0 - (char *) &u;
// OBSOLETE
// OBSOLETE regaddr = offset;
// OBSOLETE
// OBSOLETE /* Don't try to deal with EXIP_REGNUM or ENIP_REGNUM, because I think either
// OBSOLETE svr3 doesn't run on an 88110, or the kernel isolates the different (not
// OBSOLETE completely sure this is true, but seems to be. */
// OBSOLETE if (regno >= 0)
// OBSOLETE {
// OBSOLETE /* regaddr = register_addr (regno, offset); */
// OBSOLETE if (regno < PC_REGNUM)
// OBSOLETE {
// OBSOLETE regaddr = offset + regno * sizeof (int);
// OBSOLETE errno = 0;
// OBSOLETE ptrace (6, PIDGET (inferior_ptid),
// OBSOLETE (PTRACE_ARG3_TYPE) regaddr, read_register (regno));
// OBSOLETE if (errno != 0)
// OBSOLETE {
// OBSOLETE sprintf (buf, "writing register number %d", regno);
// OBSOLETE perror_with_name (buf);
// OBSOLETE }
// OBSOLETE }
// OBSOLETE else if (regno == PSR_REGNUM)
// OBSOLETE ptrace (6, PIDGET (inferior_ptid),
// OBSOLETE (PTRACE_ARG3_TYPE) PSR_OFFSET, read_register (regno));
// OBSOLETE else if (regno == FPSR_REGNUM)
// OBSOLETE ptrace (6, PIDGET (inferior_ptid),
// OBSOLETE (PTRACE_ARG3_TYPE) FPSR_OFFSET, read_register (regno));
// OBSOLETE else if (regno == FPCR_REGNUM)
// OBSOLETE ptrace (6, PIDGET (inferior_ptid),
// OBSOLETE (PTRACE_ARG3_TYPE) FPCR_OFFSET, read_register (regno));
// OBSOLETE else if (regno == SXIP_REGNUM)
// OBSOLETE ptrace (6, PIDGET (inferior_ptid),
// OBSOLETE (PTRACE_ARG3_TYPE) SXIP_OFFSET, read_register (regno));
// OBSOLETE else if (regno == SNIP_REGNUM)
// OBSOLETE ptrace (6, PIDGET (inferior_ptid),
// OBSOLETE (PTRACE_ARG3_TYPE) SNIP_OFFSET, read_register (regno));
// OBSOLETE else if (regno == SFIP_REGNUM)
// OBSOLETE ptrace (6, PIDGET (inferior_ptid),
// OBSOLETE (PTRACE_ARG3_TYPE) SFIP_OFFSET, read_register (regno));
// OBSOLETE else if (target_is_m88110 && regno < NUM_REGS)
// OBSOLETE {
// OBSOLETE X_REGISTER_RAW_TYPE xval;
// OBSOLETE
// OBSOLETE read_register_bytes (REGISTER_BYTE (regno), (char *) &xval,
// OBSOLETE sizeof (X_REGISTER_RAW_TYPE));
// OBSOLETE regaddr = XREGADDR (regno);
// OBSOLETE ptrace (6, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) regaddr, xval.w1);
// OBSOLETE ptrace (6, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) regaddr + 4, xval.w2);
// OBSOLETE ptrace (6, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) regaddr + 8, xval.w3);
// OBSOLETE ptrace (6, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) regaddr + 12, xval.w4);
// OBSOLETE }
// OBSOLETE else
// OBSOLETE printf_unfiltered ("Bad register number for store_inferior routine\n");
// OBSOLETE }
// OBSOLETE else
// OBSOLETE {
// OBSOLETE for (regno = 0; regno < PC_REGNUM; regno++)
// OBSOLETE {
// OBSOLETE /* regaddr = register_addr (regno, offset); */
// OBSOLETE errno = 0;
// OBSOLETE regaddr = offset + regno * sizeof (int);
// OBSOLETE ptrace (6, PIDGET (inferior_ptid),
// OBSOLETE (PTRACE_ARG3_TYPE) regaddr, read_register (regno));
// OBSOLETE if (errno != 0)
// OBSOLETE {
// OBSOLETE sprintf (buf, "writing register number %d", regno);
// OBSOLETE perror_with_name (buf);
// OBSOLETE }
// OBSOLETE }
// OBSOLETE ptrace (6, PIDGET (inferior_ptid),
// OBSOLETE (PTRACE_ARG3_TYPE) PSR_OFFSET, read_register (regno));
// OBSOLETE ptrace (6, PIDGET (inferior_ptid),
// OBSOLETE (PTRACE_ARG3_TYPE) FPSR_OFFSET, read_register (regno));
// OBSOLETE ptrace (6, PIDGET (inferior_ptid),
// OBSOLETE (PTRACE_ARG3_TYPE) FPCR_OFFSET, read_register (regno));
// OBSOLETE ptrace (6, PIDGET (inferior_ptid),
// OBSOLETE (PTRACE_ARG3_TYPE) SXIP_OFFSET, read_register (SXIP_REGNUM));
// OBSOLETE ptrace (6, PIDGET (inferior_ptid),
// OBSOLETE (PTRACE_ARG3_TYPE) SNIP_OFFSET, read_register (SNIP_REGNUM));
// OBSOLETE ptrace (6, PIDGET (inferior_ptid),
// OBSOLETE (PTRACE_ARG3_TYPE) SFIP_OFFSET, read_register (SFIP_REGNUM));
// OBSOLETE if (target_is_m88110)
// OBSOLETE {
// OBSOLETE for (regno = X0_REGNUM; regno < NUM_REGS; regno++)
// OBSOLETE {
// OBSOLETE X_REGISTER_RAW_TYPE xval;
// OBSOLETE
// OBSOLETE read_register_bytes (REGISTER_BYTE (regno), (char *) &xval,
// OBSOLETE sizeof (X_REGISTER_RAW_TYPE));
// OBSOLETE regaddr = XREGADDR (regno);
// OBSOLETE ptrace (6, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) regaddr, xval.w1);
// OBSOLETE ptrace (6, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) (regaddr + 4), xval.w2);
// OBSOLETE ptrace (6, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) (regaddr + 8), xval.w3);
// OBSOLETE ptrace (6, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) (regaddr + 12), xval.w4);
// OBSOLETE }
// OBSOLETE }
// OBSOLETE }
// OBSOLETE }
// OBSOLETE
// OBSOLETE /* blockend is the address of the end of the user structure */
// OBSOLETE
// OBSOLETE m88k_register_u_addr (int blockend, int regnum)
// OBSOLETE {
// OBSOLETE struct USER u;
// OBSOLETE int ustart = blockend - sizeof (struct USER);
// OBSOLETE
// OBSOLETE if (regnum < PSR_REGNUM)
// OBSOLETE return (ustart + ((int) &u.pt_r0 - (int) &u) +
// OBSOLETE REGISTER_SIZE * regnum);
// OBSOLETE else if (regnum == PSR_REGNUM)
// OBSOLETE return (ustart + ((int) &u.pt_psr) - (int) &u);
// OBSOLETE else if (regnum == FPSR_REGNUM)
// OBSOLETE return (ustart + ((int) &u.pt_fpsr) - (int) &u);
// OBSOLETE else if (regnum == FPCR_REGNUM)
// OBSOLETE return (ustart + ((int) &u.pt_fpcr) - (int) &u);
// OBSOLETE else if (regnum == SXIP_REGNUM)
// OBSOLETE return (ustart + SXIP_OFFSET);
// OBSOLETE else if (regnum == SNIP_REGNUM)
// OBSOLETE return (ustart + SNIP_OFFSET);
// OBSOLETE else if (regnum == SFIP_REGNUM)
// OBSOLETE return (ustart + SFIP_OFFSET);
// OBSOLETE else if (target_is_m88110)
// OBSOLETE return (ustart + ((int) &u.pt_x0 - (int) &u) + /* Must be X register */
// OBSOLETE sizeof (u.pt_x0) * (regnum - X0_REGNUM));
// OBSOLETE else
// OBSOLETE return (blockend + REGISTER_SIZE * regnum);
// OBSOLETE }
// OBSOLETE
// OBSOLETE #ifdef USE_PROC_FS
// OBSOLETE
// OBSOLETE #include <sys/procfs.h>
// OBSOLETE
// OBSOLETE /* Prototypes for supply_gregset etc. */
// OBSOLETE #include "gregset.h"
// OBSOLETE
// OBSOLETE /* Given a pointer to a general register set in /proc format (gregset_t *),
// OBSOLETE unpack the register contents and supply them as gdb's idea of the current
// OBSOLETE register values. */
// OBSOLETE
// OBSOLETE void
// OBSOLETE supply_gregset (gregset_t *gregsetp)
// OBSOLETE {
// OBSOLETE register int regi;
// OBSOLETE register greg_t *regp = (greg_t *) gregsetp;
// OBSOLETE
// OBSOLETE for (regi = 0; regi <= SP_REGNUM; regi++)
// OBSOLETE supply_register (regi, (char *) (regp + regi));
// OBSOLETE
// OBSOLETE supply_register (SXIP_REGNUM, (char *) (regp + R_XIP));
// OBSOLETE supply_register (SNIP_REGNUM, (char *) (regp + R_NIP));
// OBSOLETE supply_register (SFIP_REGNUM, (char *) (regp + R_FIP));
// OBSOLETE supply_register (PSR_REGNUM, (char *) (regp + R_PSR));
// OBSOLETE supply_register (FPSR_REGNUM, (char *) (regp + R_FPSR));
// OBSOLETE supply_register (FPCR_REGNUM, (char *) (regp + R_FPCR));
// OBSOLETE }
// OBSOLETE
// OBSOLETE void
// OBSOLETE fill_gregset (gregset_t *gregsetp, int regno)
// OBSOLETE {
// OBSOLETE int regi;
// OBSOLETE register greg_t *regp = (greg_t *) gregsetp;
// OBSOLETE
// OBSOLETE for (regi = 0; regi <= R_R31; regi++)
// OBSOLETE if ((regno == -1) || (regno == regi))
// OBSOLETE *(regp + regi) = *(int *) &registers[REGISTER_BYTE (regi)];
// OBSOLETE
// OBSOLETE if ((regno == -1) || (regno == SXIP_REGNUM))
// OBSOLETE *(regp + R_XIP) = *(int *) &registers[REGISTER_BYTE (SXIP_REGNUM)];
// OBSOLETE if ((regno == -1) || (regno == SNIP_REGNUM))
// OBSOLETE *(regp + R_NIP) = *(int *) &registers[REGISTER_BYTE (SNIP_REGNUM)];
// OBSOLETE if ((regno == -1) || (regno == SFIP_REGNUM))
// OBSOLETE *(regp + R_FIP) = *(int *) &registers[REGISTER_BYTE (SFIP_REGNUM)];
// OBSOLETE if ((regno == -1) || (regno == PSR_REGNUM))
// OBSOLETE *(regp + R_PSR) = *(int *) &registers[REGISTER_BYTE (PSR_REGNUM)];
// OBSOLETE if ((regno == -1) || (regno == FPSR_REGNUM))
// OBSOLETE *(regp + R_FPSR) = *(int *) &registers[REGISTER_BYTE (FPSR_REGNUM)];
// OBSOLETE if ((regno == -1) || (regno == FPCR_REGNUM))
// OBSOLETE *(regp + R_FPCR) = *(int *) &registers[REGISTER_BYTE (FPCR_REGNUM)];
// OBSOLETE }
// OBSOLETE
// OBSOLETE #endif /* USE_PROC_FS */
// OBSOLETE
// OBSOLETE /* This support adds the equivalent of adb's % command. When
// OBSOLETE the `add-shared-symbol-files' command is given, this routine scans
// OBSOLETE the dynamic linker's link map and reads the minimal symbols
// OBSOLETE from each shared object file listed in the map. */
// OBSOLETE
// OBSOLETE struct link_map
// OBSOLETE {
// OBSOLETE unsigned long l_addr; /* address at which object is mapped */
// OBSOLETE char *l_name; /* full name of loaded object */
// OBSOLETE void *l_ld; /* dynamic structure of object */
// OBSOLETE struct link_map *l_next; /* next link object */
// OBSOLETE struct link_map *l_prev; /* previous link object */
// OBSOLETE };
// OBSOLETE
// OBSOLETE #define LINKS_MAP_POINTER "_ld_tail"
// OBSOLETE #define LIBC_FILE "/usr/lib/libc.so.1"
// OBSOLETE #define SHARED_OFFSET 0xf0001000
// OBSOLETE
// OBSOLETE #ifndef PATH_MAX
// OBSOLETE #define PATH_MAX 1023 /* maximum size of path name on OS */
// OBSOLETE #endif
// OBSOLETE
// OBSOLETE void
// OBSOLETE add_shared_symbol_files (void)
// OBSOLETE {
// OBSOLETE void *desc;
// OBSOLETE struct link_map *ld_map, *lm, lms;
// OBSOLETE struct minimal_symbol *minsym;
// OBSOLETE struct objfile *objfile;
// OBSOLETE char *path_name;
// OBSOLETE
// OBSOLETE if (ptid_equal (inferior_ptid, null_ptid))
// OBSOLETE {
// OBSOLETE warning ("The program has not yet been started.");
// OBSOLETE return;
// OBSOLETE }
// OBSOLETE
// OBSOLETE objfile = symbol_file_add (LIBC_FILE, 0, NULL, 0, OBJF_READNOW);
// OBSOLETE minsym = lookup_minimal_symbol (LINKS_MAP_POINTER, objfile);
// OBSOLETE
// OBSOLETE ld_map = (struct link_map *)
// OBSOLETE read_memory_integer (((int) SYMBOL_VALUE_ADDRESS (minsym) + SHARED_OFFSET), 4);
// OBSOLETE lm = ld_map;
// OBSOLETE while (lm)
// OBSOLETE {
// OBSOLETE int local_errno = 0;
// OBSOLETE
// OBSOLETE read_memory ((CORE_ADDR) lm, (char *) &lms, sizeof (struct link_map));
// OBSOLETE if (lms.l_name)
// OBSOLETE {
// OBSOLETE if (target_read_string ((CORE_ADDR) lms.l_name, &path_name,
// OBSOLETE PATH_MAX, &local_errno))
// OBSOLETE {
// OBSOLETE struct section_addr_info section_addrs;
// OBSOLETE memset (&section_addrs, 0, sizeof (section_addrs));
// OBSOLETE section_addrs.other[0].addr = lms.l_addr;
// OBSOLETE section_addrs.other[0].name = ".text";
// OBSOLETE symbol_file_add (path_name, 1, &section_addrs, 0, 0);
// OBSOLETE xfree (path_name);
// OBSOLETE }
// OBSOLETE }
// OBSOLETE /* traverse links in reverse order so that we get the
// OBSOLETE the symbols the user actually gets. */
// OBSOLETE lm = lms.l_prev;
// OBSOLETE }
// OBSOLETE
// OBSOLETE /* Getting new symbols may change our opinion about what is
// OBSOLETE frameless. */
// OBSOLETE reinit_frame_cache ();
// OBSOLETE }
// OBSOLETE
// OBSOLETE #if defined(_ES_MP)
// OBSOLETE
// OBSOLETE #include <sys/regset.h>
// OBSOLETE
// OBSOLETE unsigned int
// OBSOLETE m88k_harris_core_register_addr (int regno, int reg_ptr)
// OBSOLETE {
// OBSOLETE unsigned int word_offset;
// OBSOLETE
// OBSOLETE switch (regno)
// OBSOLETE {
// OBSOLETE case PSR_REGNUM:
// OBSOLETE word_offset = R_EPSR;
// OBSOLETE break;
// OBSOLETE case FPSR_REGNUM:
// OBSOLETE word_offset = R_FPSR;
// OBSOLETE break;
// OBSOLETE case FPCR_REGNUM:
// OBSOLETE word_offset = R_FPCR;
// OBSOLETE break;
// OBSOLETE case SXIP_REGNUM:
// OBSOLETE word_offset = R_EXIP;
// OBSOLETE break;
// OBSOLETE case SNIP_REGNUM:
// OBSOLETE word_offset = R_ENIP;
// OBSOLETE break;
// OBSOLETE case SFIP_REGNUM:
// OBSOLETE word_offset = R_EFIP;
// OBSOLETE break;
// OBSOLETE default:
// OBSOLETE if (regno <= FP_REGNUM)
// OBSOLETE word_offset = regno;
// OBSOLETE else
// OBSOLETE word_offset = ((regno - X0_REGNUM) * 4);
// OBSOLETE }
// OBSOLETE return (word_offset * 4);
// OBSOLETE }
// OBSOLETE
// OBSOLETE #endif /* _ES_MP */
// OBSOLETE
// OBSOLETE void
// OBSOLETE _initialize_m88k_nat (void)
// OBSOLETE {
// OBSOLETE #ifdef _ES_MP
// OBSOLETE /* Enable 88110 support, as we don't support the 88100 under ES/MP. */
// OBSOLETE
// OBSOLETE target_is_m88110 = 1;
// OBSOLETE #elif defined(_CX_UX)
// OBSOLETE /* Determine whether we're running on an 88100 or an 88110. */
// OBSOLETE target_is_m88110 = (sinfo (SYSMACHINE, 0) == SYS5800);
// OBSOLETE #endif /* _CX_UX */
// OBSOLETE }
// OBSOLETE
// OBSOLETE #ifdef _ES_MP
// OBSOLETE /* Given a pointer to a general register set in /proc format (gregset_t *),
// OBSOLETE unpack the register contents and supply them as gdb's idea of the current
// OBSOLETE register values. */
// OBSOLETE
// OBSOLETE void
// OBSOLETE supply_gregset (gregset_t *gregsetp)
// OBSOLETE {
// OBSOLETE register int regi;
// OBSOLETE register greg_t *regp = (greg_t *) gregsetp;
// OBSOLETE
// OBSOLETE for (regi = 0; regi < R_R31; regi++)
// OBSOLETE {
// OBSOLETE supply_register (regi, (char *) (regp + regi));
// OBSOLETE }
// OBSOLETE supply_register (PSR_REGNUM, (char *) (regp + R_EPSR));
// OBSOLETE supply_register (FPSR_REGNUM, (char *) (regp + R_FPSR));
// OBSOLETE supply_register (FPCR_REGNUM, (char *) (regp + R_FPCR));
// OBSOLETE supply_register (SXIP_REGNUM, (char *) (regp + R_EXIP));
// OBSOLETE supply_register (SNIP_REGNUM, (char *) (regp + R_ENIP));
// OBSOLETE supply_register (SFIP_REGNUM, (char *) (regp + R_EFIP));
// OBSOLETE }
// OBSOLETE
// OBSOLETE /* Given a pointer to a floating point register set in /proc format
// OBSOLETE (fpregset_t *), unpack the register contents and supply them as gdb's
// OBSOLETE idea of the current floating point register values. */
// OBSOLETE
// OBSOLETE void
// OBSOLETE supply_fpregset (fpregset_t *fpregsetp)
// OBSOLETE {
// OBSOLETE register int regi;
// OBSOLETE char *from;
// OBSOLETE
// OBSOLETE for (regi = FP0_REGNUM; regi <= FPLAST_REGNUM; regi++)
// OBSOLETE {
// OBSOLETE from = (char *) &((*fpregsetp)[regi - FP0_REGNUM]);
// OBSOLETE supply_register (regi, from);
// OBSOLETE }
// OBSOLETE }
// OBSOLETE
// OBSOLETE #endif /* _ES_MP */
// OBSOLETE
// OBSOLETE #ifdef _CX_UX
// OBSOLETE
// OBSOLETE #include <sys/regset.h>
// OBSOLETE
// OBSOLETE unsigned int
// OBSOLETE m88k_harris_core_register_addr (int regno, int reg_ptr)
// OBSOLETE {
// OBSOLETE unsigned int word_offset;
// OBSOLETE
// OBSOLETE switch (regno)
// OBSOLETE {
// OBSOLETE case PSR_REGNUM:
// OBSOLETE word_offset = R_PSR;
// OBSOLETE break;
// OBSOLETE case FPSR_REGNUM:
// OBSOLETE word_offset = R_FPSR;
// OBSOLETE break;
// OBSOLETE case FPCR_REGNUM:
// OBSOLETE word_offset = R_FPCR;
// OBSOLETE break;
// OBSOLETE case SXIP_REGNUM:
// OBSOLETE word_offset = R_XIP;
// OBSOLETE break;
// OBSOLETE case SNIP_REGNUM:
// OBSOLETE word_offset = R_NIP;
// OBSOLETE break;
// OBSOLETE case SFIP_REGNUM:
// OBSOLETE word_offset = R_FIP;
// OBSOLETE break;
// OBSOLETE default:
// OBSOLETE if (regno <= FP_REGNUM)
// OBSOLETE word_offset = regno;
// OBSOLETE else
// OBSOLETE word_offset = ((regno - X0_REGNUM) * 4) + R_X0;
// OBSOLETE }
// OBSOLETE return (word_offset * 4);
// OBSOLETE }
// OBSOLETE
// OBSOLETE #endif /* _CX_UX */

File diff suppressed because it is too large Load diff

1671
gdb/dst.h

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -1,601 +0,0 @@
// OBSOLETE /* Target-dependent code for the Fujitsu FR30.
// OBSOLETE Copyright 1999, 2000, 2001 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 "defs.h"
// OBSOLETE #include "frame.h"
// OBSOLETE #include "inferior.h"
// OBSOLETE #include "obstack.h"
// OBSOLETE #include "target.h"
// OBSOLETE #include "value.h"
// OBSOLETE #include "bfd.h"
// OBSOLETE #include "gdb_string.h"
// OBSOLETE #include "gdbcore.h"
// OBSOLETE #include "symfile.h"
// OBSOLETE #include "regcache.h"
// OBSOLETE
// OBSOLETE /* An expression that tells us whether the function invocation represented
// OBSOLETE by FI does not have a frame on the stack associated with it. */
// OBSOLETE int
// OBSOLETE fr30_frameless_function_invocation (struct frame_info *fi)
// OBSOLETE {
// OBSOLETE int frameless;
// OBSOLETE CORE_ADDR func_start, after_prologue;
// OBSOLETE func_start = (get_pc_function_start ((fi)->pc) +
// OBSOLETE FUNCTION_START_OFFSET);
// OBSOLETE after_prologue = func_start;
// OBSOLETE after_prologue = SKIP_PROLOGUE (after_prologue);
// OBSOLETE frameless = (after_prologue == func_start);
// OBSOLETE return frameless;
// OBSOLETE }
// OBSOLETE
// OBSOLETE /* Function: pop_frame
// OBSOLETE This routine gets called when either the user uses the `return'
// OBSOLETE command, or the call dummy breakpoint gets hit. */
// OBSOLETE
// OBSOLETE void
// OBSOLETE fr30_pop_frame (void)
// OBSOLETE {
// OBSOLETE struct frame_info *frame = get_current_frame ();
// OBSOLETE int regnum;
// OBSOLETE CORE_ADDR sp = read_register (SP_REGNUM);
// OBSOLETE
// OBSOLETE if (PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame))
// OBSOLETE generic_pop_dummy_frame ();
// OBSOLETE else
// OBSOLETE {
// OBSOLETE write_register (PC_REGNUM, FRAME_SAVED_PC (frame));
// OBSOLETE
// OBSOLETE for (regnum = 0; regnum < NUM_REGS; regnum++)
// OBSOLETE if (frame->fsr.regs[regnum] != 0)
// OBSOLETE {
// OBSOLETE write_register (regnum,
// OBSOLETE read_memory_unsigned_integer (frame->fsr.regs[regnum],
// OBSOLETE REGISTER_RAW_SIZE (regnum)));
// OBSOLETE }
// OBSOLETE write_register (SP_REGNUM, sp + frame->framesize);
// OBSOLETE }
// OBSOLETE flush_cached_frames ();
// OBSOLETE }
// OBSOLETE
// OBSOLETE
// OBSOLETE /* Function: fr30_store_return_value
// OBSOLETE Put a value where a caller expects to see it. Used by the 'return'
// OBSOLETE command. */
// OBSOLETE void
// OBSOLETE fr30_store_return_value (struct type *type,
// OBSOLETE char *valbuf)
// OBSOLETE {
// OBSOLETE /* Here's how the FR30 returns values (gleaned from gcc/config/
// OBSOLETE fr30/fr30.h):
// OBSOLETE
// OBSOLETE If the return value is 32 bits long or less, it goes in r4.
// OBSOLETE
// OBSOLETE If the return value is 64 bits long or less, it goes in r4 (most
// OBSOLETE significant word) and r5 (least significant word.
// OBSOLETE
// OBSOLETE If the function returns a structure, of any size, the caller
// OBSOLETE passes the function an invisible first argument where the callee
// OBSOLETE should store the value. But GDB doesn't let you do that anyway.
// OBSOLETE
// OBSOLETE If you're returning a value smaller than a word, it's not really
// OBSOLETE necessary to zero the upper bytes of the register; the caller is
// OBSOLETE supposed to ignore them. However, the FR30 typically keeps its
// OBSOLETE values extended to the full register width, so we should emulate
// OBSOLETE that. */
// OBSOLETE
// OBSOLETE /* The FR30 is big-endian, so if we return a small value (like a
// OBSOLETE short or a char), we need to position it correctly within the
// OBSOLETE register. We round the size up to a register boundary, and then
// OBSOLETE adjust the offset so as to place the value at the right end. */
// OBSOLETE int value_size = TYPE_LENGTH (type);
// OBSOLETE int returned_size = (value_size + FR30_REGSIZE - 1) & ~(FR30_REGSIZE - 1);
// OBSOLETE int offset = (REGISTER_BYTE (RETVAL_REG)
// OBSOLETE + (returned_size - value_size));
// OBSOLETE char *zeros = alloca (returned_size);
// OBSOLETE memset (zeros, 0, returned_size);
// OBSOLETE
// OBSOLETE write_register_bytes (REGISTER_BYTE (RETVAL_REG), zeros, returned_size);
// OBSOLETE write_register_bytes (offset, valbuf, value_size);
// OBSOLETE }
// OBSOLETE
// OBSOLETE
// OBSOLETE /* Function: skip_prologue
// OBSOLETE Return the address of the first code past the prologue of the function. */
// OBSOLETE
// OBSOLETE CORE_ADDR
// OBSOLETE fr30_skip_prologue (CORE_ADDR pc)
// OBSOLETE {
// OBSOLETE CORE_ADDR func_addr, func_end;
// OBSOLETE
// OBSOLETE /* See what the symbol table says */
// OBSOLETE
// OBSOLETE if (find_pc_partial_function (pc, NULL, &func_addr, &func_end))
// OBSOLETE {
// OBSOLETE struct symtab_and_line sal;
// OBSOLETE
// OBSOLETE sal = find_pc_line (func_addr, 0);
// OBSOLETE
// OBSOLETE if (sal.line != 0 && sal.end < func_end)
// OBSOLETE {
// OBSOLETE return sal.end;
// OBSOLETE }
// OBSOLETE }
// OBSOLETE
// OBSOLETE /* Either we didn't find the start of this function (nothing we can do),
// OBSOLETE or there's no line info, or the line after the prologue is after
// OBSOLETE the end of the function (there probably isn't a prologue). */
// OBSOLETE
// OBSOLETE return pc;
// OBSOLETE }
// OBSOLETE
// OBSOLETE
// OBSOLETE /* Function: push_arguments
// OBSOLETE Setup arguments and RP for a call to the target. First four args
// OBSOLETE go in FIRST_ARGREG -> LAST_ARGREG, subsequent args go on stack...
// OBSOLETE Structs are passed by reference. XXX not right now Z.R.
// OBSOLETE 64 bit quantities (doubles and long longs) may be split between
// OBSOLETE the regs and the stack.
// OBSOLETE When calling a function that returns a struct, a pointer to the struct
// OBSOLETE is passed in as a secret first argument (always in FIRST_ARGREG).
// OBSOLETE
// OBSOLETE Stack space for the args has NOT been allocated: that job is up to us.
// OBSOLETE */
// OBSOLETE
// OBSOLETE CORE_ADDR
// OBSOLETE fr30_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
// OBSOLETE int struct_return, CORE_ADDR struct_addr)
// OBSOLETE {
// OBSOLETE int argreg;
// OBSOLETE int argnum;
// OBSOLETE int stack_offset;
// OBSOLETE struct stack_arg
// OBSOLETE {
// OBSOLETE char *val;
// OBSOLETE int len;
// OBSOLETE int offset;
// OBSOLETE };
// OBSOLETE struct stack_arg *stack_args =
// OBSOLETE (struct stack_arg *) alloca (nargs * sizeof (struct stack_arg));
// OBSOLETE int nstack_args = 0;
// OBSOLETE
// OBSOLETE argreg = FIRST_ARGREG;
// OBSOLETE
// OBSOLETE /* the struct_return pointer occupies the first parameter-passing reg */
// OBSOLETE if (struct_return)
// OBSOLETE write_register (argreg++, struct_addr);
// OBSOLETE
// OBSOLETE stack_offset = 0;
// OBSOLETE
// OBSOLETE /* Process args from left to right. Store as many as allowed in
// OBSOLETE registers, save the rest to be pushed on the stack */
// OBSOLETE for (argnum = 0; argnum < nargs; argnum++)
// OBSOLETE {
// OBSOLETE char *val;
// OBSOLETE struct value *arg = args[argnum];
// OBSOLETE struct type *arg_type = check_typedef (VALUE_TYPE (arg));
// OBSOLETE struct type *target_type = TYPE_TARGET_TYPE (arg_type);
// OBSOLETE int len = TYPE_LENGTH (arg_type);
// OBSOLETE enum type_code typecode = TYPE_CODE (arg_type);
// OBSOLETE CORE_ADDR regval;
// OBSOLETE int newarg;
// OBSOLETE
// OBSOLETE val = (char *) VALUE_CONTENTS (arg);
// OBSOLETE
// OBSOLETE {
// OBSOLETE /* Copy the argument to general registers or the stack in
// OBSOLETE register-sized pieces. Large arguments are split between
// OBSOLETE registers and stack. */
// OBSOLETE while (len > 0)
// OBSOLETE {
// OBSOLETE if (argreg <= LAST_ARGREG)
// OBSOLETE {
// OBSOLETE int partial_len = len < REGISTER_SIZE ? len : REGISTER_SIZE;
// OBSOLETE regval = extract_address (val, partial_len);
// OBSOLETE
// OBSOLETE /* It's a simple argument being passed in a general
// OBSOLETE register. */
// OBSOLETE write_register (argreg, regval);
// OBSOLETE argreg++;
// OBSOLETE len -= partial_len;
// OBSOLETE val += partial_len;
// OBSOLETE }
// OBSOLETE else
// OBSOLETE {
// OBSOLETE /* keep for later pushing */
// OBSOLETE stack_args[nstack_args].val = val;
// OBSOLETE stack_args[nstack_args++].len = len;
// OBSOLETE break;
// OBSOLETE }
// OBSOLETE }
// OBSOLETE }
// OBSOLETE }
// OBSOLETE /* now do the real stack pushing, process args right to left */
// OBSOLETE while (nstack_args--)
// OBSOLETE {
// OBSOLETE sp -= stack_args[nstack_args].len;
// OBSOLETE write_memory (sp, stack_args[nstack_args].val,
// OBSOLETE stack_args[nstack_args].len);
// OBSOLETE }
// OBSOLETE
// OBSOLETE /* Return adjusted stack pointer. */
// OBSOLETE return sp;
// OBSOLETE }
// OBSOLETE
// OBSOLETE void _initialize_fr30_tdep (void);
// OBSOLETE
// OBSOLETE void
// OBSOLETE _initialize_fr30_tdep (void)
// OBSOLETE {
// OBSOLETE extern int print_insn_fr30 (bfd_vma, disassemble_info *);
// OBSOLETE tm_print_insn = print_insn_fr30;
// OBSOLETE }
// OBSOLETE
// OBSOLETE /* Function: check_prologue_cache
// OBSOLETE Check if prologue for this frame's PC has already been scanned.
// OBSOLETE If it has, copy the relevant information about that prologue and
// OBSOLETE return non-zero. Otherwise do not copy anything and return zero.
// OBSOLETE
// OBSOLETE The information saved in the cache includes:
// OBSOLETE * the frame register number;
// OBSOLETE * the size of the stack frame;
// OBSOLETE * the offsets of saved regs (relative to the old SP); and
// OBSOLETE * the offset from the stack pointer to the frame pointer
// OBSOLETE
// OBSOLETE The cache contains only one entry, since this is adequate
// OBSOLETE for the typical sequence of prologue scan requests we get.
// OBSOLETE When performing a backtrace, GDB will usually ask to scan
// OBSOLETE the same function twice in a row (once to get the frame chain,
// OBSOLETE and once to fill in the extra frame information).
// OBSOLETE */
// OBSOLETE
// OBSOLETE static struct frame_info prologue_cache;
// OBSOLETE
// OBSOLETE static int
// OBSOLETE check_prologue_cache (struct frame_info *fi)
// OBSOLETE {
// OBSOLETE int i;
// OBSOLETE
// OBSOLETE if (fi->pc == prologue_cache.pc)
// OBSOLETE {
// OBSOLETE fi->framereg = prologue_cache.framereg;
// OBSOLETE fi->framesize = prologue_cache.framesize;
// OBSOLETE fi->frameoffset = prologue_cache.frameoffset;
// OBSOLETE for (i = 0; i <= NUM_REGS; i++)
// OBSOLETE fi->fsr.regs[i] = prologue_cache.fsr.regs[i];
// OBSOLETE return 1;
// OBSOLETE }
// OBSOLETE else
// OBSOLETE return 0;
// OBSOLETE }
// OBSOLETE
// OBSOLETE
// OBSOLETE /* Function: save_prologue_cache
// OBSOLETE Copy the prologue information from fi to the prologue cache.
// OBSOLETE */
// OBSOLETE
// OBSOLETE static void
// OBSOLETE save_prologue_cache (struct frame_info *fi)
// OBSOLETE {
// OBSOLETE int i;
// OBSOLETE
// OBSOLETE prologue_cache.pc = fi->pc;
// OBSOLETE prologue_cache.framereg = fi->framereg;
// OBSOLETE prologue_cache.framesize = fi->framesize;
// OBSOLETE prologue_cache.frameoffset = fi->frameoffset;
// OBSOLETE
// OBSOLETE for (i = 0; i <= NUM_REGS; i++)
// OBSOLETE {
// OBSOLETE prologue_cache.fsr.regs[i] = fi->fsr.regs[i];
// OBSOLETE }
// OBSOLETE }
// OBSOLETE
// OBSOLETE
// OBSOLETE /* Function: scan_prologue
// OBSOLETE Scan the prologue of the function that contains PC, and record what
// OBSOLETE we find in PI. PI->fsr must be zeroed by the called. Returns the
// OBSOLETE pc after the prologue. Note that the addresses saved in pi->fsr
// OBSOLETE are actually just frame relative (negative offsets from the frame
// OBSOLETE pointer). This is because we don't know the actual value of the
// OBSOLETE frame pointer yet. In some circumstances, the frame pointer can't
// OBSOLETE be determined till after we have scanned the prologue. */
// OBSOLETE
// OBSOLETE static void
// OBSOLETE fr30_scan_prologue (struct frame_info *fi)
// OBSOLETE {
// OBSOLETE int sp_offset, fp_offset;
// OBSOLETE CORE_ADDR prologue_start, prologue_end, current_pc;
// OBSOLETE
// OBSOLETE /* Check if this function is already in the cache of frame information. */
// OBSOLETE if (check_prologue_cache (fi))
// OBSOLETE return;
// OBSOLETE
// OBSOLETE /* Assume there is no frame until proven otherwise. */
// OBSOLETE fi->framereg = SP_REGNUM;
// OBSOLETE fi->framesize = 0;
// OBSOLETE fi->frameoffset = 0;
// OBSOLETE
// OBSOLETE /* Find the function prologue. If we can't find the function in
// OBSOLETE the symbol table, peek in the stack frame to find the PC. */
// OBSOLETE if (find_pc_partial_function (fi->pc, NULL, &prologue_start, &prologue_end))
// OBSOLETE {
// OBSOLETE /* Assume the prologue is everything between the first instruction
// OBSOLETE in the function and the first source line. */
// OBSOLETE struct symtab_and_line sal = find_pc_line (prologue_start, 0);
// OBSOLETE
// OBSOLETE if (sal.line == 0) /* no line info, use current PC */
// OBSOLETE prologue_end = fi->pc;
// OBSOLETE else if (sal.end < prologue_end) /* next line begins after fn end */
// OBSOLETE prologue_end = sal.end; /* (probably means no prologue) */
// OBSOLETE }
// OBSOLETE else
// OBSOLETE {
// OBSOLETE /* XXX Z.R. What now??? The following is entirely bogus */
// OBSOLETE prologue_start = (read_memory_integer (fi->frame, 4) & 0x03fffffc) - 12;
// OBSOLETE prologue_end = prologue_start + 40;
// OBSOLETE }
// OBSOLETE
// OBSOLETE /* Now search the prologue looking for instructions that set up the
// OBSOLETE frame pointer, adjust the stack pointer, and save registers. */
// OBSOLETE
// OBSOLETE sp_offset = fp_offset = 0;
// OBSOLETE for (current_pc = prologue_start; current_pc < prologue_end; current_pc += 2)
// OBSOLETE {
// OBSOLETE unsigned int insn;
// OBSOLETE
// OBSOLETE insn = read_memory_unsigned_integer (current_pc, 2);
// OBSOLETE
// OBSOLETE if ((insn & 0xfe00) == 0x8e00) /* stm0 or stm1 */
// OBSOLETE {
// OBSOLETE int reg, mask = insn & 0xff;
// OBSOLETE
// OBSOLETE /* scan in one sweep - create virtual 16-bit mask from either insn's mask */
// OBSOLETE if ((insn & 0x0100) == 0)
// OBSOLETE {
// OBSOLETE mask <<= 8; /* stm0 - move to upper byte in virtual mask */
// OBSOLETE }
// OBSOLETE
// OBSOLETE /* Calculate offsets of saved registers (to be turned later into addresses). */
// OBSOLETE for (reg = R4_REGNUM; reg <= R11_REGNUM; reg++)
// OBSOLETE if (mask & (1 << (15 - reg)))
// OBSOLETE {
// OBSOLETE sp_offset -= 4;
// OBSOLETE fi->fsr.regs[reg] = sp_offset;
// OBSOLETE }
// OBSOLETE }
// OBSOLETE else if ((insn & 0xfff0) == 0x1700) /* st rx,@-r15 */
// OBSOLETE {
// OBSOLETE int reg = insn & 0xf;
// OBSOLETE
// OBSOLETE sp_offset -= 4;
// OBSOLETE fi->fsr.regs[reg] = sp_offset;
// OBSOLETE }
// OBSOLETE else if ((insn & 0xff00) == 0x0f00) /* enter */
// OBSOLETE {
// OBSOLETE fp_offset = fi->fsr.regs[FP_REGNUM] = sp_offset - 4;
// OBSOLETE sp_offset -= 4 * (insn & 0xff);
// OBSOLETE fi->framereg = FP_REGNUM;
// OBSOLETE }
// OBSOLETE else if (insn == 0x1781) /* st rp,@-sp */
// OBSOLETE {
// OBSOLETE sp_offset -= 4;
// OBSOLETE fi->fsr.regs[RP_REGNUM] = sp_offset;
// OBSOLETE }
// OBSOLETE else if (insn == 0x170e) /* st fp,@-sp */
// OBSOLETE {
// OBSOLETE sp_offset -= 4;
// OBSOLETE fi->fsr.regs[FP_REGNUM] = sp_offset;
// OBSOLETE }
// OBSOLETE else if (insn == 0x8bfe) /* mov sp,fp */
// OBSOLETE {
// OBSOLETE fi->framereg = FP_REGNUM;
// OBSOLETE }
// OBSOLETE else if ((insn & 0xff00) == 0xa300) /* addsp xx */
// OBSOLETE {
// OBSOLETE sp_offset += 4 * (signed char) (insn & 0xff);
// OBSOLETE }
// OBSOLETE else if ((insn & 0xff0f) == 0x9b00 && /* ldi:20 xx,r0 */
// OBSOLETE read_memory_unsigned_integer (current_pc + 4, 2)
// OBSOLETE == 0xac0f) /* sub r0,sp */
// OBSOLETE {
// OBSOLETE /* large stack adjustment */
// OBSOLETE sp_offset -= (((insn & 0xf0) << 12) | read_memory_unsigned_integer (current_pc + 2, 2));
// OBSOLETE current_pc += 4;
// OBSOLETE }
// OBSOLETE else if (insn == 0x9f80 && /* ldi:32 xx,r0 */
// OBSOLETE read_memory_unsigned_integer (current_pc + 6, 2)
// OBSOLETE == 0xac0f) /* sub r0,sp */
// OBSOLETE {
// OBSOLETE /* large stack adjustment */
// OBSOLETE sp_offset -=
// OBSOLETE (read_memory_unsigned_integer (current_pc + 2, 2) << 16 |
// OBSOLETE read_memory_unsigned_integer (current_pc + 4, 2));
// OBSOLETE current_pc += 6;
// OBSOLETE }
// OBSOLETE }
// OBSOLETE
// OBSOLETE /* The frame size is just the negative of the offset (from the original SP)
// OBSOLETE of the last thing thing we pushed on the stack. The frame offset is
// OBSOLETE [new FP] - [new SP]. */
// OBSOLETE fi->framesize = -sp_offset;
// OBSOLETE fi->frameoffset = fp_offset - sp_offset;
// OBSOLETE
// OBSOLETE save_prologue_cache (fi);
// OBSOLETE }
// OBSOLETE
// OBSOLETE /* Function: init_extra_frame_info
// OBSOLETE Setup the frame's frame pointer, pc, and frame addresses for saved
// OBSOLETE registers. Most of the work is done in scan_prologue().
// OBSOLETE
// OBSOLETE Note that when we are called for the last frame (currently active frame),
// OBSOLETE that fi->pc and fi->frame will already be setup. However, fi->frame will
// OBSOLETE be valid only if this routine uses FP. For previous frames, fi-frame will
// OBSOLETE always be correct (since that is derived from fr30_frame_chain ()).
// OBSOLETE
// OBSOLETE We can be called with the PC in the call dummy under two circumstances.
// OBSOLETE First, during normal backtracing, second, while figuring out the frame
// OBSOLETE pointer just prior to calling the target function (see run_stack_dummy). */
// OBSOLETE
// OBSOLETE void
// OBSOLETE fr30_init_extra_frame_info (struct frame_info *fi)
// OBSOLETE {
// OBSOLETE int reg;
// OBSOLETE
// OBSOLETE if (fi->next)
// OBSOLETE fi->pc = FRAME_SAVED_PC (fi->next);
// OBSOLETE
// OBSOLETE memset (fi->fsr.regs, '\000', sizeof fi->fsr.regs);
// OBSOLETE
// OBSOLETE if (PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
// OBSOLETE {
// OBSOLETE /* We need to setup fi->frame here because run_stack_dummy gets it wrong
// OBSOLETE by assuming it's always FP. */
// OBSOLETE fi->frame = generic_read_register_dummy (fi->pc, fi->frame, SP_REGNUM);
// OBSOLETE fi->framesize = 0;
// OBSOLETE fi->frameoffset = 0;
// OBSOLETE return;
// OBSOLETE }
// OBSOLETE fr30_scan_prologue (fi);
// OBSOLETE
// OBSOLETE if (!fi->next) /* this is the innermost frame? */
// OBSOLETE fi->frame = read_register (fi->framereg);
// OBSOLETE else
// OBSOLETE /* not the innermost frame */
// OBSOLETE /* If we have an FP, the callee saved it. */
// OBSOLETE if (fi->framereg == FP_REGNUM)
// OBSOLETE if (fi->next->fsr.regs[fi->framereg] != 0)
// OBSOLETE fi->frame = read_memory_integer (fi->next->fsr.regs[fi->framereg], 4);
// OBSOLETE
// OBSOLETE /* Calculate actual addresses of saved registers using offsets determined
// OBSOLETE by fr30_scan_prologue. */
// OBSOLETE for (reg = 0; reg < NUM_REGS; reg++)
// OBSOLETE if (fi->fsr.regs[reg] != 0)
// OBSOLETE {
// OBSOLETE fi->fsr.regs[reg] += fi->frame + fi->framesize - fi->frameoffset;
// OBSOLETE }
// OBSOLETE }
// OBSOLETE
// OBSOLETE /* Function: find_callers_reg
// OBSOLETE Find REGNUM on the stack. Otherwise, it's in an active register.
// OBSOLETE One thing we might want to do here is to check REGNUM against the
// OBSOLETE clobber mask, and somehow flag it as invalid if it isn't saved on
// OBSOLETE the stack somewhere. This would provide a graceful failure mode
// OBSOLETE when trying to get the value of caller-saves registers for an inner
// OBSOLETE frame. */
// OBSOLETE
// OBSOLETE CORE_ADDR
// OBSOLETE fr30_find_callers_reg (struct frame_info *fi, int regnum)
// OBSOLETE {
// OBSOLETE for (; fi; fi = fi->next)
// OBSOLETE if (PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
// OBSOLETE return generic_read_register_dummy (fi->pc, fi->frame, regnum);
// OBSOLETE else if (fi->fsr.regs[regnum] != 0)
// OBSOLETE return read_memory_unsigned_integer (fi->fsr.regs[regnum],
// OBSOLETE REGISTER_RAW_SIZE (regnum));
// OBSOLETE
// OBSOLETE return read_register (regnum);
// OBSOLETE }
// OBSOLETE
// OBSOLETE
// OBSOLETE /* Function: frame_chain
// OBSOLETE Figure out the frame prior to FI. Unfortunately, this involves
// OBSOLETE scanning the prologue of the caller, which will also be done
// OBSOLETE shortly by fr30_init_extra_frame_info. For the dummy frame, we
// OBSOLETE just return the stack pointer that was in use at the time the
// OBSOLETE function call was made. */
// OBSOLETE
// OBSOLETE
// OBSOLETE CORE_ADDR
// OBSOLETE fr30_frame_chain (struct frame_info *fi)
// OBSOLETE {
// OBSOLETE CORE_ADDR fn_start, callers_pc, fp;
// OBSOLETE struct frame_info caller_fi;
// OBSOLETE int framereg;
// OBSOLETE
// OBSOLETE /* is this a dummy frame? */
// OBSOLETE if (PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
// OBSOLETE return fi->frame; /* dummy frame same as caller's frame */
// OBSOLETE
// OBSOLETE /* is caller-of-this a dummy frame? */
// OBSOLETE callers_pc = FRAME_SAVED_PC (fi); /* find out who called us: */
// OBSOLETE fp = fr30_find_callers_reg (fi, FP_REGNUM);
// OBSOLETE if (PC_IN_CALL_DUMMY (callers_pc, fp, fp))
// OBSOLETE return fp; /* dummy frame's frame may bear no relation to ours */
// OBSOLETE
// OBSOLETE if (find_pc_partial_function (fi->pc, 0, &fn_start, 0))
// OBSOLETE if (fn_start == entry_point_address ())
// OBSOLETE return 0; /* in _start fn, don't chain further */
// OBSOLETE
// OBSOLETE framereg = fi->framereg;
// OBSOLETE
// OBSOLETE /* If the caller is the startup code, we're at the end of the chain. */
// OBSOLETE if (find_pc_partial_function (callers_pc, 0, &fn_start, 0))
// OBSOLETE if (fn_start == entry_point_address ())
// OBSOLETE return 0;
// OBSOLETE
// OBSOLETE memset (&caller_fi, 0, sizeof (caller_fi));
// OBSOLETE caller_fi.pc = callers_pc;
// OBSOLETE fr30_scan_prologue (&caller_fi);
// OBSOLETE framereg = caller_fi.framereg;
// OBSOLETE
// OBSOLETE /* If the caller used a frame register, return its value.
// OBSOLETE Otherwise, return the caller's stack pointer. */
// OBSOLETE if (framereg == FP_REGNUM)
// OBSOLETE return fr30_find_callers_reg (fi, framereg);
// OBSOLETE else
// OBSOLETE return fi->frame + fi->framesize;
// OBSOLETE }
// OBSOLETE
// OBSOLETE /* Function: frame_saved_pc
// OBSOLETE Find the caller of this frame. We do this by seeing if RP_REGNUM
// OBSOLETE is saved in the stack anywhere, otherwise we get it from the
// OBSOLETE registers. If the inner frame is a dummy frame, return its PC
// OBSOLETE instead of RP, because that's where "caller" of the dummy-frame
// OBSOLETE will be found. */
// OBSOLETE
// OBSOLETE CORE_ADDR
// OBSOLETE fr30_frame_saved_pc (struct frame_info *fi)
// OBSOLETE {
// OBSOLETE if (PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
// OBSOLETE return generic_read_register_dummy (fi->pc, fi->frame, PC_REGNUM);
// OBSOLETE else
// OBSOLETE return fr30_find_callers_reg (fi, RP_REGNUM);
// OBSOLETE }
// OBSOLETE
// OBSOLETE /* Function: fix_call_dummy
// OBSOLETE Pokes the callee function's address into the CALL_DUMMY assembly stub.
// OBSOLETE Assumes that the CALL_DUMMY looks like this:
// OBSOLETE jarl <offset24>, r31
// OBSOLETE trap
// OBSOLETE */
// OBSOLETE
// OBSOLETE int
// OBSOLETE fr30_fix_call_dummy (char *dummy, CORE_ADDR sp, CORE_ADDR fun, int nargs,
// OBSOLETE struct value **args, struct type *type, int gcc_p)
// OBSOLETE {
// OBSOLETE long offset24;
// OBSOLETE
// OBSOLETE offset24 = (long) fun - (long) entry_point_address ();
// OBSOLETE offset24 &= 0x3fffff;
// OBSOLETE offset24 |= 0xff800000; /* jarl <offset24>, r31 */
// OBSOLETE
// OBSOLETE store_unsigned_integer ((unsigned int *) &dummy[2], 2, offset24 & 0xffff);
// OBSOLETE store_unsigned_integer ((unsigned int *) &dummy[0], 2, offset24 >> 16);
// OBSOLETE return 0;
// OBSOLETE }

View file

@ -1,377 +0,0 @@
// OBSOLETE /* Intel 386 native support.
// OBSOLETE Copyright 1988, 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999,
// OBSOLETE 2000, 2001 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 "defs.h"
// OBSOLETE #include "frame.h"
// OBSOLETE #include "inferior.h"
// OBSOLETE #include "language.h"
// OBSOLETE #include "gdbcore.h"
// OBSOLETE #include "regcache.h"
// OBSOLETE
// OBSOLETE #ifdef USG
// OBSOLETE #include <sys/types.h>
// OBSOLETE #endif
// OBSOLETE
// OBSOLETE #include <sys/param.h>
// OBSOLETE #include <sys/dir.h>
// OBSOLETE #include <signal.h>
// OBSOLETE #include <sys/user.h>
// OBSOLETE #include <sys/ioctl.h>
// OBSOLETE #include <fcntl.h>
// OBSOLETE
// OBSOLETE #include <sys/file.h>
// OBSOLETE #include "gdb_stat.h"
// OBSOLETE
// OBSOLETE #include <stddef.h>
// OBSOLETE #include <sys/ptrace.h>
// OBSOLETE
// OBSOLETE /* Does AIX define this in <errno.h>? */
// OBSOLETE extern int errno;
// OBSOLETE
// OBSOLETE #ifdef HAVE_SYS_REG_H
// OBSOLETE #include <sys/reg.h>
// OBSOLETE #endif
// OBSOLETE
// OBSOLETE #include "floatformat.h"
// OBSOLETE
// OBSOLETE #include "target.h"
// OBSOLETE
// OBSOLETE static void fetch_core_registers (char *, unsigned, int, CORE_ADDR);
// OBSOLETE
// OBSOLETE
// OBSOLETE /* this table must line up with REGISTER_NAMES in tm-i386v.h */
// OBSOLETE /* symbols like 'EAX' come from <sys/reg.h> */
// OBSOLETE static int regmap[] =
// OBSOLETE {
// OBSOLETE EAX, ECX, EDX, EBX,
// OBSOLETE USP, EBP, ESI, EDI,
// OBSOLETE EIP, EFL, CS, SS,
// OBSOLETE DS, ES, FS, GS,
// OBSOLETE };
// OBSOLETE
// OBSOLETE /* blockend is the value of u.u_ar0, and points to the
// OBSOLETE * place where GS is stored
// OBSOLETE */
// OBSOLETE
// OBSOLETE int
// OBSOLETE i386_register_u_addr (int blockend, int regnum)
// OBSOLETE {
// OBSOLETE #if 0
// OBSOLETE /* this will be needed if fp registers are reinstated */
// OBSOLETE /* for now, you can look at them with 'info float'
// OBSOLETE * sys5 wont let you change them with ptrace anyway
// OBSOLETE */
// OBSOLETE if (regnum >= FP0_REGNUM && regnum <= FP7_REGNUM)
// OBSOLETE {
// OBSOLETE int ubase, fpstate;
// OBSOLETE struct user u;
// OBSOLETE ubase = blockend + 4 * (SS + 1) - KSTKSZ;
// OBSOLETE fpstate = ubase + ((char *) &u.u_fpstate - (char *) &u);
// OBSOLETE return (fpstate + 0x1c + 10 * (regnum - FP0_REGNUM));
// OBSOLETE }
// OBSOLETE else
// OBSOLETE #endif
// OBSOLETE return (blockend + 4 * regmap[regnum]);
// OBSOLETE
// OBSOLETE }
// OBSOLETE
// OBSOLETE /* The code below only work on the aix ps/2 (i386-ibm-aix) -
// OBSOLETE * mtranle@paris - Sat Apr 11 10:34:12 1992
// OBSOLETE */
// OBSOLETE
// OBSOLETE struct env387
// OBSOLETE {
// OBSOLETE unsigned short control;
// OBSOLETE unsigned short r0;
// OBSOLETE unsigned short status;
// OBSOLETE unsigned short r1;
// OBSOLETE unsigned short tag;
// OBSOLETE unsigned short r2;
// OBSOLETE unsigned long eip;
// OBSOLETE unsigned short code_seg;
// OBSOLETE unsigned short opcode;
// OBSOLETE unsigned long operand;
// OBSOLETE unsigned short operand_seg;
// OBSOLETE unsigned short r3;
// OBSOLETE unsigned char regs[8][10];
// OBSOLETE };
// OBSOLETE
// OBSOLETE static
// OBSOLETE print_387_status (unsigned short status, struct env387 *ep)
// OBSOLETE {
// OBSOLETE int i;
// OBSOLETE int bothstatus;
// OBSOLETE int top;
// OBSOLETE int fpreg;
// OBSOLETE unsigned char *p;
// OBSOLETE
// OBSOLETE bothstatus = ((status != 0) && (ep->status != 0));
// OBSOLETE if (status != 0)
// OBSOLETE {
// OBSOLETE if (bothstatus)
// OBSOLETE printf_unfiltered ("u: ");
// OBSOLETE print_387_status_word (status);
// OBSOLETE }
// OBSOLETE
// OBSOLETE if (ep->status != 0)
// OBSOLETE {
// OBSOLETE if (bothstatus)
// OBSOLETE printf_unfiltered ("e: ");
// OBSOLETE print_387_status_word (ep->status);
// OBSOLETE }
// OBSOLETE
// OBSOLETE print_387_control_word (ep->control);
// OBSOLETE printf_unfiltered ("last exception: ");
// OBSOLETE printf_unfiltered ("opcode %s; ", local_hex_string (ep->opcode));
// OBSOLETE printf_unfiltered ("pc %s:", local_hex_string (ep->code_seg));
// OBSOLETE printf_unfiltered ("%s; ", local_hex_string (ep->eip));
// OBSOLETE printf_unfiltered ("operand %s", local_hex_string (ep->operand_seg));
// OBSOLETE printf_unfiltered (":%s\n", local_hex_string (ep->operand));
// OBSOLETE
// OBSOLETE top = ((ep->status >> 11) & 7);
// OBSOLETE
// OBSOLETE printf_unfiltered ("regno tag msb lsb value\n");
// OBSOLETE for (fpreg = 7; fpreg >= 0; fpreg--)
// OBSOLETE {
// OBSOLETE double val;
// OBSOLETE
// OBSOLETE printf_unfiltered ("%s %d: ", fpreg == top ? "=>" : " ", fpreg);
// OBSOLETE
// OBSOLETE switch ((ep->tag >> ((7 - fpreg) * 2)) & 3)
// OBSOLETE {
// OBSOLETE case 0:
// OBSOLETE printf_unfiltered ("valid ");
// OBSOLETE break;
// OBSOLETE case 1:
// OBSOLETE printf_unfiltered ("zero ");
// OBSOLETE break;
// OBSOLETE case 2:
// OBSOLETE printf_unfiltered ("trap ");
// OBSOLETE break;
// OBSOLETE case 3:
// OBSOLETE printf_unfiltered ("empty ");
// OBSOLETE break;
// OBSOLETE }
// OBSOLETE for (i = 9; i >= 0; i--)
// OBSOLETE printf_unfiltered ("%02x", ep->regs[fpreg][i]);
// OBSOLETE
// OBSOLETE i387_to_double ((char *) ep->regs[fpreg], (char *) &val);
// OBSOLETE printf_unfiltered (" %#g\n", val);
// OBSOLETE }
// OBSOLETE }
// OBSOLETE
// OBSOLETE static struct env387 core_env387;
// OBSOLETE
// OBSOLETE void
// OBSOLETE i386_float_info (void)
// OBSOLETE {
// OBSOLETE struct env387 fps;
// OBSOLETE int fpsaved = 0;
// OBSOLETE /* We need to reverse the order of the registers. Apparently AIX stores
// OBSOLETE the highest-numbered ones first. */
// OBSOLETE struct env387 fps_fixed;
// OBSOLETE int i;
// OBSOLETE
// OBSOLETE if (! ptid_equal (inferior_ptid, null_ptid))
// OBSOLETE {
// OBSOLETE char buf[10];
// OBSOLETE unsigned short status;
// OBSOLETE
// OBSOLETE ptrace (PT_READ_FPR, PIDGET (inferior_ptid), buf,
// OBSOLETE offsetof (struct env387, status));
// OBSOLETE memcpy (&status, buf, sizeof (status));
// OBSOLETE fpsaved = status;
// OBSOLETE }
// OBSOLETE else
// OBSOLETE {
// OBSOLETE if ((fpsaved = core_env387.status) != 0)
// OBSOLETE memcpy (&fps, &core_env387, sizeof (fps));
// OBSOLETE }
// OBSOLETE
// OBSOLETE if (fpsaved == 0)
// OBSOLETE {
// OBSOLETE printf_unfiltered ("no floating point status saved\n");
// OBSOLETE return;
// OBSOLETE }
// OBSOLETE
// OBSOLETE if (! ptid_equal (inferior_ptid, null_ptid))
// OBSOLETE {
// OBSOLETE int offset;
// OBSOLETE for (offset = 0; offset < sizeof (fps); offset += 10)
// OBSOLETE {
// OBSOLETE char buf[10];
// OBSOLETE ptrace (PT_READ_FPR, PIDGET (inferior_ptid), buf, offset);
// OBSOLETE memcpy ((char *) &fps.control + offset, buf,
// OBSOLETE MIN (10, sizeof (fps) - offset));
// OBSOLETE }
// OBSOLETE }
// OBSOLETE fps_fixed = fps;
// OBSOLETE for (i = 0; i < 8; ++i)
// OBSOLETE memcpy (fps_fixed.regs[i], fps.regs[7 - i], 10);
// OBSOLETE print_387_status (0, &fps_fixed);
// OBSOLETE }
// OBSOLETE
// OBSOLETE /* Fetch one register. */
// OBSOLETE static void
// OBSOLETE fetch_register (int regno)
// OBSOLETE {
// OBSOLETE char buf[MAX_REGISTER_RAW_SIZE];
// OBSOLETE if (regno < FP0_REGNUM)
// OBSOLETE *(int *) buf = ptrace (PT_READ_GPR, PIDGET (inferior_ptid),
// OBSOLETE PT_REG (regmap[regno]), 0, 0);
// OBSOLETE else
// OBSOLETE ptrace (PT_READ_FPR, PIDGET (inferior_ptid), buf,
// OBSOLETE (regno - FP0_REGNUM) * 10 + offsetof (struct env387, regs));
// OBSOLETE supply_register (regno, buf);
// OBSOLETE }
// OBSOLETE
// OBSOLETE void
// OBSOLETE fetch_inferior_registers (int regno)
// OBSOLETE {
// OBSOLETE if (regno < 0)
// OBSOLETE for (regno = 0; regno < NUM_REGS; regno++)
// OBSOLETE fetch_register (regno);
// OBSOLETE else
// OBSOLETE fetch_register (regno);
// OBSOLETE }
// OBSOLETE
// OBSOLETE /* store one register */
// OBSOLETE static void
// OBSOLETE store_register (int regno)
// OBSOLETE {
// OBSOLETE char buf[80];
// OBSOLETE errno = 0;
// OBSOLETE if (regno < FP0_REGNUM)
// OBSOLETE ptrace (PT_WRITE_GPR, PIDGET (inferior_ptid), PT_REG (regmap[regno]),
// OBSOLETE *(int *) &registers[REGISTER_BYTE (regno)], 0);
// OBSOLETE else
// OBSOLETE ptrace (PT_WRITE_FPR, PIDGET (inferior_ptid),
// OBSOLETE &registers[REGISTER_BYTE (regno)],
// OBSOLETE (regno - FP0_REGNUM) * 10 + offsetof (struct env387, regs));
// OBSOLETE
// OBSOLETE if (errno != 0)
// OBSOLETE {
// OBSOLETE sprintf (buf, "writing register number %d", regno);
// OBSOLETE perror_with_name (buf);
// OBSOLETE }
// OBSOLETE }
// OBSOLETE
// OBSOLETE /* Store our register values back into the inferior.
// OBSOLETE If REGNO is -1, do this for all registers.
// OBSOLETE Otherwise, REGNO specifies which register (so we can save time). */
// OBSOLETE void
// OBSOLETE store_inferior_registers (int regno)
// OBSOLETE {
// OBSOLETE if (regno < 0)
// OBSOLETE for (regno = 0; regno < NUM_REGS; regno++)
// OBSOLETE store_register (regno);
// OBSOLETE else
// OBSOLETE store_register (regno);
// OBSOLETE }
// OBSOLETE
// OBSOLETE #ifndef CD_AX /* defined in sys/i386/coredump.h */
// OBSOLETE #define CD_AX 0
// OBSOLETE #define CD_BX 1
// OBSOLETE #define CD_CX 2
// OBSOLETE #define CD_DX 3
// OBSOLETE #define CD_SI 4
// OBSOLETE #define CD_DI 5
// OBSOLETE #define CD_BP 6
// OBSOLETE #define CD_SP 7
// OBSOLETE #define CD_FL 8
// OBSOLETE #define CD_IP 9
// OBSOLETE #define CD_CS 10
// OBSOLETE #define CD_DS 11
// OBSOLETE #define CD_ES 12
// OBSOLETE #define CD_FS 13
// OBSOLETE #define CD_GS 14
// OBSOLETE #define CD_SS 15
// OBSOLETE #endif
// OBSOLETE
// OBSOLETE /*
// OBSOLETE * The order here in core_regmap[] has to be the same as in
// OBSOLETE * regmap[] above.
// OBSOLETE */
// OBSOLETE static int core_regmap[] =
// OBSOLETE {
// OBSOLETE CD_AX, CD_CX, CD_DX, CD_BX,
// OBSOLETE CD_SP, CD_BP, CD_SI, CD_DI,
// OBSOLETE CD_IP, CD_FL, CD_CS, CD_SS,
// OBSOLETE CD_DS, CD_ES, CD_FS, CD_GS,
// OBSOLETE };
// OBSOLETE
// OBSOLETE /* Provide registers to GDB from a core file.
// OBSOLETE
// OBSOLETE CORE_REG_SECT points to an array of bytes, which were obtained from
// OBSOLETE a core file which BFD thinks might contain register contents.
// OBSOLETE CORE_REG_SIZE is its size.
// OBSOLETE
// OBSOLETE WHICH says which register set corelow suspects this is:
// OBSOLETE 0 --- the general-purpose register set
// OBSOLETE 2 --- the floating-point register set
// OBSOLETE
// OBSOLETE REG_ADDR isn't used. */
// OBSOLETE
// OBSOLETE static void
// OBSOLETE fetch_core_registers (char *core_reg_sect, unsigned core_reg_size,
// OBSOLETE int which, CORE_ADDR reg_addr)
// OBSOLETE {
// OBSOLETE
// OBSOLETE if (which == 0)
// OBSOLETE {
// OBSOLETE /* Integer registers */
// OBSOLETE
// OBSOLETE #define cd_regs(n) ((int *)core_reg_sect)[n]
// OBSOLETE #define regs(n) *((int *) &registers[REGISTER_BYTE (n)])
// OBSOLETE
// OBSOLETE int i;
// OBSOLETE for (i = 0; i < FP0_REGNUM; i++)
// OBSOLETE regs (i) = cd_regs (core_regmap[i]);
// OBSOLETE }
// OBSOLETE else if (which == 2)
// OBSOLETE {
// OBSOLETE /* Floating point registers */
// OBSOLETE
// OBSOLETE if (core_reg_size >= sizeof (core_env387))
// OBSOLETE memcpy (&core_env387, core_reg_sect, core_reg_size);
// OBSOLETE else
// OBSOLETE fprintf_unfiltered (gdb_stderr, "Couldn't read float regs from core file\n");
// OBSOLETE }
// OBSOLETE }
// OBSOLETE
// OBSOLETE
// OBSOLETE /* Register that we are able to handle i386aix core file formats.
// OBSOLETE FIXME: is this really bfd_target_unknown_flavour? */
// OBSOLETE
// OBSOLETE static struct core_fns i386aix_core_fns =
// OBSOLETE {
// OBSOLETE bfd_target_unknown_flavour, /* core_flavour */
// OBSOLETE default_check_format, /* check_format */
// OBSOLETE default_core_sniffer, /* core_sniffer */
// OBSOLETE fetch_core_registers, /* core_read_registers */
// OBSOLETE NULL /* next */
// OBSOLETE };
// OBSOLETE
// OBSOLETE void
// OBSOLETE _initialize_core_i386aix (void)
// OBSOLETE {
// OBSOLETE add_core_fns (&i386aix_core_fns);
// OBSOLETE }

View file

@ -1,426 +0,0 @@
// OBSOLETE /* Low level interface to I386 running mach 3.0.
// OBSOLETE Copyright 1992, 1993, 1994, 1996, 2000, 2001
// 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 "defs.h"
// OBSOLETE #include "inferior.h"
// OBSOLETE #include "floatformat.h"
// OBSOLETE #include "regcache.h"
// OBSOLETE
// OBSOLETE #include <stdio.h>
// OBSOLETE
// OBSOLETE #include <mach.h>
// OBSOLETE #include <mach/message.h>
// OBSOLETE #include <mach/exception.h>
// OBSOLETE #include <mach_error.h>
// OBSOLETE
// OBSOLETE /* Hmmm... Should this not be here?
// OBSOLETE * Now for i386_float_info() target_has_execution
// OBSOLETE */
// OBSOLETE #include <target.h>
// OBSOLETE
// OBSOLETE /* This mess is duplicated in bfd/i386mach3.h
// OBSOLETE
// OBSOLETE * This is an ugly way to hack around the incorrect
// OBSOLETE * definition of UPAGES in i386/machparam.h.
// OBSOLETE *
// OBSOLETE * The definition should specify the size reserved
// OBSOLETE * for "struct user" in core files in PAGES,
// OBSOLETE * but instead it gives it in 512-byte core-clicks
// OBSOLETE * for i386 and i860.
// OBSOLETE */
// OBSOLETE #include <sys/param.h>
// OBSOLETE #if UPAGES == 16
// OBSOLETE #define UAREA_SIZE ctob(UPAGES)
// OBSOLETE #elif UPAGES == 2
// OBSOLETE #define UAREA_SIZE (NBPG*UPAGES)
// OBSOLETE #else
// OBSOLETE FIXME ! !UPAGES is neither 2 nor 16
// OBSOLETE #endif
// OBSOLETE
// OBSOLETE /* @@@ Should move print_387_status() to i387-tdep.c */
// OBSOLETE extern void print_387_control_word (); /* i387-tdep.h */
// OBSOLETE extern void print_387_status_word ();
// OBSOLETE
// OBSOLETE #define private static
// OBSOLETE
// OBSOLETE
// OBSOLETE /* Find offsets to thread states at compile time.
// OBSOLETE * If your compiler does not grok this, calculate offsets
// OBSOLETE * offsets yourself and use them (or get a compatible compiler :-)
// OBSOLETE */
// OBSOLETE
// OBSOLETE #define REG_OFFSET(reg) (int)(&((struct i386_thread_state *)0)->reg)
// OBSOLETE
// OBSOLETE /* at reg_offset[i] is the offset to the i386_thread_state
// OBSOLETE * location where the gdb registers[i] is stored.
// OBSOLETE */
// OBSOLETE
// OBSOLETE static int reg_offset[] =
// OBSOLETE {
// OBSOLETE REG_OFFSET (eax), REG_OFFSET (ecx), REG_OFFSET (edx), REG_OFFSET (ebx),
// OBSOLETE REG_OFFSET (uesp), REG_OFFSET (ebp), REG_OFFSET (esi), REG_OFFSET (edi),
// OBSOLETE REG_OFFSET (eip), REG_OFFSET (efl), REG_OFFSET (cs), REG_OFFSET (ss),
// OBSOLETE REG_OFFSET (ds), REG_OFFSET (es), REG_OFFSET (fs), REG_OFFSET (gs)
// OBSOLETE };
// OBSOLETE
// OBSOLETE #define REG_ADDRESS(state,regnum) ((char *)(state)+reg_offset[regnum])
// OBSOLETE
// OBSOLETE /* Fetch COUNT contiguous registers from thread STATE starting from REGNUM
// OBSOLETE * Caller knows that the regs handled in one transaction are of same size.
// OBSOLETE */
// OBSOLETE #define FETCH_REGS(state, regnum, count) \
// OBSOLETE memcpy (&registers[REGISTER_BYTE (regnum)], \
// OBSOLETE REG_ADDRESS (state, regnum), \
// OBSOLETE count*REGISTER_SIZE)
// OBSOLETE
// OBSOLETE /* Store COUNT contiguous registers to thread STATE starting from REGNUM */
// OBSOLETE #define STORE_REGS(state, regnum, count) \
// OBSOLETE memcpy (REG_ADDRESS (state, regnum), \
// OBSOLETE &registers[REGISTER_BYTE (regnum)], \
// OBSOLETE count*REGISTER_SIZE)
// OBSOLETE
// OBSOLETE /*
// OBSOLETE * Fetch inferiors registers for gdb.
// OBSOLETE * REGNO specifies which (as gdb views it) register, -1 for all.
// OBSOLETE */
// OBSOLETE
// OBSOLETE void
// OBSOLETE fetch_inferior_registers (int regno)
// OBSOLETE {
// OBSOLETE kern_return_t ret;
// OBSOLETE thread_state_data_t state;
// OBSOLETE unsigned int stateCnt = i386_THREAD_STATE_COUNT;
// OBSOLETE int index;
// OBSOLETE
// OBSOLETE if (!MACH_PORT_VALID (current_thread))
// OBSOLETE error ("fetch inferior registers: Invalid thread");
// OBSOLETE
// OBSOLETE if (must_suspend_thread)
// OBSOLETE setup_thread (current_thread, 1);
// OBSOLETE
// OBSOLETE ret = thread_get_state (current_thread,
// OBSOLETE i386_THREAD_STATE,
// OBSOLETE state,
// OBSOLETE &stateCnt);
// OBSOLETE
// OBSOLETE if (ret != KERN_SUCCESS)
// OBSOLETE warning ("fetch_inferior_registers: %s ",
// OBSOLETE mach_error_string (ret));
// OBSOLETE #if 0
// OBSOLETE /* It may be more effective to store validate all of them,
// OBSOLETE * since we fetched them all anyway
// OBSOLETE */
// OBSOLETE else if (regno != -1)
// OBSOLETE supply_register (regno, (char *) state + reg_offset[regno]);
// OBSOLETE #endif
// OBSOLETE else
// OBSOLETE {
// OBSOLETE for (index = 0; index < NUM_REGS; index++)
// OBSOLETE supply_register (index, (char *) state + reg_offset[index]);
// OBSOLETE }
// OBSOLETE
// OBSOLETE if (must_suspend_thread)
// OBSOLETE setup_thread (current_thread, 0);
// OBSOLETE }
// OBSOLETE
// OBSOLETE /* Store our register values back into the inferior.
// OBSOLETE * If REGNO is -1, do this for all registers.
// OBSOLETE * Otherwise, REGNO specifies which register
// OBSOLETE *
// OBSOLETE * On mach3 all registers are always saved in one call.
// OBSOLETE */
// OBSOLETE void
// OBSOLETE store_inferior_registers (int regno)
// OBSOLETE {
// OBSOLETE kern_return_t ret;
// OBSOLETE thread_state_data_t state;
// OBSOLETE unsigned int stateCnt = i386_THREAD_STATE_COUNT;
// OBSOLETE register int index;
// OBSOLETE
// OBSOLETE if (!MACH_PORT_VALID (current_thread))
// OBSOLETE error ("store inferior registers: Invalid thread");
// OBSOLETE
// OBSOLETE if (must_suspend_thread)
// OBSOLETE setup_thread (current_thread, 1);
// OBSOLETE
// OBSOLETE /* Fetch the state of the current thread */
// OBSOLETE ret = thread_get_state (current_thread,
// OBSOLETE i386_THREAD_STATE,
// OBSOLETE state,
// OBSOLETE &stateCnt);
// OBSOLETE
// OBSOLETE if (ret != KERN_SUCCESS)
// OBSOLETE {
// OBSOLETE warning ("store_inferior_registers (get): %s",
// OBSOLETE mach_error_string (ret));
// OBSOLETE if (must_suspend_thread)
// OBSOLETE setup_thread (current_thread, 0);
// OBSOLETE return;
// OBSOLETE }
// OBSOLETE
// OBSOLETE /* move gdb's registers to thread's state
// OBSOLETE
// OBSOLETE * Since we save all registers anyway, save the ones
// OBSOLETE * that gdb thinks are valid (e.g. ignore the regno
// OBSOLETE * parameter)
// OBSOLETE */
// OBSOLETE #if 0
// OBSOLETE if (regno != -1)
// OBSOLETE STORE_REGS (state, regno, 1);
// OBSOLETE else
// OBSOLETE #endif
// OBSOLETE {
// OBSOLETE for (index = 0; index < NUM_REGS; index++)
// OBSOLETE STORE_REGS (state, index, 1);
// OBSOLETE }
// OBSOLETE
// OBSOLETE /* Write gdb's current view of register to the thread
// OBSOLETE */
// OBSOLETE ret = thread_set_state (current_thread,
// OBSOLETE i386_THREAD_STATE,
// OBSOLETE state,
// OBSOLETE i386_THREAD_STATE_COUNT);
// OBSOLETE
// OBSOLETE if (ret != KERN_SUCCESS)
// OBSOLETE warning ("store_inferior_registers (set): %s",
// OBSOLETE mach_error_string (ret));
// OBSOLETE
// OBSOLETE if (must_suspend_thread)
// OBSOLETE setup_thread (current_thread, 0);
// OBSOLETE }
// OBSOLETE
// OBSOLETE
// OBSOLETE
// OBSOLETE /* Return the address in the core dump or inferior of register REGNO.
// OBSOLETE * BLOCKEND should be the address of the end of the UPAGES area read
// OBSOLETE * in memory, but it's not?
// OBSOLETE *
// OBSOLETE * Currently our UX server dumps the whole thread state to the
// OBSOLETE * core file. If your UX does something else, adapt the routine
// OBSOLETE * below to return the offset to the given register.
// OBSOLETE *
// OBSOLETE * Called by core-aout.c(fetch_core_registers)
// OBSOLETE */
// OBSOLETE
// OBSOLETE CORE_ADDR
// OBSOLETE register_addr (int regno, CORE_ADDR blockend)
// OBSOLETE {
// OBSOLETE CORE_ADDR addr;
// OBSOLETE
// OBSOLETE if (regno < 0 || regno >= NUM_REGS)
// OBSOLETE error ("Invalid register number %d.", regno);
// OBSOLETE
// OBSOLETE /* UAREA_SIZE == 8 kB in i386 */
// OBSOLETE addr = (unsigned int) REG_ADDRESS (UAREA_SIZE - sizeof (struct i386_thread_state), regno);
// OBSOLETE
// OBSOLETE return addr;
// OBSOLETE }
// OBSOLETE
// OBSOLETE /* jtv@hut.fi: I copied and modified this 387 code from
// OBSOLETE * gdb/i386-xdep.c. Modifications for Mach 3.0.
// OBSOLETE *
// OBSOLETE * i387 status dumper. See also i387-tdep.c
// OBSOLETE */
// OBSOLETE struct env387
// OBSOLETE {
// OBSOLETE unsigned short control;
// OBSOLETE unsigned short r0;
// OBSOLETE unsigned short status;
// OBSOLETE unsigned short r1;
// OBSOLETE unsigned short tag;
// OBSOLETE unsigned short r2;
// OBSOLETE unsigned long eip;
// OBSOLETE unsigned short code_seg;
// OBSOLETE unsigned short opcode;
// OBSOLETE unsigned long operand;
// OBSOLETE unsigned short operand_seg;
// OBSOLETE unsigned short r3;
// OBSOLETE unsigned char regs[8][10];
// OBSOLETE };
// OBSOLETE /* This routine is machine independent?
// OBSOLETE * Should move it to i387-tdep.c but you need to export struct env387
// OBSOLETE */
// OBSOLETE private
// OBSOLETE print_387_status (unsigned short status, struct env387 *ep)
// OBSOLETE {
// OBSOLETE int i;
// OBSOLETE int bothstatus;
// OBSOLETE int top;
// OBSOLETE int fpreg;
// OBSOLETE unsigned char *p;
// OBSOLETE
// OBSOLETE bothstatus = ((status != 0) && (ep->status != 0));
// OBSOLETE if (status != 0)
// OBSOLETE {
// OBSOLETE if (bothstatus)
// OBSOLETE printf_unfiltered ("u: ");
// OBSOLETE print_387_status_word (status);
// OBSOLETE }
// OBSOLETE
// OBSOLETE if (ep->status != 0)
// OBSOLETE {
// OBSOLETE if (bothstatus)
// OBSOLETE printf_unfiltered ("e: ");
// OBSOLETE print_387_status_word (ep->status);
// OBSOLETE }
// OBSOLETE
// OBSOLETE print_387_control_word (ep->control);
// OBSOLETE printf_unfiltered ("last exception: ");
// OBSOLETE printf_unfiltered ("opcode %s; ", local_hex_string (ep->opcode));
// OBSOLETE printf_unfiltered ("pc %s:", local_hex_string (ep->code_seg));
// OBSOLETE printf_unfiltered ("%s; ", local_hex_string (ep->eip));
// OBSOLETE printf_unfiltered ("operand %s", local_hex_string (ep->operand_seg));
// OBSOLETE printf_unfiltered (":%s\n", local_hex_string (ep->operand));
// OBSOLETE
// OBSOLETE top = (ep->status >> 11) & 7;
// OBSOLETE
// OBSOLETE printf_unfiltered ("regno tag msb lsb value\n");
// OBSOLETE for (fpreg = 7; fpreg >= 0; fpreg--)
// OBSOLETE {
// OBSOLETE double val;
// OBSOLETE
// OBSOLETE printf_unfiltered ("%s %d: ", fpreg == top ? "=>" : " ", fpreg);
// OBSOLETE
// OBSOLETE switch ((ep->tag >> (fpreg * 2)) & 3)
// OBSOLETE {
// OBSOLETE case 0:
// OBSOLETE printf_unfiltered ("valid ");
// OBSOLETE break;
// OBSOLETE case 1:
// OBSOLETE printf_unfiltered ("zero ");
// OBSOLETE break;
// OBSOLETE case 2:
// OBSOLETE printf_unfiltered ("trap ");
// OBSOLETE break;
// OBSOLETE case 3:
// OBSOLETE printf_unfiltered ("empty ");
// OBSOLETE break;
// OBSOLETE }
// OBSOLETE for (i = 9; i >= 0; i--)
// OBSOLETE printf_unfiltered ("%02x", ep->regs[fpreg][i]);
// OBSOLETE
// OBSOLETE floatformat_to_double (&floatformat_i387_ext, (char *) ep->regs[fpreg],
// OBSOLETE &val);
// OBSOLETE printf_unfiltered (" %g\n", val);
// OBSOLETE }
// OBSOLETE if (ep->r0)
// OBSOLETE printf_unfiltered ("warning: reserved0 is %s\n", local_hex_string (ep->r0));
// OBSOLETE if (ep->r1)
// OBSOLETE printf_unfiltered ("warning: reserved1 is %s\n", local_hex_string (ep->r1));
// OBSOLETE if (ep->r2)
// OBSOLETE printf_unfiltered ("warning: reserved2 is %s\n", local_hex_string (ep->r2));
// OBSOLETE if (ep->r3)
// OBSOLETE printf_unfiltered ("warning: reserved3 is %s\n", local_hex_string (ep->r3));
// OBSOLETE }
// OBSOLETE
// OBSOLETE /*
// OBSOLETE * values that go into fp_kind (from <i386/fpreg.h>)
// OBSOLETE */
// OBSOLETE #define FP_NO 0 /* no fp chip, no emulator (no fp support) */
// OBSOLETE #define FP_SW 1 /* no fp chip, using software emulator */
// OBSOLETE #define FP_HW 2 /* chip present bit */
// OBSOLETE #define FP_287 2 /* 80287 chip present */
// OBSOLETE #define FP_387 3 /* 80387 chip present */
// OBSOLETE
// OBSOLETE typedef struct fpstate
// OBSOLETE {
// OBSOLETE #if 1
// OBSOLETE unsigned char state[FP_STATE_BYTES]; /* "hardware" state */
// OBSOLETE #else
// OBSOLETE struct env387 state; /* Actually this */
// OBSOLETE #endif
// OBSOLETE int status; /* Duplicate status */
// OBSOLETE }
// OBSOLETE *fpstate_t;
// OBSOLETE
// OBSOLETE /* Mach 3 specific routines.
// OBSOLETE */
// OBSOLETE private boolean_t
// OBSOLETE get_i387_state (struct fpstate *fstate)
// OBSOLETE {
// OBSOLETE kern_return_t ret;
// OBSOLETE thread_state_data_t state;
// OBSOLETE unsigned int fsCnt = i386_FLOAT_STATE_COUNT;
// OBSOLETE struct i386_float_state *fsp;
// OBSOLETE
// OBSOLETE ret = thread_get_state (current_thread,
// OBSOLETE i386_FLOAT_STATE,
// OBSOLETE state,
// OBSOLETE &fsCnt);
// OBSOLETE
// OBSOLETE if (ret != KERN_SUCCESS)
// OBSOLETE {
// OBSOLETE warning ("Can not get live floating point state: %s",
// OBSOLETE mach_error_string (ret));
// OBSOLETE return FALSE;
// OBSOLETE }
// OBSOLETE
// OBSOLETE fsp = (struct i386_float_state *) state;
// OBSOLETE /* The 387 chip (also 486 counts) or a software emulator? */
// OBSOLETE if (!fsp->initialized || (fsp->fpkind != FP_387 && fsp->fpkind != FP_SW))
// OBSOLETE return FALSE;
// OBSOLETE
// OBSOLETE /* Clear the target then copy thread's float state there.
// OBSOLETE Make a copy of the status word, for some reason?
// OBSOLETE */
// OBSOLETE memset (fstate, 0, sizeof (struct fpstate));
// OBSOLETE
// OBSOLETE fstate->status = fsp->exc_status;
// OBSOLETE
// OBSOLETE memcpy (fstate->state, (char *) &fsp->hw_state, FP_STATE_BYTES);
// OBSOLETE
// OBSOLETE return TRUE;
// OBSOLETE }
// OBSOLETE
// OBSOLETE private boolean_t
// OBSOLETE get_i387_core_state (struct fpstate *fstate)
// OBSOLETE {
// OBSOLETE /* Not implemented yet. Core files do not contain float state. */
// OBSOLETE return FALSE;
// OBSOLETE }
// OBSOLETE
// OBSOLETE /*
// OBSOLETE * This is called by "info float" command
// OBSOLETE */
// OBSOLETE void
// OBSOLETE i386_mach3_float_info (void)
// OBSOLETE {
// OBSOLETE char buf[sizeof (struct fpstate) + 2 * sizeof (int)];
// OBSOLETE boolean_t valid = FALSE;
// OBSOLETE fpstate_t fps;
// OBSOLETE
// OBSOLETE if (target_has_execution)
// OBSOLETE valid = get_i387_state (buf);
// OBSOLETE #if 0
// OBSOLETE else if (WE HAVE CORE FILE) /* @@@@ Core files not supported */
// OBSOLETE valid = get_i387_core_state (buf);
// OBSOLETE #endif
// OBSOLETE
// OBSOLETE if (!valid)
// OBSOLETE {
// OBSOLETE warning ("no floating point status saved");
// OBSOLETE return;
// OBSOLETE }
// OBSOLETE
// OBSOLETE fps = (fpstate_t) buf;
// OBSOLETE
// OBSOLETE print_387_status (fps->status, (struct env387 *) fps->state);
// OBSOLETE }

View file

@ -1,172 +0,0 @@
// OBSOLETE /* Native dependent code for Mach 386's for GDB, the GNU debugger.
// OBSOLETE Copyright 1986, 1987, 1989, 1991, 1992, 1993, 1995, 1996, 1999, 2000,
// OBSOLETE 2001 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 "defs.h"
// OBSOLETE #include "frame.h"
// OBSOLETE #include "inferior.h"
// OBSOLETE #include "gdbcore.h"
// OBSOLETE #include "regcache.h"
// OBSOLETE
// OBSOLETE #include <sys/param.h>
// OBSOLETE #include <sys/dir.h>
// OBSOLETE #include <sys/user.h>
// OBSOLETE #include <signal.h>
// OBSOLETE #include <sys/ioctl.h>
// OBSOLETE #include <fcntl.h>
// OBSOLETE
// OBSOLETE #include <sys/ptrace.h>
// OBSOLETE #include <machine/reg.h>
// OBSOLETE
// OBSOLETE #include <sys/file.h>
// OBSOLETE #include "gdb_stat.h"
// OBSOLETE #include <sys/core.h>
// OBSOLETE
// OBSOLETE static void fetch_core_registers (char *, unsigned, int, CORE_ADDR);
// OBSOLETE
// OBSOLETE void
// OBSOLETE fetch_inferior_registers (int regno)
// OBSOLETE {
// OBSOLETE struct regs inferior_registers;
// OBSOLETE struct fp_state inferior_fp_registers;
// OBSOLETE
// OBSOLETE registers_fetched ();
// OBSOLETE
// OBSOLETE ptrace (PTRACE_GETREGS, PIDGET (inferior_ptid),
// OBSOLETE (PTRACE_ARG3_TYPE) & inferior_registers);
// OBSOLETE ptrace (PTRACE_GETFPREGS, PIDGET (inferior_ptid),
// OBSOLETE (PTRACE_ARG3_TYPE) & inferior_fp_registers);
// OBSOLETE
// OBSOLETE memcpy (registers, &inferior_registers, sizeof inferior_registers);
// OBSOLETE
// OBSOLETE memcpy (&registers[REGISTER_BYTE (FP0_REGNUM)],
// OBSOLETE inferior_fp_registers.f_st,
// OBSOLETE sizeof inferior_fp_registers.f_st);
// OBSOLETE memcpy (&registers[REGISTER_BYTE (FPC_REGNUM)],
// OBSOLETE &inferior_fp_registers.f_ctrl,
// OBSOLETE sizeof inferior_fp_registers - sizeof inferior_fp_registers.f_st);
// OBSOLETE }
// OBSOLETE
// OBSOLETE /* Store our register values back into the inferior.
// OBSOLETE If REGNO is -1, do this for all registers.
// OBSOLETE Otherwise, REGNO specifies which register (so we can save time). */
// OBSOLETE
// OBSOLETE void
// OBSOLETE store_inferior_registers (int regno)
// OBSOLETE {
// OBSOLETE struct regs inferior_registers;
// OBSOLETE struct fp_state inferior_fp_registers;
// OBSOLETE
// OBSOLETE memcpy (&inferior_registers, registers, 20 * 4);
// OBSOLETE
// OBSOLETE memcpy (inferior_fp_registers.f_st, &registers[REGISTER_BYTE (FP0_REGNUM)],
// OBSOLETE sizeof inferior_fp_registers.f_st);
// OBSOLETE memcpy (&inferior_fp_registers.f_ctrl,
// OBSOLETE &registers[REGISTER_BYTE (FPC_REGNUM)],
// OBSOLETE sizeof inferior_fp_registers - sizeof inferior_fp_registers.f_st);
// OBSOLETE
// OBSOLETE #ifdef PTRACE_FP_BUG
// OBSOLETE if (regno == FP_REGNUM || regno == -1)
// OBSOLETE /* Storing the frame pointer requires a gross hack, in which an
// OBSOLETE instruction that moves eax into ebp gets single-stepped. */
// OBSOLETE {
// OBSOLETE int stack = inferior_registers.r_reg[SP_REGNUM];
// OBSOLETE int stuff = ptrace (PTRACE_PEEKDATA, PIDGET (inferior_ptid),
// OBSOLETE (PTRACE_ARG3_TYPE) stack);
// OBSOLETE int reg = inferior_registers.r_reg[EAX];
// OBSOLETE inferior_registers.r_reg[EAX] =
// OBSOLETE inferior_registers.r_reg[FP_REGNUM];
// OBSOLETE ptrace (PTRACE_SETREGS, PIDGET (inferior_ptid),
// OBSOLETE (PTRACE_ARG3_TYPE) & inferior_registers);
// OBSOLETE ptrace (PTRACE_POKEDATA, PIDGET (inferior_ptid),
// OBSOLETE (PTRACE_ARG3_TYPE) stack, 0xc589);
// OBSOLETE ptrace (PTRACE_SINGLESTEP, PIDGET (inferior_ptid),
// OBSOLETE (PTRACE_ARG3_TYPE) stack, 0);
// OBSOLETE wait (0);
// OBSOLETE ptrace (PTRACE_POKEDATA, PIDGET (inferior_ptid),
// OBSOLETE (PTRACE_ARG3_TYPE) stack, stuff);
// OBSOLETE inferior_registers.r_reg[EAX] = reg;
// OBSOLETE }
// OBSOLETE #endif
// OBSOLETE ptrace (PTRACE_SETREGS, PIDGET (inferior_ptid),
// OBSOLETE (PTRACE_ARG3_TYPE) & inferior_registers);
// OBSOLETE ptrace (PTRACE_SETFPREGS, PIDGET (inferior_ptid),
// OBSOLETE (PTRACE_ARG3_TYPE) & inferior_fp_registers);
// OBSOLETE }
// OBSOLETE
// OBSOLETE
// OBSOLETE
// OBSOLETE /* Provide registers to GDB from a core file.
// OBSOLETE
// OBSOLETE CORE_REG_SECT points to an array of bytes, which were obtained from
// OBSOLETE a core file which BFD thinks might contain register contents.
// OBSOLETE CORE_REG_SIZE is its size.
// OBSOLETE
// OBSOLETE WHICH says which register set corelow suspects this is:
// OBSOLETE 0 --- the general-purpose register set
// OBSOLETE 2 --- the floating-point register set
// OBSOLETE
// OBSOLETE REG_ADDR isn't used. */
// OBSOLETE
// OBSOLETE static void
// OBSOLETE fetch_core_registers (char *core_reg_sect, unsigned core_reg_size,
// OBSOLETE int which, CORE_ADDR reg_addr)
// OBSOLETE {
// OBSOLETE int val;
// OBSOLETE
// OBSOLETE switch (which)
// OBSOLETE {
// OBSOLETE case 0:
// OBSOLETE case 1:
// OBSOLETE memcpy (registers, core_reg_sect, core_reg_size);
// OBSOLETE break;
// OBSOLETE
// OBSOLETE case 2:
// OBSOLETE memcpy (&registers[REGISTER_BYTE (FP0_REGNUM)],
// OBSOLETE core_reg_sect,
// OBSOLETE core_reg_size); /* FIXME, probably bogus */
// OBSOLETE #ifdef FPC_REGNUM
// OBSOLETE memcpy (&registers[REGISTER_BYTE (FPC_REGNUM)],
// OBSOLETE &corestr.c_fpu.f_fpstatus.f_ctrl,
// OBSOLETE sizeof corestr.c_fpu.f_fpstatus -
// OBSOLETE sizeof corestr.c_fpu.f_fpstatus.f_st);
// OBSOLETE #endif
// OBSOLETE break;
// OBSOLETE }
// OBSOLETE }
// OBSOLETE
// OBSOLETE
// OBSOLETE /* Register that we are able to handle i386mach core file formats.
// OBSOLETE FIXME: is this really bfd_target_unknown_flavour? */
// OBSOLETE
// OBSOLETE static struct core_fns i386mach_core_fns =
// OBSOLETE {
// OBSOLETE bfd_target_unknown_flavour, /* core_flavour */
// OBSOLETE default_check_format, /* check_format */
// OBSOLETE default_core_sniffer, /* core_sniffer */
// OBSOLETE fetch_core_registers, /* core_read_registers */
// OBSOLETE NULL /* next */
// OBSOLETE };
// OBSOLETE
// OBSOLETE void
// OBSOLETE _initialize_core_i386mach (void)
// OBSOLETE {
// OBSOLETE add_core_fns (&i386mach_core_fns);
// OBSOLETE }

File diff suppressed because it is too large Load diff

View file

@ -1,290 +0,0 @@
// OBSOLETE /* Native-dependent Motorola 88xxx support for GDB, the GNU Debugger.
// OBSOLETE Copyright 1988, 1990, 1991, 1992, 1993, 1995, 1999, 2000, 2001
// 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 "defs.h"
// OBSOLETE #include "frame.h"
// OBSOLETE #include "inferior.h"
// OBSOLETE #include "regcache.h"
// OBSOLETE
// OBSOLETE #include <sys/types.h>
// OBSOLETE #include <sys/param.h>
// OBSOLETE #include <sys/dir.h>
// OBSOLETE #include <signal.h>
// OBSOLETE #include "gdbcore.h"
// OBSOLETE #include <sys/user.h>
// OBSOLETE
// OBSOLETE #ifndef USER /* added to support BCS ptrace_user */
// OBSOLETE #define USER ptrace_user
// OBSOLETE #endif
// OBSOLETE #include <sys/ioctl.h>
// OBSOLETE #include <fcntl.h>
// OBSOLETE #include <sys/file.h>
// OBSOLETE #include "gdb_stat.h"
// OBSOLETE
// OBSOLETE #include "symtab.h"
// OBSOLETE #include "setjmp.h"
// OBSOLETE #include "value.h"
// OBSOLETE
// OBSOLETE #ifdef DELTA88
// OBSOLETE #include <sys/ptrace.h>
// OBSOLETE
// OBSOLETE /* define offsets to the pc instruction offsets in ptrace_user struct */
// OBSOLETE #define SXIP_OFFSET ((char *)&u.pt_sigframe.sig_sxip - (char *)&u)
// OBSOLETE #define SNIP_OFFSET ((char *)&u.pt_sigframe.sig_snip - (char *)&u)
// OBSOLETE #define SFIP_OFFSET ((char *)&u.pt_sigframe.sig_sfip - (char *)&u)
// OBSOLETE #else
// OBSOLETE /* define offsets to the pc instruction offsets in ptrace_user struct */
// OBSOLETE #define SXIP_OFFSET ((char *)&u.pt_sigframe.dg_sigframe.sc_sxip - (char *)&u)
// OBSOLETE #define SNIP_OFFSET ((char *)&u.pt_sigframe.dg_sigframe.sc_snip - (char *)&u)
// OBSOLETE #define SFIP_OFFSET ((char *)&u.pt_sigframe.dg_sigframe.sc_sfip - (char *)&u)
// OBSOLETE #endif
// OBSOLETE
// OBSOLETE extern int have_symbol_file_p ();
// OBSOLETE
// OBSOLETE extern jmp_buf stack_jmp;
// OBSOLETE
// OBSOLETE extern int errno;
// OBSOLETE
// OBSOLETE void
// OBSOLETE fetch_inferior_registers (int regno)
// OBSOLETE {
// OBSOLETE register unsigned int regaddr;
// OBSOLETE char buf[MAX_REGISTER_RAW_SIZE];
// OBSOLETE register int i;
// OBSOLETE
// OBSOLETE struct USER u;
// OBSOLETE unsigned int offset;
// OBSOLETE
// OBSOLETE offset = (char *) &u.pt_r0 - (char *) &u;
// OBSOLETE regaddr = offset; /* byte offset to r0; */
// OBSOLETE
// OBSOLETE /* offset = ptrace (3, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) offset, 0) - KERNEL_U_ADDR; */
// OBSOLETE for (regno = 0; regno < NUM_REGS; regno++)
// OBSOLETE {
// OBSOLETE /*regaddr = register_addr (regno, offset); */
// OBSOLETE /* 88k enhancement */
// OBSOLETE
// OBSOLETE for (i = 0; i < REGISTER_RAW_SIZE (regno); i += sizeof (int))
// OBSOLETE {
// OBSOLETE *(int *) &buf[i] = ptrace (3, PIDGET (inferior_ptid),
// OBSOLETE (PTRACE_ARG3_TYPE) regaddr, 0);
// OBSOLETE regaddr += sizeof (int);
// OBSOLETE }
// OBSOLETE supply_register (regno, buf);
// OBSOLETE }
// OBSOLETE /* now load up registers 36 - 38; special pc registers */
// OBSOLETE *(int *) &buf[0] = ptrace (3, PIDGET (inferior_ptid),
// OBSOLETE (PTRACE_ARG3_TYPE) SXIP_OFFSET, 0);
// OBSOLETE supply_register (SXIP_REGNUM, buf);
// OBSOLETE *(int *) &buf[0] = ptrace (3, PIDGET (inferior_ptid),
// OBSOLETE (PTRACE_ARG3_TYPE) SNIP_OFFSET, 0);
// OBSOLETE supply_register (SNIP_REGNUM, buf);
// OBSOLETE *(int *) &buf[0] = ptrace (3, PIDGET (inferior_ptid),
// OBSOLETE (PTRACE_ARG3_TYPE) SFIP_OFFSET, 0);
// OBSOLETE supply_register (SFIP_REGNUM, buf);
// OBSOLETE }
// OBSOLETE
// OBSOLETE /* Store our register values back into the inferior.
// OBSOLETE If REGNO is -1, do this for all registers.
// OBSOLETE Otherwise, REGNO specifies which register (so we can save time). */
// OBSOLETE
// OBSOLETE void
// OBSOLETE store_inferior_registers (int regno)
// OBSOLETE {
// OBSOLETE register unsigned int regaddr;
// OBSOLETE char buf[80];
// OBSOLETE
// OBSOLETE struct USER u;
// OBSOLETE
// OBSOLETE unsigned int offset = (char *) &u.pt_r0 - (char *) &u;
// OBSOLETE
// OBSOLETE regaddr = offset;
// OBSOLETE
// OBSOLETE /* Don't try to deal with EXIP_REGNUM or ENIP_REGNUM, because I think either
// OBSOLETE svr3 doesn't run on an 88110, or the kernel isolates the different (not
// OBSOLETE completely sure this is true, but seems to be. */
// OBSOLETE if (regno >= 0)
// OBSOLETE {
// OBSOLETE /* regaddr = register_addr (regno, offset); */
// OBSOLETE if (regno < PC_REGNUM)
// OBSOLETE {
// OBSOLETE regaddr = offset + regno * sizeof (int);
// OBSOLETE errno = 0;
// OBSOLETE ptrace (6, PIDGET (inferior_ptid),
// OBSOLETE (PTRACE_ARG3_TYPE) regaddr, read_register (regno));
// OBSOLETE if (errno != 0)
// OBSOLETE {
// OBSOLETE sprintf (buf, "writing register number %d", regno);
// OBSOLETE perror_with_name (buf);
// OBSOLETE }
// OBSOLETE }
// OBSOLETE else if (regno == SXIP_REGNUM)
// OBSOLETE ptrace (6, PIDGET (inferior_ptid),
// OBSOLETE (PTRACE_ARG3_TYPE) SXIP_OFFSET, read_register (regno));
// OBSOLETE else if (regno == SNIP_REGNUM)
// OBSOLETE ptrace (6, PIDGET (inferior_ptid),
// OBSOLETE (PTRACE_ARG3_TYPE) SNIP_OFFSET, read_register (regno));
// OBSOLETE else if (regno == SFIP_REGNUM)
// OBSOLETE ptrace (6, PIDGET (inferior_ptid),
// OBSOLETE (PTRACE_ARG3_TYPE) SFIP_OFFSET, read_register (regno));
// OBSOLETE else
// OBSOLETE printf_unfiltered ("Bad register number for store_inferior routine\n");
// OBSOLETE }
// OBSOLETE else
// OBSOLETE {
// OBSOLETE for (regno = 0; regno < PC_REGNUM; regno++)
// OBSOLETE {
// OBSOLETE /* regaddr = register_addr (regno, offset); */
// OBSOLETE errno = 0;
// OBSOLETE regaddr = offset + regno * sizeof (int);
// OBSOLETE ptrace (6, PIDGET (inferior_ptid),
// OBSOLETE (PTRACE_ARG3_TYPE) regaddr, read_register (regno));
// OBSOLETE if (errno != 0)
// OBSOLETE {
// OBSOLETE sprintf (buf, "writing register number %d", regno);
// OBSOLETE perror_with_name (buf);
// OBSOLETE }
// OBSOLETE }
// OBSOLETE ptrace (6, PIDGET (inferior_ptid),
// OBSOLETE (PTRACE_ARG3_TYPE) SXIP_OFFSET, read_register (SXIP_REGNUM));
// OBSOLETE ptrace (6, PIDGET (inferior_ptid),
// OBSOLETE (PTRACE_ARG3_TYPE) SNIP_OFFSET, read_register (SNIP_REGNUM));
// OBSOLETE ptrace (6, PIDGET (inferior_ptid),
// OBSOLETE (PTRACE_ARG3_TYPE) SFIP_OFFSET, read_register (SFIP_REGNUM));
// OBSOLETE }
// OBSOLETE }
// OBSOLETE
// OBSOLETE
// OBSOLETE /* blockend is the address of the end of the user structure */
// OBSOLETE m88k_register_u_addr (int blockend, int regnum)
// OBSOLETE {
// OBSOLETE struct USER u;
// OBSOLETE int ustart = blockend - sizeof (struct USER);
// OBSOLETE switch (regnum)
// OBSOLETE {
// OBSOLETE case 0:
// OBSOLETE case 1:
// OBSOLETE case 2:
// OBSOLETE case 3:
// OBSOLETE case 4:
// OBSOLETE case 5:
// OBSOLETE case 6:
// OBSOLETE case 7:
// OBSOLETE case 8:
// OBSOLETE case 9:
// OBSOLETE case 10:
// OBSOLETE case 11:
// OBSOLETE case 12:
// OBSOLETE case 13:
// OBSOLETE case 14:
// OBSOLETE case 15:
// OBSOLETE case 16:
// OBSOLETE case 17:
// OBSOLETE case 18:
// OBSOLETE case 19:
// OBSOLETE case 20:
// OBSOLETE case 21:
// OBSOLETE case 22:
// OBSOLETE case 23:
// OBSOLETE case 24:
// OBSOLETE case 25:
// OBSOLETE case 26:
// OBSOLETE case 27:
// OBSOLETE case 28:
// OBSOLETE case 29:
// OBSOLETE case 30:
// OBSOLETE case 31:
// OBSOLETE return (ustart + ((int) &u.pt_r0 - (int) &u) + REGISTER_SIZE * regnum);
// OBSOLETE case PSR_REGNUM:
// OBSOLETE return (ustart + ((int) &u.pt_psr - (int) &u));
// OBSOLETE case FPSR_REGNUM:
// OBSOLETE return (ustart + ((int) &u.pt_fpsr - (int) &u));
// OBSOLETE case FPCR_REGNUM:
// OBSOLETE return (ustart + ((int) &u.pt_fpcr - (int) &u));
// OBSOLETE case SXIP_REGNUM:
// OBSOLETE return (ustart + SXIP_OFFSET);
// OBSOLETE case SNIP_REGNUM:
// OBSOLETE return (ustart + SNIP_OFFSET);
// OBSOLETE case SFIP_REGNUM:
// OBSOLETE return (ustart + SFIP_OFFSET);
// OBSOLETE default:
// OBSOLETE if (regnum < NUM_REGS)
// OBSOLETE /* The register is one of those which is not defined...
// OBSOLETE give it zero */
// OBSOLETE return (ustart + ((int) &u.pt_r0 - (int) &u));
// OBSOLETE else
// OBSOLETE return (blockend + REGISTER_SIZE * regnum);
// OBSOLETE }
// OBSOLETE }
// OBSOLETE
// OBSOLETE #ifdef USE_PROC_FS
// OBSOLETE
// OBSOLETE #include <sys/procfs.h>
// OBSOLETE
// OBSOLETE /* Prototypes for supply_gregset etc. */
// OBSOLETE #include "gregset.h"
// OBSOLETE
// OBSOLETE /* Given a pointer to a general register set in /proc format (gregset_t *),
// OBSOLETE unpack the register contents and supply them as gdb's idea of the current
// OBSOLETE register values. */
// OBSOLETE
// OBSOLETE void
// OBSOLETE supply_gregset (gregset_t *gregsetp)
// OBSOLETE {
// OBSOLETE register int regi;
// OBSOLETE register greg_t *regp = (greg_t *) gregsetp;
// OBSOLETE
// OBSOLETE for (regi = 0; regi <= SP_REGNUM; regi++)
// OBSOLETE supply_register (regi, (char *) (regp + regi));
// OBSOLETE
// OBSOLETE supply_register (SXIP_REGNUM, (char *) (regp + R_XIP));
// OBSOLETE supply_register (SNIP_REGNUM, (char *) (regp + R_NIP));
// OBSOLETE supply_register (SFIP_REGNUM, (char *) (regp + R_FIP));
// OBSOLETE supply_register (PSR_REGNUM, (char *) (regp + R_PSR));
// OBSOLETE supply_register (FPSR_REGNUM, (char *) (regp + R_FPSR));
// OBSOLETE supply_register (FPCR_REGNUM, (char *) (regp + R_FPCR));
// OBSOLETE }
// OBSOLETE
// OBSOLETE void
// OBSOLETE fill_gregset (gregset_t *gregsetp, int regno)
// OBSOLETE {
// OBSOLETE int regi;
// OBSOLETE register greg_t *regp = (greg_t *) gregsetp;
// OBSOLETE
// OBSOLETE for (regi = 0; regi <= R_R31; regi++)
// OBSOLETE if ((regno == -1) || (regno == regi))
// OBSOLETE *(regp + regi) = *(int *) &registers[REGISTER_BYTE (regi)];
// OBSOLETE
// OBSOLETE if ((regno == -1) || (regno == SXIP_REGNUM))
// OBSOLETE *(regp + R_XIP) = *(int *) &registers[REGISTER_BYTE (SXIP_REGNUM)];
// OBSOLETE if ((regno == -1) || (regno == SNIP_REGNUM))
// OBSOLETE *(regp + R_NIP) = *(int *) &registers[REGISTER_BYTE (SNIP_REGNUM)];
// OBSOLETE if ((regno == -1) || (regno == SFIP_REGNUM))
// OBSOLETE *(regp + R_FIP) = *(int *) &registers[REGISTER_BYTE (SFIP_REGNUM)];
// OBSOLETE if ((regno == -1) || (regno == PSR_REGNUM))
// OBSOLETE *(regp + R_PSR) = *(int *) &registers[REGISTER_BYTE (PSR_REGNUM)];
// OBSOLETE if ((regno == -1) || (regno == FPSR_REGNUM))
// OBSOLETE *(regp + R_FPSR) = *(int *) &registers[REGISTER_BYTE (FPSR_REGNUM)];
// OBSOLETE if ((regno == -1) || (regno == FPCR_REGNUM))
// OBSOLETE *(regp + R_FPCR) = *(int *) &registers[REGISTER_BYTE (FPCR_REGNUM)];
// OBSOLETE }
// OBSOLETE
// OBSOLETE #endif /* USE_PROC_FS */

View file

@ -1,661 +0,0 @@
// OBSOLETE /* Target-machine dependent code for Motorola 88000 series, for GDB.
// OBSOLETE
// OBSOLETE Copyright 1988, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998,
// OBSOLETE 2000, 2001, 2002 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 "defs.h"
// OBSOLETE #include "frame.h"
// OBSOLETE #include "inferior.h"
// OBSOLETE #include "value.h"
// OBSOLETE #include "gdbcore.h"
// OBSOLETE #include "symtab.h"
// OBSOLETE #include "setjmp.h"
// OBSOLETE #include "value.h"
// OBSOLETE #include "regcache.h"
// OBSOLETE
// OBSOLETE /* Size of an instruction */
// OBSOLETE #define BYTES_PER_88K_INSN 4
// OBSOLETE
// OBSOLETE void frame_find_saved_regs ();
// OBSOLETE
// OBSOLETE /* Is this target an m88110? Otherwise assume m88100. This has
// OBSOLETE relevance for the ways in which we screw with instruction pointers. */
// OBSOLETE
// OBSOLETE int target_is_m88110 = 0;
// OBSOLETE
// OBSOLETE void
// OBSOLETE m88k_target_write_pc (CORE_ADDR pc, ptid_t ptid)
// OBSOLETE {
// OBSOLETE /* According to the MC88100 RISC Microprocessor User's Manual,
// OBSOLETE section 6.4.3.1.2:
// OBSOLETE
// OBSOLETE ... can be made to return to a particular instruction by placing
// OBSOLETE a valid instruction address in the SNIP and the next sequential
// OBSOLETE instruction address in the SFIP (with V bits set and E bits
// OBSOLETE clear). The rte resumes execution at the instruction pointed to
// OBSOLETE by the SNIP, then the SFIP.
// OBSOLETE
// OBSOLETE The E bit is the least significant bit (bit 0). The V (valid)
// OBSOLETE bit is bit 1. This is why we logical or 2 into the values we are
// OBSOLETE writing below. It turns out that SXIP plays no role when
// OBSOLETE returning from an exception so nothing special has to be done
// OBSOLETE with it. We could even (presumably) give it a totally bogus
// OBSOLETE value.
// OBSOLETE
// OBSOLETE -- Kevin Buettner */
// OBSOLETE
// OBSOLETE write_register_pid (SXIP_REGNUM, pc, ptid);
// OBSOLETE write_register_pid (SNIP_REGNUM, (pc | 2), ptid);
// OBSOLETE write_register_pid (SFIP_REGNUM, (pc | 2) + 4, ptid);
// OBSOLETE }
// OBSOLETE
// OBSOLETE /* The type of a register. */
// OBSOLETE struct type *
// OBSOLETE m88k_register_type (int regnum)
// OBSOLETE {
// OBSOLETE if (regnum >= XFP_REGNUM)
// OBSOLETE return builtin_type_m88110_ext;
// OBSOLETE else if (regnum == PC_REGNUM || regnum == FP_REGNUM || regnum == SP_REGNUM)
// OBSOLETE return builtin_type_void_func_ptr;
// OBSOLETE else
// OBSOLETE return builtin_type_int32;
// OBSOLETE }
// OBSOLETE
// OBSOLETE
// OBSOLETE /* The m88k kernel aligns all instructions on 4-byte boundaries. The
// OBSOLETE kernel also uses the least significant two bits for its own hocus
// OBSOLETE pocus. When gdb receives an address from the kernel, it needs to
// OBSOLETE preserve those right-most two bits, but gdb also needs to be careful
// OBSOLETE to realize that those two bits are not really a part of the address
// OBSOLETE of an instruction. Shrug. */
// OBSOLETE
// OBSOLETE CORE_ADDR
// OBSOLETE m88k_addr_bits_remove (CORE_ADDR addr)
// OBSOLETE {
// OBSOLETE return ((addr) & ~3);
// OBSOLETE }
// OBSOLETE
// OBSOLETE
// OBSOLETE /* Given a GDB frame, determine the address of the calling function's frame.
// OBSOLETE This will be used to create a new GDB frame struct, and then
// OBSOLETE INIT_EXTRA_FRAME_INFO and INIT_FRAME_PC will be called for the new frame.
// OBSOLETE
// OBSOLETE For us, the frame address is its stack pointer value, so we look up
// OBSOLETE the function prologue to determine the caller's sp value, and return it. */
// OBSOLETE
// OBSOLETE CORE_ADDR
// OBSOLETE frame_chain (struct frame_info *thisframe)
// OBSOLETE {
// OBSOLETE
// OBSOLETE frame_find_saved_regs (thisframe, (struct frame_saved_regs *) 0);
// OBSOLETE /* NOTE: this depends on frame_find_saved_regs returning the VALUE, not
// OBSOLETE the ADDRESS, of SP_REGNUM. It also depends on the cache of
// OBSOLETE frame_find_saved_regs results. */
// OBSOLETE if (thisframe->fsr->regs[SP_REGNUM])
// OBSOLETE return thisframe->fsr->regs[SP_REGNUM];
// OBSOLETE else
// OBSOLETE return thisframe->frame; /* Leaf fn -- next frame up has same SP. */
// OBSOLETE }
// OBSOLETE
// OBSOLETE int
// OBSOLETE frameless_function_invocation (struct frame_info *frame)
// OBSOLETE {
// OBSOLETE
// OBSOLETE frame_find_saved_regs (frame, (struct frame_saved_regs *) 0);
// OBSOLETE /* NOTE: this depends on frame_find_saved_regs returning the VALUE, not
// OBSOLETE the ADDRESS, of SP_REGNUM. It also depends on the cache of
// OBSOLETE frame_find_saved_regs results. */
// OBSOLETE if (frame->fsr->regs[SP_REGNUM])
// OBSOLETE return 0; /* Frameful -- return addr saved somewhere */
// OBSOLETE else
// OBSOLETE return 1; /* Frameless -- no saved return address */
// OBSOLETE }
// OBSOLETE
// OBSOLETE void
// OBSOLETE init_extra_frame_info (int fromleaf, struct frame_info *frame)
// OBSOLETE {
// OBSOLETE frame->fsr = 0; /* Not yet allocated */
// OBSOLETE frame->args_pointer = 0; /* Unknown */
// OBSOLETE frame->locals_pointer = 0; /* Unknown */
// OBSOLETE }
// OBSOLETE
// OBSOLETE /* Examine an m88k function prologue, recording the addresses at which
// OBSOLETE registers are saved explicitly by the prologue code, and returning
// OBSOLETE the address of the first instruction after the prologue (but not
// OBSOLETE after the instruction at address LIMIT, as explained below).
// OBSOLETE
// OBSOLETE LIMIT places an upper bound on addresses of the instructions to be
// OBSOLETE examined. If the prologue code scan reaches LIMIT, the scan is
// OBSOLETE aborted and LIMIT is returned. This is used, when examining the
// OBSOLETE prologue for the current frame, to keep examine_prologue () from
// OBSOLETE claiming that a given register has been saved when in fact the
// OBSOLETE instruction that saves it has not yet been executed. LIMIT is used
// OBSOLETE at other times to stop the scan when we hit code after the true
// OBSOLETE function prologue (e.g. for the first source line) which might
// OBSOLETE otherwise be mistaken for function prologue.
// OBSOLETE
// OBSOLETE The format of the function prologue matched by this routine is
// OBSOLETE derived from examination of the source to gcc 1.95, particularly
// OBSOLETE the routine output_prologue () in config/out-m88k.c.
// OBSOLETE
// OBSOLETE subu r31,r31,n # stack pointer update
// OBSOLETE
// OBSOLETE (st rn,r31,offset)? # save incoming regs
// OBSOLETE (st.d rn,r31,offset)?
// OBSOLETE
// OBSOLETE (addu r30,r31,n)? # frame pointer update
// OBSOLETE
// OBSOLETE (pic sequence)? # PIC code prologue
// OBSOLETE
// OBSOLETE (or rn,rm,0)? # Move parameters to other regs
// OBSOLETE */
// OBSOLETE
// OBSOLETE /* Macros for extracting fields from instructions. */
// OBSOLETE
// OBSOLETE #define BITMASK(pos, width) (((0x1 << (width)) - 1) << (pos))
// OBSOLETE #define EXTRACT_FIELD(val, pos, width) ((val) >> (pos) & BITMASK (0, width))
// OBSOLETE #define SUBU_OFFSET(x) ((unsigned)(x & 0xFFFF))
// OBSOLETE #define ST_OFFSET(x) ((unsigned)((x) & 0xFFFF))
// OBSOLETE #define ST_SRC(x) EXTRACT_FIELD ((x), 21, 5)
// OBSOLETE #define ADDU_OFFSET(x) ((unsigned)(x & 0xFFFF))
// OBSOLETE
// OBSOLETE /*
// OBSOLETE * prologue_insn_tbl is a table of instructions which may comprise a
// OBSOLETE * function prologue. Associated with each table entry (corresponding
// OBSOLETE * to a single instruction or group of instructions), is an action.
// OBSOLETE * This action is used by examine_prologue (below) to determine
// OBSOLETE * the state of certain machine registers and where the stack frame lives.
// OBSOLETE */
// OBSOLETE
// OBSOLETE enum prologue_insn_action
// OBSOLETE {
// OBSOLETE PIA_SKIP, /* don't care what the instruction does */
// OBSOLETE PIA_NOTE_ST, /* note register stored and where */
// OBSOLETE PIA_NOTE_STD, /* note pair of registers stored and where */
// OBSOLETE PIA_NOTE_SP_ADJUSTMENT, /* note stack pointer adjustment */
// OBSOLETE PIA_NOTE_FP_ASSIGNMENT, /* note frame pointer assignment */
// OBSOLETE PIA_NOTE_PROLOGUE_END, /* no more prologue */
// OBSOLETE };
// OBSOLETE
// OBSOLETE struct prologue_insns
// OBSOLETE {
// OBSOLETE unsigned long insn;
// OBSOLETE unsigned long mask;
// OBSOLETE enum prologue_insn_action action;
// OBSOLETE };
// OBSOLETE
// OBSOLETE struct prologue_insns prologue_insn_tbl[] =
// OBSOLETE {
// OBSOLETE /* Various register move instructions */
// OBSOLETE {0x58000000, 0xf800ffff, PIA_SKIP}, /* or/or.u with immed of 0 */
// OBSOLETE {0xf4005800, 0xfc1fffe0, PIA_SKIP}, /* or rd, r0, rs */
// OBSOLETE {0xf4005800, 0xfc00ffff, PIA_SKIP}, /* or rd, rs, r0 */
// OBSOLETE
// OBSOLETE /* Stack pointer setup: "subu sp, sp, n" where n is a multiple of 8 */
// OBSOLETE {0x67ff0000, 0xffff0007, PIA_NOTE_SP_ADJUSTMENT},
// OBSOLETE
// OBSOLETE /* Frame pointer assignment: "addu r30, r31, n" */
// OBSOLETE {0x63df0000, 0xffff0000, PIA_NOTE_FP_ASSIGNMENT},
// OBSOLETE
// OBSOLETE /* Store to stack instructions; either "st rx, sp, n" or "st.d rx, sp, n" */
// OBSOLETE {0x241f0000, 0xfc1f0000, PIA_NOTE_ST}, /* st rx, sp, n */
// OBSOLETE {0x201f0000, 0xfc1f0000, PIA_NOTE_STD}, /* st.d rs, sp, n */
// OBSOLETE
// OBSOLETE /* Instructions needed for setting up r25 for pic code. */
// OBSOLETE {0x5f200000, 0xffff0000, PIA_SKIP}, /* or.u r25, r0, offset_high */
// OBSOLETE {0xcc000002, 0xffffffff, PIA_SKIP}, /* bsr.n Lab */
// OBSOLETE {0x5b390000, 0xffff0000, PIA_SKIP}, /* or r25, r25, offset_low */
// OBSOLETE {0xf7396001, 0xffffffff, PIA_SKIP}, /* Lab: addu r25, r25, r1 */
// OBSOLETE
// OBSOLETE /* Various branch or jump instructions which have a delay slot -- these
// OBSOLETE do not form part of the prologue, but the instruction in the delay
// OBSOLETE slot might be a store instruction which should be noted. */
// OBSOLETE {0xc4000000, 0xe4000000, PIA_NOTE_PROLOGUE_END},
// OBSOLETE /* br.n, bsr.n, bb0.n, or bb1.n */
// OBSOLETE {0xec000000, 0xfc000000, PIA_NOTE_PROLOGUE_END}, /* bcnd.n */
// OBSOLETE {0xf400c400, 0xfffff7e0, PIA_NOTE_PROLOGUE_END} /* jmp.n or jsr.n */
// OBSOLETE
// OBSOLETE };
// OBSOLETE
// OBSOLETE
// OBSOLETE /* Fetch the instruction at ADDR, returning 0 if ADDR is beyond LIM or
// OBSOLETE is not the address of a valid instruction, the address of the next
// OBSOLETE instruction beyond ADDR otherwise. *PWORD1 receives the first word
// OBSOLETE of the instruction. */
// OBSOLETE
// OBSOLETE #define NEXT_PROLOGUE_INSN(addr, lim, pword1) \
// OBSOLETE (((addr) < (lim)) ? next_insn (addr, pword1) : 0)
// OBSOLETE
// OBSOLETE /* Read the m88k instruction at 'memaddr' and return the address of
// OBSOLETE the next instruction after that, or 0 if 'memaddr' is not the
// OBSOLETE address of a valid instruction. The instruction
// OBSOLETE is stored at 'pword1'. */
// OBSOLETE
// OBSOLETE CORE_ADDR
// OBSOLETE next_insn (CORE_ADDR memaddr, unsigned long *pword1)
// OBSOLETE {
// OBSOLETE *pword1 = read_memory_integer (memaddr, BYTES_PER_88K_INSN);
// OBSOLETE return memaddr + BYTES_PER_88K_INSN;
// OBSOLETE }
// OBSOLETE
// OBSOLETE /* Read a register from frames called by us (or from the hardware regs). */
// OBSOLETE
// OBSOLETE static int
// OBSOLETE read_next_frame_reg (struct frame_info *frame, int regno)
// OBSOLETE {
// OBSOLETE for (; frame; frame = frame->next)
// OBSOLETE {
// OBSOLETE if (regno == SP_REGNUM)
// OBSOLETE return FRAME_FP (frame);
// OBSOLETE else if (frame->fsr->regs[regno])
// OBSOLETE return read_memory_integer (frame->fsr->regs[regno], 4);
// OBSOLETE }
// OBSOLETE return read_register (regno);
// OBSOLETE }
// OBSOLETE
// OBSOLETE /* Examine the prologue of a function. `ip' points to the first instruction.
// OBSOLETE `limit' is the limit of the prologue (e.g. the addr of the first
// OBSOLETE linenumber, or perhaps the program counter if we're stepping through).
// OBSOLETE `frame_sp' is the stack pointer value in use in this frame.
// OBSOLETE `fsr' is a pointer to a frame_saved_regs structure into which we put
// OBSOLETE info about the registers saved by this frame.
// OBSOLETE `fi' is a struct frame_info pointer; we fill in various fields in it
// OBSOLETE to reflect the offsets of the arg pointer and the locals pointer. */
// OBSOLETE
// OBSOLETE static CORE_ADDR
// OBSOLETE examine_prologue (register CORE_ADDR ip, register CORE_ADDR limit,
// OBSOLETE CORE_ADDR frame_sp, struct frame_saved_regs *fsr,
// OBSOLETE struct frame_info *fi)
// OBSOLETE {
// OBSOLETE register CORE_ADDR next_ip;
// OBSOLETE register int src;
// OBSOLETE unsigned long insn;
// OBSOLETE int size, offset;
// OBSOLETE char must_adjust[32]; /* If set, must adjust offsets in fsr */
// OBSOLETE int sp_offset = -1; /* -1 means not set (valid must be mult of 8) */
// OBSOLETE int fp_offset = -1; /* -1 means not set */
// OBSOLETE CORE_ADDR frame_fp;
// OBSOLETE CORE_ADDR prologue_end = 0;
// OBSOLETE
// OBSOLETE memset (must_adjust, '\0', sizeof (must_adjust));
// OBSOLETE next_ip = NEXT_PROLOGUE_INSN (ip, limit, &insn);
// OBSOLETE
// OBSOLETE while (next_ip)
// OBSOLETE {
// OBSOLETE struct prologue_insns *pip;
// OBSOLETE
// OBSOLETE for (pip = prologue_insn_tbl; (insn & pip->mask) != pip->insn;)
// OBSOLETE if (++pip >= prologue_insn_tbl + sizeof prologue_insn_tbl)
// OBSOLETE goto end_of_prologue_found; /* not a prologue insn */
// OBSOLETE
// OBSOLETE switch (pip->action)
// OBSOLETE {
// OBSOLETE case PIA_NOTE_ST:
// OBSOLETE case PIA_NOTE_STD:
// OBSOLETE if (sp_offset != -1)
// OBSOLETE {
// OBSOLETE src = ST_SRC (insn);
// OBSOLETE offset = ST_OFFSET (insn);
// OBSOLETE must_adjust[src] = 1;
// OBSOLETE fsr->regs[src++] = offset; /* Will be adjusted later */
// OBSOLETE if (pip->action == PIA_NOTE_STD && src < 32)
// OBSOLETE {
// OBSOLETE offset += 4;
// OBSOLETE must_adjust[src] = 1;
// OBSOLETE fsr->regs[src++] = offset;
// OBSOLETE }
// OBSOLETE }
// OBSOLETE else
// OBSOLETE goto end_of_prologue_found;
// OBSOLETE break;
// OBSOLETE case PIA_NOTE_SP_ADJUSTMENT:
// OBSOLETE if (sp_offset == -1)
// OBSOLETE sp_offset = -SUBU_OFFSET (insn);
// OBSOLETE else
// OBSOLETE goto end_of_prologue_found;
// OBSOLETE break;
// OBSOLETE case PIA_NOTE_FP_ASSIGNMENT:
// OBSOLETE if (fp_offset == -1)
// OBSOLETE fp_offset = ADDU_OFFSET (insn);
// OBSOLETE else
// OBSOLETE goto end_of_prologue_found;
// OBSOLETE break;
// OBSOLETE case PIA_NOTE_PROLOGUE_END:
// OBSOLETE if (!prologue_end)
// OBSOLETE prologue_end = ip;
// OBSOLETE break;
// OBSOLETE case PIA_SKIP:
// OBSOLETE default:
// OBSOLETE /* Do nothing */
// OBSOLETE break;
// OBSOLETE }
// OBSOLETE
// OBSOLETE ip = next_ip;
// OBSOLETE next_ip = NEXT_PROLOGUE_INSN (ip, limit, &insn);
// OBSOLETE }
// OBSOLETE
// OBSOLETE end_of_prologue_found:
// OBSOLETE
// OBSOLETE if (prologue_end)
// OBSOLETE ip = prologue_end;
// OBSOLETE
// OBSOLETE /* We're done with the prologue. If we don't care about the stack
// OBSOLETE frame itself, just return. (Note that fsr->regs has been trashed,
// OBSOLETE but the one caller who calls with fi==0 passes a dummy there.) */
// OBSOLETE
// OBSOLETE if (fi == 0)
// OBSOLETE return ip;
// OBSOLETE
// OBSOLETE /*
// OBSOLETE OK, now we have:
// OBSOLETE
// OBSOLETE sp_offset original (before any alloca calls) displacement of SP
// OBSOLETE (will be negative).
// OBSOLETE
// OBSOLETE fp_offset displacement from original SP to the FP for this frame
// OBSOLETE or -1.
// OBSOLETE
// OBSOLETE fsr->regs[0..31] displacement from original SP to the stack
// OBSOLETE location where reg[0..31] is stored.
// OBSOLETE
// OBSOLETE must_adjust[0..31] set if corresponding offset was set.
// OBSOLETE
// OBSOLETE If alloca has been called between the function prologue and the current
// OBSOLETE IP, then the current SP (frame_sp) will not be the original SP as set by
// OBSOLETE the function prologue. If the current SP is not the original SP, then the
// OBSOLETE compiler will have allocated an FP for this frame, fp_offset will be set,
// OBSOLETE and we can use it to calculate the original SP.
// OBSOLETE
// OBSOLETE Then, we figure out where the arguments and locals are, and relocate the
// OBSOLETE offsets in fsr->regs to absolute addresses. */
// OBSOLETE
// OBSOLETE if (fp_offset != -1)
// OBSOLETE {
// OBSOLETE /* We have a frame pointer, so get it, and base our calc's on it. */
// OBSOLETE frame_fp = (CORE_ADDR) read_next_frame_reg (fi->next, ACTUAL_FP_REGNUM);
// OBSOLETE frame_sp = frame_fp - fp_offset;
// OBSOLETE }
// OBSOLETE else
// OBSOLETE {
// OBSOLETE /* We have no frame pointer, therefore frame_sp is still the same value
// OBSOLETE as set by prologue. But where is the frame itself? */
// OBSOLETE if (must_adjust[SRP_REGNUM])
// OBSOLETE {
// OBSOLETE /* Function header saved SRP (r1), the return address. Frame starts
// OBSOLETE 4 bytes down from where it was saved. */
// OBSOLETE frame_fp = frame_sp + fsr->regs[SRP_REGNUM] - 4;
// OBSOLETE fi->locals_pointer = frame_fp;
// OBSOLETE }
// OBSOLETE else
// OBSOLETE {
// OBSOLETE /* Function header didn't save SRP (r1), so we are in a leaf fn or
// OBSOLETE are otherwise confused. */
// OBSOLETE frame_fp = -1;
// OBSOLETE }
// OBSOLETE }
// OBSOLETE
// OBSOLETE /* The locals are relative to the FP (whether it exists as an allocated
// OBSOLETE register, or just as an assumed offset from the SP) */
// OBSOLETE fi->locals_pointer = frame_fp;
// OBSOLETE
// OBSOLETE /* The arguments are just above the SP as it was before we adjusted it
// OBSOLETE on entry. */
// OBSOLETE fi->args_pointer = frame_sp - sp_offset;
// OBSOLETE
// OBSOLETE /* Now that we know the SP value used by the prologue, we know where
// OBSOLETE it saved all the registers. */
// OBSOLETE for (src = 0; src < 32; src++)
// OBSOLETE if (must_adjust[src])
// OBSOLETE fsr->regs[src] += frame_sp;
// OBSOLETE
// OBSOLETE /* The saved value of the SP is always known. */
// OBSOLETE /* (we hope...) */
// OBSOLETE if (fsr->regs[SP_REGNUM] != 0
// OBSOLETE && fsr->regs[SP_REGNUM] != frame_sp - sp_offset)
// OBSOLETE fprintf_unfiltered (gdb_stderr, "Bad saved SP value %lx != %lx, offset %x!\n",
// OBSOLETE fsr->regs[SP_REGNUM],
// OBSOLETE frame_sp - sp_offset, sp_offset);
// OBSOLETE
// OBSOLETE fsr->regs[SP_REGNUM] = frame_sp - sp_offset;
// OBSOLETE
// OBSOLETE return (ip);
// OBSOLETE }
// OBSOLETE
// OBSOLETE /* Given an ip value corresponding to the start of a function,
// OBSOLETE return the ip of the first instruction after the function
// OBSOLETE prologue. */
// OBSOLETE
// OBSOLETE CORE_ADDR
// OBSOLETE m88k_skip_prologue (CORE_ADDR ip)
// OBSOLETE {
// OBSOLETE struct frame_saved_regs saved_regs_dummy;
// OBSOLETE struct symtab_and_line sal;
// OBSOLETE CORE_ADDR limit;
// OBSOLETE
// OBSOLETE sal = find_pc_line (ip, 0);
// OBSOLETE limit = (sal.end) ? sal.end : 0xffffffff;
// OBSOLETE
// OBSOLETE return (examine_prologue (ip, limit, (CORE_ADDR) 0, &saved_regs_dummy,
// OBSOLETE (struct frame_info *) 0));
// OBSOLETE }
// 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 We cache the result of doing this in the frame_obstack, since it is
// OBSOLETE fairly expensive. */
// OBSOLETE
// OBSOLETE void
// OBSOLETE frame_find_saved_regs (struct frame_info *fi, struct frame_saved_regs *fsr)
// OBSOLETE {
// OBSOLETE register struct frame_saved_regs *cache_fsr;
// OBSOLETE CORE_ADDR ip;
// OBSOLETE struct symtab_and_line sal;
// OBSOLETE CORE_ADDR limit;
// OBSOLETE
// OBSOLETE if (!fi->fsr)
// OBSOLETE {
// OBSOLETE cache_fsr = (struct frame_saved_regs *)
// OBSOLETE frame_obstack_alloc (sizeof (struct frame_saved_regs));
// OBSOLETE memset (cache_fsr, '\0', sizeof (struct frame_saved_regs));
// OBSOLETE fi->fsr = cache_fsr;
// OBSOLETE
// OBSOLETE /* Find the start and end of the function prologue. If the PC
// OBSOLETE is in the function prologue, we only consider the part that
// OBSOLETE has executed already. In the case where the PC is not in
// OBSOLETE the function prologue, we set limit to two instructions beyond
// OBSOLETE where the prologue ends in case if any of the prologue instructions
// OBSOLETE were moved into a delay slot of a branch instruction. */
// OBSOLETE
// OBSOLETE ip = get_pc_function_start (fi->pc);
// OBSOLETE sal = find_pc_line (ip, 0);
// OBSOLETE limit = (sal.end && sal.end < fi->pc) ? sal.end + 2 * BYTES_PER_88K_INSN
// OBSOLETE : fi->pc;
// OBSOLETE
// OBSOLETE /* This will fill in fields in *fi as well as in cache_fsr. */
// OBSOLETE #ifdef SIGTRAMP_FRAME_FIXUP
// OBSOLETE if (fi->signal_handler_caller)
// OBSOLETE SIGTRAMP_FRAME_FIXUP (fi->frame);
// OBSOLETE #endif
// OBSOLETE examine_prologue (ip, limit, fi->frame, cache_fsr, fi);
// OBSOLETE #ifdef SIGTRAMP_SP_FIXUP
// OBSOLETE if (fi->signal_handler_caller && fi->fsr->regs[SP_REGNUM])
// OBSOLETE SIGTRAMP_SP_FIXUP (fi->fsr->regs[SP_REGNUM]);
// OBSOLETE #endif
// OBSOLETE }
// OBSOLETE
// OBSOLETE if (fsr)
// OBSOLETE *fsr = *fi->fsr;
// OBSOLETE }
// OBSOLETE
// OBSOLETE /* Return the address of the locals block for the frame
// OBSOLETE described by FI. Returns 0 if the address is unknown.
// OBSOLETE NOTE! Frame locals are referred to by negative offsets from the
// OBSOLETE argument pointer, so this is the same as frame_args_address(). */
// OBSOLETE
// OBSOLETE CORE_ADDR
// OBSOLETE frame_locals_address (struct frame_info *fi)
// OBSOLETE {
// OBSOLETE struct frame_saved_regs fsr;
// OBSOLETE
// OBSOLETE if (fi->args_pointer) /* Cached value is likely there. */
// OBSOLETE return fi->args_pointer;
// OBSOLETE
// OBSOLETE /* Nope, generate it. */
// OBSOLETE
// OBSOLETE get_frame_saved_regs (fi, &fsr);
// OBSOLETE
// OBSOLETE return fi->args_pointer;
// OBSOLETE }
// OBSOLETE
// OBSOLETE /* Return the address of the argument block for the frame
// OBSOLETE described by FI. Returns 0 if the address is unknown. */
// OBSOLETE
// OBSOLETE CORE_ADDR
// OBSOLETE frame_args_address (struct frame_info *fi)
// OBSOLETE {
// OBSOLETE struct frame_saved_regs fsr;
// OBSOLETE
// OBSOLETE if (fi->args_pointer) /* Cached value is likely there. */
// OBSOLETE return fi->args_pointer;
// OBSOLETE
// OBSOLETE /* Nope, generate it. */
// OBSOLETE
// OBSOLETE get_frame_saved_regs (fi, &fsr);
// OBSOLETE
// OBSOLETE return fi->args_pointer;
// OBSOLETE }
// OBSOLETE
// OBSOLETE /* Return the saved PC from this frame.
// OBSOLETE
// OBSOLETE If the frame has a memory copy of SRP_REGNUM, use that. If not,
// OBSOLETE just use the register SRP_REGNUM itself. */
// OBSOLETE
// OBSOLETE CORE_ADDR
// OBSOLETE frame_saved_pc (struct frame_info *frame)
// OBSOLETE {
// OBSOLETE return read_next_frame_reg (frame, SRP_REGNUM);
// OBSOLETE }
// OBSOLETE
// OBSOLETE
// OBSOLETE #define DUMMY_FRAME_SIZE 192
// OBSOLETE
// OBSOLETE static void
// OBSOLETE write_word (CORE_ADDR sp, ULONGEST word)
// OBSOLETE {
// OBSOLETE register int len = REGISTER_SIZE;
// OBSOLETE char buffer[MAX_REGISTER_RAW_SIZE];
// OBSOLETE
// OBSOLETE store_unsigned_integer (buffer, len, word);
// OBSOLETE write_memory (sp, buffer, len);
// OBSOLETE }
// OBSOLETE
// OBSOLETE void
// OBSOLETE m88k_push_dummy_frame (void)
// OBSOLETE {
// OBSOLETE register CORE_ADDR sp = read_register (SP_REGNUM);
// OBSOLETE register int rn;
// OBSOLETE int offset;
// OBSOLETE
// OBSOLETE sp -= DUMMY_FRAME_SIZE; /* allocate a bunch of space */
// OBSOLETE
// OBSOLETE for (rn = 0, offset = 0; rn <= SP_REGNUM; rn++, offset += 4)
// OBSOLETE write_word (sp + offset, read_register (rn));
// OBSOLETE
// OBSOLETE write_word (sp + offset, read_register (SXIP_REGNUM));
// OBSOLETE offset += 4;
// OBSOLETE
// OBSOLETE write_word (sp + offset, read_register (SNIP_REGNUM));
// OBSOLETE offset += 4;
// OBSOLETE
// OBSOLETE write_word (sp + offset, read_register (SFIP_REGNUM));
// OBSOLETE offset += 4;
// OBSOLETE
// OBSOLETE write_word (sp + offset, read_register (PSR_REGNUM));
// OBSOLETE offset += 4;
// OBSOLETE
// OBSOLETE write_word (sp + offset, read_register (FPSR_REGNUM));
// OBSOLETE offset += 4;
// OBSOLETE
// OBSOLETE write_word (sp + offset, read_register (FPCR_REGNUM));
// OBSOLETE offset += 4;
// OBSOLETE
// OBSOLETE write_register (SP_REGNUM, sp);
// OBSOLETE write_register (ACTUAL_FP_REGNUM, sp);
// OBSOLETE }
// OBSOLETE
// OBSOLETE void
// OBSOLETE pop_frame (void)
// OBSOLETE {
// OBSOLETE register struct frame_info *frame = get_current_frame ();
// OBSOLETE register int regnum;
// OBSOLETE struct frame_saved_regs fsr;
// OBSOLETE
// OBSOLETE get_frame_saved_regs (frame, &fsr);
// OBSOLETE
// OBSOLETE if (PC_IN_CALL_DUMMY (read_pc (), read_register (SP_REGNUM), frame->frame))
// OBSOLETE {
// OBSOLETE /* FIXME: I think get_frame_saved_regs should be handling this so
// OBSOLETE that we can deal with the saved registers properly (e.g. frame
// OBSOLETE 1 is a call dummy, the user types "frame 2" and then "print $ps"). */
// OBSOLETE register CORE_ADDR sp = read_register (ACTUAL_FP_REGNUM);
// OBSOLETE int offset;
// OBSOLETE
// OBSOLETE for (regnum = 0, offset = 0; regnum <= SP_REGNUM; regnum++, offset += 4)
// OBSOLETE (void) write_register (regnum, read_memory_integer (sp + offset, 4));
// OBSOLETE
// OBSOLETE write_register (SXIP_REGNUM, read_memory_integer (sp + offset, 4));
// OBSOLETE offset += 4;
// OBSOLETE
// OBSOLETE write_register (SNIP_REGNUM, read_memory_integer (sp + offset, 4));
// OBSOLETE offset += 4;
// OBSOLETE
// OBSOLETE write_register (SFIP_REGNUM, read_memory_integer (sp + offset, 4));
// OBSOLETE offset += 4;
// OBSOLETE
// OBSOLETE write_register (PSR_REGNUM, read_memory_integer (sp + offset, 4));
// OBSOLETE offset += 4;
// OBSOLETE
// OBSOLETE write_register (FPSR_REGNUM, read_memory_integer (sp + offset, 4));
// OBSOLETE offset += 4;
// OBSOLETE
// OBSOLETE write_register (FPCR_REGNUM, read_memory_integer (sp + offset, 4));
// OBSOLETE offset += 4;
// OBSOLETE
// OBSOLETE }
// OBSOLETE else
// OBSOLETE {
// OBSOLETE for (regnum = FP_REGNUM; regnum > 0; regnum--)
// OBSOLETE if (fsr.regs[regnum])
// OBSOLETE write_register (regnum,
// OBSOLETE read_memory_integer (fsr.regs[regnum], 4));
// OBSOLETE write_pc (frame_saved_pc (frame));
// OBSOLETE }
// OBSOLETE reinit_frame_cache ();
// OBSOLETE }
// OBSOLETE
// OBSOLETE void
// OBSOLETE _initialize_m88k_tdep (void)
// OBSOLETE {
// OBSOLETE tm_print_insn = print_insn_m88k;
// OBSOLETE }

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -1,762 +0,0 @@
// OBSOLETE /* Memory-access and commands for remote NINDY process, for GDB.
// OBSOLETE
// OBSOLETE Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999,
// OBSOLETE 2000, 2001, 2002 Free Software Foundation, Inc.
// OBSOLETE
// OBSOLETE Contributed by Intel Corporation. Modified from remote.c by Chris Benenati.
// OBSOLETE
// OBSOLETE GDB is distributed in the hope that it will be useful, but WITHOUT ANY
// OBSOLETE WARRANTY. No author or distributor accepts responsibility to anyone
// OBSOLETE for the consequences of using it or for whether it serves any
// OBSOLETE particular purpose or works at all, unless he says so in writing.
// OBSOLETE Refer to the GDB General Public License for full details.
// OBSOLETE
// OBSOLETE Everyone is granted permission to copy, modify and redistribute GDB,
// OBSOLETE but only under the conditions described in the GDB General Public
// OBSOLETE License. A copy of this license is supposed to have been given to you
// OBSOLETE along with GDB so you can know your rights and responsibilities. It
// OBSOLETE should be in a file named COPYING. Among other things, the copyright
// OBSOLETE notice and this notice must be preserved on all copies.
// OBSOLETE
// OBSOLETE In other words, go ahead and share GDB, but don't try to stop
// OBSOLETE anyone else from sharing it farther. Help stamp out software hoarding! */
// OBSOLETE
// OBSOLETE /*
// OBSOLETE Except for the data cache routines, this file bears little resemblence
// OBSOLETE to remote.c. A new (although similar) protocol has been specified, and
// OBSOLETE portions of the code are entirely dependent on having an i80960 with a
// OBSOLETE NINDY ROM monitor at the other end of the line.
// OBSOLETE */
// OBSOLETE
// OBSOLETE /*****************************************************************************
// OBSOLETE *
// OBSOLETE * REMOTE COMMUNICATION PROTOCOL BETWEEN GDB960 AND THE NINDY ROM MONITOR.
// OBSOLETE *
// OBSOLETE *
// OBSOLETE * MODES OF OPERATION
// OBSOLETE * ----- -- ---------
// OBSOLETE *
// OBSOLETE * As far as NINDY is concerned, GDB is always in one of two modes: command
// OBSOLETE * mode or passthrough mode.
// OBSOLETE *
// OBSOLETE * In command mode (the default) pre-defined packets containing requests
// OBSOLETE * are sent by GDB to NINDY. NINDY never talks except in reponse to a request.
// OBSOLETE *
// OBSOLETE * Once the the user program is started, GDB enters passthrough mode, to give
// OBSOLETE * the user program access to the terminal. GDB remains in this mode until
// OBSOLETE * NINDY indicates that the program has stopped.
// OBSOLETE *
// OBSOLETE *
// OBSOLETE * PASSTHROUGH MODE
// OBSOLETE * ----------- ----
// OBSOLETE *
// OBSOLETE * GDB writes all input received from the keyboard directly to NINDY, and writes
// OBSOLETE * all characters received from NINDY directly to the monitor.
// OBSOLETE *
// OBSOLETE * Keyboard input is neither buffered nor echoed to the monitor.
// OBSOLETE *
// OBSOLETE * GDB remains in passthrough mode until NINDY sends a single ^P character,
// OBSOLETE * to indicate that the user process has stopped.
// OBSOLETE *
// OBSOLETE * Note:
// OBSOLETE * GDB assumes NINDY performs a 'flushreg' when the user program stops.
// OBSOLETE *
// OBSOLETE *
// OBSOLETE * COMMAND MODE
// OBSOLETE * ------- ----
// OBSOLETE *
// OBSOLETE * All info (except for message ack and nak) is transferred between gdb
// OBSOLETE * and the remote processor in messages of the following format:
// OBSOLETE *
// OBSOLETE * <info>#<checksum>
// OBSOLETE *
// OBSOLETE * where
// OBSOLETE * # is a literal character
// OBSOLETE *
// OBSOLETE * <info> ASCII information; all numeric information is in the
// OBSOLETE * form of hex digits ('0'-'9' and lowercase 'a'-'f').
// OBSOLETE *
// OBSOLETE * <checksum>
// OBSOLETE * is a pair of ASCII hex digits representing an 8-bit
// OBSOLETE * checksum formed by adding together each of the
// OBSOLETE * characters in <info>.
// OBSOLETE *
// OBSOLETE * The receiver of a message always sends a single character to the sender
// OBSOLETE * to indicate that the checksum was good ('+') or bad ('-'); the sender
// OBSOLETE * re-transmits the entire message over until a '+' is received.
// OBSOLETE *
// OBSOLETE * In response to a command NINDY always sends back either data or
// OBSOLETE * a result code of the form "Xnn", where "nn" are hex digits and "X00"
// OBSOLETE * means no errors. (Exceptions: the "s" and "c" commands don't respond.)
// OBSOLETE *
// OBSOLETE * SEE THE HEADER OF THE FILE "gdb.c" IN THE NINDY MONITOR SOURCE CODE FOR A
// OBSOLETE * FULL DESCRIPTION OF LEGAL COMMANDS.
// OBSOLETE *
// OBSOLETE * SEE THE FILE "stop.h" IN THE NINDY MONITOR SOURCE CODE FOR A LIST
// OBSOLETE * OF STOP CODES.
// OBSOLETE *
// OBSOLETE ***************************************************************************/
// OBSOLETE
// OBSOLETE #include "defs.h"
// OBSOLETE #include <signal.h>
// OBSOLETE #include <sys/types.h>
// OBSOLETE #include <setjmp.h>
// OBSOLETE
// OBSOLETE #include "frame.h"
// OBSOLETE #include "inferior.h"
// OBSOLETE #include "bfd.h"
// OBSOLETE #include "symfile.h"
// OBSOLETE #include "target.h"
// OBSOLETE #include "gdbcore.h"
// OBSOLETE #include "command.h"
// OBSOLETE #include "floatformat.h"
// OBSOLETE #include "regcache.h"
// OBSOLETE
// OBSOLETE #include <sys/file.h>
// OBSOLETE #include <ctype.h>
// OBSOLETE #include "serial.h"
// OBSOLETE #include "nindy-share/env.h"
// OBSOLETE #include "nindy-share/stop.h"
// OBSOLETE #include "remote-utils.h"
// OBSOLETE
// OBSOLETE extern int unlink ();
// OBSOLETE extern char *getenv ();
// OBSOLETE extern char *mktemp ();
// OBSOLETE
// OBSOLETE extern void generic_mourn_inferior ();
// OBSOLETE
// OBSOLETE extern struct target_ops nindy_ops;
// OBSOLETE extern FILE *instream;
// OBSOLETE
// OBSOLETE extern char ninStopWhy ();
// OBSOLETE extern int ninMemGet ();
// OBSOLETE extern int ninMemPut ();
// OBSOLETE
// OBSOLETE int nindy_initial_brk; /* nonzero if want to send an initial BREAK to nindy */
// OBSOLETE int nindy_old_protocol; /* nonzero if want to use old protocol */
// OBSOLETE char *nindy_ttyname; /* name of tty to talk to nindy on, or null */
// OBSOLETE
// OBSOLETE #define DLE '\020' /* Character NINDY sends to indicate user program has
// OBSOLETE * halted. */
// OBSOLETE #define TRUE 1
// OBSOLETE #define FALSE 0
// OBSOLETE
// OBSOLETE /* From nindy-share/nindy.c. */
// OBSOLETE extern struct serial *nindy_serial;
// OBSOLETE
// OBSOLETE static int have_regs = 0; /* 1 iff regs read since i960 last halted */
// OBSOLETE static int regs_changed = 0; /* 1 iff regs were modified since last read */
// OBSOLETE
// OBSOLETE extern char *exists ();
// OBSOLETE
// OBSOLETE static void nindy_fetch_registers (int);
// OBSOLETE
// OBSOLETE static void nindy_store_registers (int);
// OBSOLETE
// OBSOLETE static char *savename;
// OBSOLETE
// OBSOLETE static void
// OBSOLETE nindy_close (int quitting)
// OBSOLETE {
// OBSOLETE if (nindy_serial != NULL)
// OBSOLETE serial_close (nindy_serial);
// OBSOLETE nindy_serial = NULL;
// OBSOLETE
// OBSOLETE if (savename)
// OBSOLETE xfree (savename);
// OBSOLETE savename = 0;
// OBSOLETE }
// OBSOLETE
// OBSOLETE /* Open a connection to a remote debugger.
// OBSOLETE FIXME, there should be "set" commands for the options that are
// OBSOLETE now specified with gdb command-line options (old_protocol,
// OBSOLETE and initial_brk). */
// OBSOLETE void
// OBSOLETE nindy_open (char *name, /* "/dev/ttyXX", "ttyXX", or "XX": tty to be opened */
// OBSOLETE int from_tty)
// OBSOLETE {
// OBSOLETE char baudrate[1024];
// OBSOLETE
// OBSOLETE if (!name)
// OBSOLETE error_no_arg ("serial port device name");
// OBSOLETE
// OBSOLETE target_preopen (from_tty);
// OBSOLETE
// OBSOLETE nindy_close (0);
// OBSOLETE
// OBSOLETE have_regs = regs_changed = 0;
// OBSOLETE
// OBSOLETE /* Allow user to interrupt the following -- we could hang if there's
// OBSOLETE no NINDY at the other end of the remote tty. */
// OBSOLETE immediate_quit++;
// OBSOLETE /* If baud_rate is -1, then ninConnect will not recognize the baud rate
// OBSOLETE and will deal with the situation in a (more or less) reasonable
// OBSOLETE fashion. */
// OBSOLETE sprintf (baudrate, "%d", baud_rate);
// OBSOLETE ninConnect (name, baudrate,
// OBSOLETE nindy_initial_brk, !from_tty, nindy_old_protocol);
// OBSOLETE immediate_quit--;
// OBSOLETE
// OBSOLETE if (nindy_serial == NULL)
// OBSOLETE {
// OBSOLETE perror_with_name (name);
// OBSOLETE }
// OBSOLETE
// OBSOLETE savename = savestring (name, strlen (name));
// OBSOLETE push_target (&nindy_ops);
// OBSOLETE
// OBSOLETE target_fetch_registers (-1);
// OBSOLETE
// OBSOLETE init_thread_list ();
// OBSOLETE init_wait_for_inferior ();
// OBSOLETE clear_proceed_status ();
// OBSOLETE normal_stop ();
// OBSOLETE }
// OBSOLETE
// OBSOLETE /* User-initiated quit of nindy operations. */
// OBSOLETE
// OBSOLETE static void
// OBSOLETE nindy_detach (char *name, int from_tty)
// OBSOLETE {
// OBSOLETE if (name)
// OBSOLETE error ("Too many arguments");
// OBSOLETE pop_target ();
// OBSOLETE }
// OBSOLETE
// OBSOLETE static void
// OBSOLETE nindy_files_info (void)
// OBSOLETE {
// OBSOLETE /* FIXME: this lies about the baud rate if we autobauded. */
// OBSOLETE printf_unfiltered ("\tAttached to %s at %d bits per second%s%s.\n", savename,
// OBSOLETE baud_rate,
// OBSOLETE nindy_old_protocol ? " in old protocol" : "",
// OBSOLETE nindy_initial_brk ? " with initial break" : "");
// OBSOLETE }
// OBSOLETE
// OBSOLETE /* Return the number of characters in the buffer BUF before
// OBSOLETE the first DLE character. N is maximum number of characters to
// OBSOLETE consider. */
// OBSOLETE
// OBSOLETE static
// OBSOLETE int
// OBSOLETE non_dle (char *buf, int n)
// OBSOLETE {
// OBSOLETE int i;
// OBSOLETE
// OBSOLETE for (i = 0; i < n; i++)
// OBSOLETE {
// OBSOLETE if (buf[i] == DLE)
// OBSOLETE {
// OBSOLETE break;
// OBSOLETE }
// OBSOLETE }
// OBSOLETE return i;
// OBSOLETE }
// OBSOLETE
// OBSOLETE /* Tell the remote machine to resume. */
// OBSOLETE
// OBSOLETE void
// OBSOLETE nindy_resume (ptid_t ptid, int step, enum target_signal siggnal)
// OBSOLETE {
// OBSOLETE if (siggnal != TARGET_SIGNAL_0 && siggnal != stop_signal)
// OBSOLETE warning ("Can't send signals to remote NINDY targets.");
// OBSOLETE
// OBSOLETE if (regs_changed)
// OBSOLETE {
// OBSOLETE nindy_store_registers (-1);
// OBSOLETE regs_changed = 0;
// OBSOLETE }
// OBSOLETE have_regs = 0;
// OBSOLETE ninGo (step);
// OBSOLETE }
// OBSOLETE
// OBSOLETE /* FIXME, we can probably use the normal terminal_inferior stuff here.
// OBSOLETE We have to do terminal_inferior and then set up the passthrough
// OBSOLETE settings initially. Thereafter, terminal_ours and terminal_inferior
// OBSOLETE will automatically swap the settings around for us. */
// OBSOLETE
// OBSOLETE struct clean_up_tty_args
// OBSOLETE {
// OBSOLETE serial_ttystate state;
// OBSOLETE struct serial *serial;
// OBSOLETE };
// OBSOLETE static struct clean_up_tty_args tty_args;
// OBSOLETE
// OBSOLETE static void
// OBSOLETE clean_up_tty (PTR ptrarg)
// OBSOLETE {
// OBSOLETE struct clean_up_tty_args *args = (struct clean_up_tty_args *) ptrarg;
// OBSOLETE serial_set_tty_state (args->serial, args->state);
// OBSOLETE xfree (args->state);
// OBSOLETE warning ("\n\nYou may need to reset the 80960 and/or reload your program.\n");
// OBSOLETE }
// OBSOLETE
// OBSOLETE /* Recover from ^Z or ^C while remote process is running */
// OBSOLETE static void (*old_ctrlc) ();
// OBSOLETE #ifdef SIGTSTP
// OBSOLETE static void (*old_ctrlz) ();
// OBSOLETE #endif
// OBSOLETE
// OBSOLETE static void
// OBSOLETE clean_up_int (void)
// OBSOLETE {
// OBSOLETE serial_set_tty_state (tty_args.serial, tty_args.state);
// OBSOLETE xfree (tty_args.state);
// OBSOLETE
// OBSOLETE signal (SIGINT, old_ctrlc);
// OBSOLETE #ifdef SIGTSTP
// OBSOLETE signal (SIGTSTP, old_ctrlz);
// OBSOLETE #endif
// OBSOLETE error ("\n\nYou may need to reset the 80960 and/or reload your program.\n");
// OBSOLETE }
// OBSOLETE
// OBSOLETE /* Wait until the remote machine stops. While waiting, operate in passthrough
// OBSOLETE * mode; i.e., pass everything NINDY sends to gdb_stdout, and everything from
// OBSOLETE * stdin to NINDY.
// OBSOLETE *
// OBSOLETE * Return to caller, storing status in 'status' just as `wait' would.
// OBSOLETE */
// OBSOLETE
// OBSOLETE static ptid_t
// OBSOLETE nindy_wait (ptid_t ptid, struct target_waitstatus *status)
// OBSOLETE {
// OBSOLETE fd_set fds;
// OBSOLETE int c;
// OBSOLETE char buf[2];
// OBSOLETE int i, n;
// OBSOLETE unsigned char stop_exit;
// OBSOLETE unsigned char stop_code;
// OBSOLETE struct cleanup *old_cleanups;
// OBSOLETE long ip_value, fp_value, sp_value; /* Reg values from stop */
// OBSOLETE
// OBSOLETE status->kind = TARGET_WAITKIND_EXITED;
// OBSOLETE status->value.integer = 0;
// OBSOLETE
// OBSOLETE /* OPERATE IN PASSTHROUGH MODE UNTIL NINDY SENDS A DLE CHARACTER */
// OBSOLETE
// OBSOLETE /* Save current tty attributes, and restore them when done. */
// OBSOLETE tty_args.serial = serial_fdopen (0);
// OBSOLETE tty_args.state = serial_get_tty_state (tty_args.serial);
// OBSOLETE old_ctrlc = signal (SIGINT, clean_up_int);
// OBSOLETE #ifdef SIGTSTP
// OBSOLETE old_ctrlz = signal (SIGTSTP, clean_up_int);
// OBSOLETE #endif
// OBSOLETE
// OBSOLETE old_cleanups = make_cleanup (clean_up_tty, &tty_args);
// OBSOLETE
// OBSOLETE /* Pass input from keyboard to NINDY as it arrives. NINDY will interpret
// OBSOLETE <CR> and perform echo. */
// OBSOLETE /* This used to set CBREAK and clear ECHO and CRMOD. I hope this is close
// OBSOLETE enough. */
// OBSOLETE serial_raw (tty_args.serial);
// OBSOLETE
// OBSOLETE while (1)
// OBSOLETE {
// OBSOLETE /* Input on remote */
// OBSOLETE c = serial_readchar (nindy_serial, -1);
// OBSOLETE if (c == SERIAL_ERROR)
// OBSOLETE {
// OBSOLETE error ("Cannot read from serial line");
// OBSOLETE }
// OBSOLETE else if (c == 0x1b) /* ESC */
// OBSOLETE {
// OBSOLETE c = serial_readchar (nindy_serial, -1);
// OBSOLETE c &= ~0x40;
// OBSOLETE }
// OBSOLETE else if (c != 0x10) /* DLE */
// OBSOLETE /* Write out any characters preceding DLE */
// OBSOLETE {
// OBSOLETE buf[0] = (char) c;
// OBSOLETE write (1, buf, 1);
// OBSOLETE }
// OBSOLETE else
// OBSOLETE {
// OBSOLETE stop_exit = ninStopWhy (&stop_code,
// OBSOLETE &ip_value, &fp_value, &sp_value);
// OBSOLETE if (!stop_exit && (stop_code == STOP_SRQ))
// OBSOLETE {
// OBSOLETE immediate_quit++;
// OBSOLETE ninSrq ();
// OBSOLETE immediate_quit--;
// OBSOLETE }
// OBSOLETE else
// OBSOLETE {
// OBSOLETE /* Get out of loop */
// OBSOLETE supply_register (IP_REGNUM,
// OBSOLETE (char *) &ip_value);
// OBSOLETE supply_register (FP_REGNUM,
// OBSOLETE (char *) &fp_value);
// OBSOLETE supply_register (SP_REGNUM,
// OBSOLETE (char *) &sp_value);
// OBSOLETE break;
// OBSOLETE }
// OBSOLETE }
// OBSOLETE }
// OBSOLETE
// OBSOLETE serial_set_tty_state (tty_args.serial, tty_args.state);
// OBSOLETE xfree (tty_args.state);
// OBSOLETE discard_cleanups (old_cleanups);
// OBSOLETE
// OBSOLETE if (stop_exit)
// OBSOLETE {
// OBSOLETE status->kind = TARGET_WAITKIND_EXITED;
// OBSOLETE status->value.integer = stop_code;
// OBSOLETE }
// OBSOLETE else
// OBSOLETE {
// OBSOLETE /* nindy has some special stop code need to be handled */
// OBSOLETE if (stop_code == STOP_GDB_BPT)
// OBSOLETE stop_code = TRACE_STEP;
// OBSOLETE status->kind = TARGET_WAITKIND_STOPPED;
// OBSOLETE status->value.sig = i960_fault_to_signal (stop_code);
// OBSOLETE }
// OBSOLETE return inferior_ptid;
// OBSOLETE }
// OBSOLETE
// OBSOLETE /* Read the remote registers into the block REGS. */
// OBSOLETE
// OBSOLETE /* This is the block that ninRegsGet and ninRegsPut handles. */
// OBSOLETE struct nindy_regs
// OBSOLETE {
// OBSOLETE char local_regs[16 * 4];
// OBSOLETE char global_regs[16 * 4];
// OBSOLETE char pcw_acw[2 * 4];
// OBSOLETE char ip[4];
// OBSOLETE char tcw[4];
// OBSOLETE char fp_as_double[4 * 8];
// OBSOLETE };
// OBSOLETE
// OBSOLETE static void
// OBSOLETE nindy_fetch_registers (int regno)
// OBSOLETE {
// OBSOLETE struct nindy_regs nindy_regs;
// OBSOLETE int regnum;
// OBSOLETE
// OBSOLETE immediate_quit++;
// OBSOLETE ninRegsGet ((char *) &nindy_regs);
// OBSOLETE immediate_quit--;
// OBSOLETE
// OBSOLETE memcpy (&registers[REGISTER_BYTE (R0_REGNUM)], nindy_regs.local_regs, 16 * 4);
// OBSOLETE memcpy (&registers[REGISTER_BYTE (G0_REGNUM)], nindy_regs.global_regs, 16 * 4);
// OBSOLETE memcpy (&registers[REGISTER_BYTE (PCW_REGNUM)], nindy_regs.pcw_acw, 2 * 4);
// OBSOLETE memcpy (&registers[REGISTER_BYTE (IP_REGNUM)], nindy_regs.ip, 1 * 4);
// OBSOLETE memcpy (&registers[REGISTER_BYTE (TCW_REGNUM)], nindy_regs.tcw, 1 * 4);
// OBSOLETE memcpy (&registers[REGISTER_BYTE (FP0_REGNUM)], nindy_regs.fp_as_double, 4 * 8);
// OBSOLETE
// OBSOLETE registers_fetched ();
// OBSOLETE }
// OBSOLETE
// OBSOLETE static void
// OBSOLETE nindy_prepare_to_store (void)
// OBSOLETE {
// OBSOLETE /* Fetch all regs if they aren't already here. */
// OBSOLETE read_register_bytes (0, NULL, REGISTER_BYTES);
// OBSOLETE }
// OBSOLETE
// OBSOLETE static void
// OBSOLETE nindy_store_registers (int regno)
// OBSOLETE {
// OBSOLETE struct nindy_regs nindy_regs;
// OBSOLETE int regnum;
// OBSOLETE
// OBSOLETE memcpy (nindy_regs.local_regs, &registers[REGISTER_BYTE (R0_REGNUM)], 16 * 4);
// OBSOLETE memcpy (nindy_regs.global_regs, &registers[REGISTER_BYTE (G0_REGNUM)], 16 * 4);
// OBSOLETE memcpy (nindy_regs.pcw_acw, &registers[REGISTER_BYTE (PCW_REGNUM)], 2 * 4);
// OBSOLETE memcpy (nindy_regs.ip, &registers[REGISTER_BYTE (IP_REGNUM)], 1 * 4);
// OBSOLETE memcpy (nindy_regs.tcw, &registers[REGISTER_BYTE (TCW_REGNUM)], 1 * 4);
// OBSOLETE memcpy (nindy_regs.fp_as_double, &registers[REGISTER_BYTE (FP0_REGNUM)], 8 * 4);
// OBSOLETE
// OBSOLETE immediate_quit++;
// OBSOLETE ninRegsPut ((char *) &nindy_regs);
// OBSOLETE immediate_quit--;
// OBSOLETE }
// OBSOLETE
// OBSOLETE /* Copy LEN bytes to or from inferior's memory starting at MEMADDR
// OBSOLETE to debugger memory starting at MYADDR. Copy to inferior if
// OBSOLETE SHOULD_WRITE is nonzero. Returns the length copied. TARGET is
// OBSOLETE unused. */
// OBSOLETE
// OBSOLETE int
// OBSOLETE nindy_xfer_inferior_memory (CORE_ADDR memaddr, char *myaddr, int len,
// OBSOLETE int should_write, struct mem_attrib *attrib,
// OBSOLETE struct target_ops *target)
// OBSOLETE {
// OBSOLETE int res;
// OBSOLETE
// OBSOLETE if (len <= 0)
// OBSOLETE return 0;
// OBSOLETE
// OBSOLETE if (should_write)
// OBSOLETE res = ninMemPut (memaddr, myaddr, len);
// OBSOLETE else
// OBSOLETE res = ninMemGet (memaddr, myaddr, len);
// OBSOLETE
// OBSOLETE return res;
// OBSOLETE }
// OBSOLETE
// OBSOLETE static void
// OBSOLETE nindy_create_inferior (char *execfile, char *args, char **env)
// OBSOLETE {
// OBSOLETE int entry_pt;
// OBSOLETE int pid;
// OBSOLETE
// OBSOLETE if (args && *args)
// OBSOLETE error ("Can't pass arguments to remote NINDY process");
// OBSOLETE
// OBSOLETE if (execfile == 0 || exec_bfd == 0)
// OBSOLETE error ("No executable file specified");
// OBSOLETE
// OBSOLETE entry_pt = (int) bfd_get_start_address (exec_bfd);
// OBSOLETE
// OBSOLETE pid = 42;
// OBSOLETE
// OBSOLETE /* The "process" (board) is already stopped awaiting our commands, and
// OBSOLETE the program is already downloaded. We just set its PC and go. */
// OBSOLETE
// OBSOLETE inferior_ptid = pid_to_ptid (pid); /* Needed for wait_for_inferior below */
// OBSOLETE
// OBSOLETE clear_proceed_status ();
// OBSOLETE
// OBSOLETE /* Tell wait_for_inferior that we've started a new process. */
// OBSOLETE init_wait_for_inferior ();
// OBSOLETE
// OBSOLETE /* Set up the "saved terminal modes" of the inferior
// OBSOLETE based on what modes we are starting it with. */
// OBSOLETE target_terminal_init ();
// OBSOLETE
// OBSOLETE /* Install inferior's terminal modes. */
// OBSOLETE target_terminal_inferior ();
// OBSOLETE
// OBSOLETE /* insert_step_breakpoint (); FIXME, do we need this? */
// OBSOLETE /* Let 'er rip... */
// OBSOLETE proceed ((CORE_ADDR) entry_pt, TARGET_SIGNAL_DEFAULT, 0);
// OBSOLETE }
// OBSOLETE
// OBSOLETE static void
// OBSOLETE reset_command (char *args, int from_tty)
// OBSOLETE {
// OBSOLETE if (nindy_serial == NULL)
// OBSOLETE {
// OBSOLETE error ("No target system to reset -- use 'target nindy' command.");
// OBSOLETE }
// OBSOLETE if (query ("Really reset the target system?", 0, 0))
// OBSOLETE {
// OBSOLETE serial_send_break (nindy_serial);
// OBSOLETE tty_flush (nindy_serial);
// OBSOLETE }
// OBSOLETE }
// OBSOLETE
// OBSOLETE void
// OBSOLETE nindy_kill (char *args, int from_tty)
// OBSOLETE {
// OBSOLETE return; /* Ignore attempts to kill target system */
// OBSOLETE }
// OBSOLETE
// OBSOLETE /* Clean up when a program exits.
// OBSOLETE
// OBSOLETE The program actually lives on in the remote processor's RAM, and may be
// OBSOLETE run again without a download. Don't leave it full of breakpoint
// OBSOLETE instructions. */
// OBSOLETE
// OBSOLETE void
// OBSOLETE nindy_mourn_inferior (void)
// OBSOLETE {
// OBSOLETE remove_breakpoints ();
// OBSOLETE unpush_target (&nindy_ops);
// OBSOLETE generic_mourn_inferior (); /* Do all the proper things now */
// OBSOLETE }
// OBSOLETE
// OBSOLETE /* Pass the args the way catch_errors wants them. */
// OBSOLETE static int
// OBSOLETE nindy_open_stub (char *arg)
// OBSOLETE {
// OBSOLETE nindy_open (arg, 1);
// OBSOLETE return 1;
// OBSOLETE }
// OBSOLETE
// OBSOLETE static void
// OBSOLETE nindy_load (char *filename, int from_tty)
// OBSOLETE {
// OBSOLETE asection *s;
// OBSOLETE /* Can't do unix style forking on a VMS system, so we'll use bfd to do
// OBSOLETE all the work for us
// OBSOLETE */
// OBSOLETE
// OBSOLETE bfd *file = bfd_openr (filename, 0);
// OBSOLETE if (!file)
// OBSOLETE {
// OBSOLETE perror_with_name (filename);
// OBSOLETE return;
// OBSOLETE }
// OBSOLETE
// OBSOLETE if (!bfd_check_format (file, bfd_object))
// OBSOLETE {
// OBSOLETE error ("can't prove it's an object file\n");
// OBSOLETE return;
// OBSOLETE }
// OBSOLETE
// OBSOLETE for (s = file->sections; s; s = s->next)
// OBSOLETE {
// OBSOLETE if (s->flags & SEC_LOAD)
// OBSOLETE {
// OBSOLETE char *buffer = xmalloc (s->_raw_size);
// OBSOLETE bfd_get_section_contents (file, s, buffer, 0, s->_raw_size);
// OBSOLETE printf ("Loading section %s, size %x vma %x\n",
// OBSOLETE s->name,
// OBSOLETE s->_raw_size,
// OBSOLETE s->vma);
// OBSOLETE ninMemPut (s->vma, buffer, s->_raw_size);
// OBSOLETE xfree (buffer);
// OBSOLETE }
// OBSOLETE }
// OBSOLETE bfd_close (file);
// OBSOLETE }
// OBSOLETE
// OBSOLETE static int
// OBSOLETE load_stub (char *arg)
// OBSOLETE {
// OBSOLETE target_load (arg, 1);
// OBSOLETE return 1;
// OBSOLETE }
// OBSOLETE
// OBSOLETE /* This routine is run as a hook, just before the main command loop is
// OBSOLETE entered. If gdb is configured for the i960, but has not had its
// OBSOLETE nindy target specified yet, this will loop prompting the user to do so.
// OBSOLETE
// OBSOLETE Unlike the loop provided by Intel, we actually let the user get out
// OBSOLETE of this with a RETURN. This is useful when e.g. simply examining
// OBSOLETE an i960 object file on the host system. */
// OBSOLETE
// OBSOLETE void
// OBSOLETE nindy_before_main_loop (void)
// OBSOLETE {
// OBSOLETE char ttyname[100];
// OBSOLETE char *p, *p2;
// OBSOLETE
// OBSOLETE while (target_stack->target_ops != &nindy_ops) /* What is this crap??? */
// OBSOLETE { /* remote tty not specified yet */
// OBSOLETE if (instream == stdin)
// OBSOLETE {
// OBSOLETE printf_unfiltered ("\nAttach /dev/ttyNN -- specify NN, or \"quit\" to quit: ");
// OBSOLETE gdb_flush (gdb_stdout);
// OBSOLETE }
// OBSOLETE fgets (ttyname, sizeof (ttyname) - 1, stdin);
// OBSOLETE
// OBSOLETE /* Strip leading and trailing whitespace */
// OBSOLETE for (p = ttyname; isspace (*p); p++)
// OBSOLETE {
// OBSOLETE ;
// OBSOLETE }
// OBSOLETE if (*p == '\0')
// OBSOLETE {
// OBSOLETE return; /* User just hit spaces or return, wants out */
// OBSOLETE }
// OBSOLETE for (p2 = p; !isspace (*p2) && (*p2 != '\0'); p2++)
// OBSOLETE {
// OBSOLETE ;
// OBSOLETE }
// OBSOLETE *p2 = '\0';
// OBSOLETE if (STREQ ("quit", p))
// OBSOLETE {
// OBSOLETE exit (1);
// OBSOLETE }
// OBSOLETE
// OBSOLETE if (catch_errors (nindy_open_stub, p, "", RETURN_MASK_ALL))
// OBSOLETE {
// OBSOLETE /* Now that we have a tty open for talking to the remote machine,
// OBSOLETE download the executable file if one was specified. */
// OBSOLETE if (exec_bfd)
// OBSOLETE {
// OBSOLETE catch_errors (load_stub, bfd_get_filename (exec_bfd), "",
// OBSOLETE RETURN_MASK_ALL);
// OBSOLETE }
// OBSOLETE }
// OBSOLETE }
// OBSOLETE }
// OBSOLETE
// OBSOLETE /* Define the target subroutine names */
// OBSOLETE
// OBSOLETE struct target_ops nindy_ops;
// OBSOLETE
// OBSOLETE static void
// OBSOLETE init_nindy_ops (void)
// OBSOLETE {
// OBSOLETE nindy_ops.to_shortname = "nindy";
// OBSOLETE "Remote serial target in i960 NINDY-specific protocol",
// OBSOLETE nindy_ops.to_longname = "Use a remote i960 system running NINDY connected by a serial line.\n\
// OBSOLETE Specify the name of the device the serial line is connected to.\n\
// OBSOLETE The speed (baud rate), whether to use the old NINDY protocol,\n\
// OBSOLETE and whether to send a break on startup, are controlled by options\n\
// OBSOLETE specified when you started GDB.";
// OBSOLETE nindy_ops.to_doc = "";
// OBSOLETE nindy_ops.to_open = nindy_open;
// OBSOLETE nindy_ops.to_close = nindy_close;
// OBSOLETE nindy_ops.to_attach = 0;
// OBSOLETE nindy_ops.to_post_attach = NULL;
// OBSOLETE nindy_ops.to_require_attach = NULL;
// OBSOLETE nindy_ops.to_detach = nindy_detach;
// OBSOLETE nindy_ops.to_require_detach = NULL;
// OBSOLETE nindy_ops.to_resume = nindy_resume;
// OBSOLETE nindy_ops.to_wait = nindy_wait;
// OBSOLETE nindy_ops.to_post_wait = NULL;
// OBSOLETE nindy_ops.to_fetch_registers = nindy_fetch_registers;
// OBSOLETE nindy_ops.to_store_registers = nindy_store_registers;
// OBSOLETE nindy_ops.to_prepare_to_store = nindy_prepare_to_store;
// OBSOLETE nindy_ops.to_xfer_memory = nindy_xfer_inferior_memory;
// OBSOLETE nindy_ops.to_files_info = nindy_files_info;
// OBSOLETE nindy_ops.to_insert_breakpoint = memory_insert_breakpoint;
// OBSOLETE nindy_ops.to_remove_breakpoint = memory_remove_breakpoint;
// OBSOLETE nindy_ops.to_terminal_init = 0;
// OBSOLETE nindy_ops.to_terminal_inferior = 0;
// OBSOLETE nindy_ops.to_terminal_ours_for_output = 0;
// OBSOLETE nindy_ops.to_terminal_ours = 0;
// OBSOLETE nindy_ops.to_terminal_info = 0; /* Terminal crud */
// OBSOLETE nindy_ops.to_kill = nindy_kill;
// OBSOLETE nindy_ops.to_load = nindy_load;
// OBSOLETE nindy_ops.to_lookup_symbol = 0; /* lookup_symbol */
// OBSOLETE nindy_ops.to_create_inferior = nindy_create_inferior;
// OBSOLETE nindy_ops.to_post_startup_inferior = NULL;
// OBSOLETE nindy_ops.to_acknowledge_created_inferior = NULL;
// OBSOLETE nindy_ops.to_clone_and_follow_inferior = NULL;
// OBSOLETE nindy_ops.to_post_follow_inferior_by_clone = NULL;
// OBSOLETE nindy_ops.to_insert_fork_catchpoint = NULL;
// OBSOLETE nindy_ops.to_remove_fork_catchpoint = NULL;
// OBSOLETE nindy_ops.to_insert_vfork_catchpoint = NULL;
// OBSOLETE nindy_ops.to_remove_vfork_catchpoint = NULL;
// OBSOLETE nindy_ops.to_has_forked = NULL;
// OBSOLETE nindy_ops.to_has_vforked = NULL;
// OBSOLETE nindy_ops.to_can_follow_vfork_prior_to_exec = NULL;
// OBSOLETE nindy_ops.to_post_follow_vfork = NULL;
// OBSOLETE nindy_ops.to_insert_exec_catchpoint = NULL;
// OBSOLETE nindy_ops.to_remove_exec_catchpoint = NULL;
// OBSOLETE nindy_ops.to_has_execd = NULL;
// OBSOLETE nindy_ops.to_reported_exec_events_per_exec_call = NULL;
// OBSOLETE nindy_ops.to_has_exited = NULL;
// OBSOLETE nindy_ops.to_mourn_inferior = nindy_mourn_inferior;
// OBSOLETE nindy_ops.to_can_run = 0; /* can_run */
// OBSOLETE nindy_ops.to_notice_signals = 0; /* notice_signals */
// OBSOLETE nindy_ops.to_thread_alive = 0; /* to_thread_alive */
// OBSOLETE nindy_ops.to_stop = 0; /* to_stop */
// OBSOLETE nindy_ops.to_pid_to_exec_file = NULL;
// OBSOLETE nindy_ops.to_stratum = process_stratum;
// OBSOLETE nindy_ops.DONT_USE = 0; /* next */
// OBSOLETE nindy_ops.to_has_all_memory = 1;
// OBSOLETE nindy_ops.to_has_memory = 1;
// OBSOLETE nindy_ops.to_has_stack = 1;
// OBSOLETE nindy_ops.to_has_registers = 1;
// OBSOLETE nindy_ops.to_has_execution = 1; /* all mem, mem, stack, regs, exec */
// OBSOLETE nindy_ops.to_sections = 0;
// OBSOLETE nindy_ops.to_sections_end = 0; /* Section pointers */
// OBSOLETE nindy_ops.to_magic = OPS_MAGIC; /* Always the last thing */
// OBSOLETE }
// OBSOLETE
// OBSOLETE void
// OBSOLETE _initialize_nindy (void)
// OBSOLETE {
// OBSOLETE init_nindy_ops ();
// OBSOLETE add_target (&nindy_ops);
// OBSOLETE add_com ("reset", class_obscure, reset_command,
// OBSOLETE "Send a 'break' to the remote target system.\n\
// OBSOLETE Only useful if the target has been equipped with a circuit\n\
// OBSOLETE to perform a hard reset when a break is detected.");
// OBSOLETE }

View file

@ -1,351 +0,0 @@
// OBSOLETE /* Remote debugging with the XLNT Designs, Inc (XDI) NetROM.
// OBSOLETE Copyright 1990, 1991, 1992, 1995, 1998, 1999, 2000
// OBSOLETE Free Software Foundation, Inc.
// OBSOLETE Contributed by:
// OBSOLETE Roger Moyers
// OBSOLETE XLNT Designs, Inc.
// OBSOLETE 15050 Avenue of Science, Suite 106
// OBSOLETE San Diego, CA 92128
// OBSOLETE (619)487-9320
// OBSOLETE roger@xlnt.com
// OBSOLETE Adapted from work done at Cygnus Support in remote-nindy.c,
// OBSOLETE later merged in by Stan Shebs at Cygnus.
// 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 "defs.h"
// OBSOLETE #include "gdbcmd.h"
// OBSOLETE #include "serial.h"
// OBSOLETE #include "target.h"
// OBSOLETE
// OBSOLETE /* Default ports used to talk with the NetROM. */
// OBSOLETE
// OBSOLETE #define DEFAULT_NETROM_LOAD_PORT 1236
// OBSOLETE #define DEFAULT_NETROM_CONTROL_PORT 1237
// OBSOLETE
// OBSOLETE static void nrom_close (int quitting);
// OBSOLETE
// OBSOLETE /* New commands. */
// OBSOLETE
// OBSOLETE static void nrom_passthru (char *, int);
// OBSOLETE
// OBSOLETE /* We talk to the NetROM over these sockets. */
// OBSOLETE
// OBSOLETE static struct serial *load_desc = NULL;
// OBSOLETE static struct serial *ctrl_desc = NULL;
// OBSOLETE
// OBSOLETE static int load_port = DEFAULT_NETROM_LOAD_PORT;
// OBSOLETE static int control_port = DEFAULT_NETROM_CONTROL_PORT;
// OBSOLETE
// OBSOLETE static char nrom_hostname[100];
// OBSOLETE
// OBSOLETE /* Forward data declaration. */
// OBSOLETE
// OBSOLETE extern struct target_ops nrom_ops;
// OBSOLETE
// OBSOLETE /* Scan input from the remote system, until STRING is found. Print chars that
// OBSOLETE don't match. */
// OBSOLETE
// OBSOLETE static int
// OBSOLETE expect (char *string)
// OBSOLETE {
// OBSOLETE char *p = string;
// OBSOLETE int c;
// OBSOLETE
// OBSOLETE immediate_quit++;
// OBSOLETE
// OBSOLETE while (1)
// OBSOLETE {
// OBSOLETE c = serial_readchar (ctrl_desc, 5);
// OBSOLETE
// OBSOLETE if (c == *p++)
// OBSOLETE {
// OBSOLETE if (*p == '\0')
// OBSOLETE {
// OBSOLETE immediate_quit--;
// OBSOLETE return 0;
// OBSOLETE }
// OBSOLETE }
// OBSOLETE else
// OBSOLETE {
// OBSOLETE fputc_unfiltered (c, gdb_stdout);
// OBSOLETE p = string;
// OBSOLETE if (c == *p)
// OBSOLETE p++;
// OBSOLETE }
// OBSOLETE }
// OBSOLETE }
// OBSOLETE
// OBSOLETE static void
// OBSOLETE nrom_kill (void)
// OBSOLETE {
// OBSOLETE nrom_close (0);
// OBSOLETE }
// OBSOLETE
// OBSOLETE static struct serial *
// OBSOLETE open_socket (char *name, int port)
// OBSOLETE {
// OBSOLETE char sockname[100];
// OBSOLETE struct serial *desc;
// OBSOLETE
// OBSOLETE sprintf (sockname, "%s:%d", name, port);
// OBSOLETE desc = serial_open (sockname);
// OBSOLETE if (!desc)
// OBSOLETE perror_with_name (sockname);
// OBSOLETE
// OBSOLETE return desc;
// OBSOLETE }
// OBSOLETE
// OBSOLETE static void
// OBSOLETE load_cleanup (void)
// OBSOLETE {
// OBSOLETE serial_close (load_desc);
// OBSOLETE load_desc = NULL;
// OBSOLETE }
// OBSOLETE
// OBSOLETE /* Download a file specified in ARGS to the netROM. */
// OBSOLETE
// OBSOLETE static void
// OBSOLETE nrom_load (char *args, int fromtty)
// OBSOLETE {
// OBSOLETE int fd, rd_amt, fsize;
// OBSOLETE bfd *pbfd;
// OBSOLETE asection *section;
// OBSOLETE char *downloadstring = "download 0\n";
// OBSOLETE struct cleanup *old_chain;
// OBSOLETE
// OBSOLETE /* Tell the netrom to get ready to download. */
// OBSOLETE if (serial_write (ctrl_desc, downloadstring, strlen (downloadstring)))
// OBSOLETE error ("nrom_load: control_send() of `%s' failed", downloadstring);
// OBSOLETE
// OBSOLETE expect ("Waiting for a connection...\n");
// OBSOLETE
// OBSOLETE load_desc = open_socket (nrom_hostname, load_port);
// OBSOLETE
// OBSOLETE old_chain = make_cleanup (load_cleanup, 0);
// OBSOLETE
// OBSOLETE pbfd = bfd_openr (args, 0);
// OBSOLETE
// OBSOLETE if (pbfd)
// OBSOLETE {
// OBSOLETE make_cleanup (bfd_close, pbfd);
// OBSOLETE
// OBSOLETE if (!bfd_check_format (pbfd, bfd_object))
// OBSOLETE error ("\"%s\": not in executable format: %s",
// OBSOLETE args, bfd_errmsg (bfd_get_error ()));
// OBSOLETE
// OBSOLETE for (section = pbfd->sections; section; section = section->next)
// OBSOLETE {
// OBSOLETE if (bfd_get_section_flags (pbfd, section) & SEC_ALLOC)
// OBSOLETE {
// OBSOLETE bfd_vma section_address;
// OBSOLETE unsigned long section_size;
// OBSOLETE const char *section_name;
// OBSOLETE
// OBSOLETE section_name = bfd_get_section_name (pbfd, section);
// OBSOLETE section_address = bfd_get_section_vma (pbfd, section);
// OBSOLETE section_size = bfd_section_size (pbfd, section);
// OBSOLETE
// OBSOLETE if (bfd_get_section_flags (pbfd, section) & SEC_LOAD)
// OBSOLETE {
// OBSOLETE file_ptr fptr;
// OBSOLETE
// OBSOLETE printf_filtered ("[Loading section %s at %x (%d bytes)]\n",
// OBSOLETE section_name, section_address,
// OBSOLETE section_size);
// OBSOLETE
// OBSOLETE fptr = 0;
// OBSOLETE
// OBSOLETE while (section_size > 0)
// OBSOLETE {
// OBSOLETE char buffer[1024];
// OBSOLETE int count;
// OBSOLETE
// OBSOLETE count = min (section_size, 1024);
// OBSOLETE
// OBSOLETE bfd_get_section_contents (pbfd, section, buffer, fptr,
// OBSOLETE count);
// OBSOLETE
// OBSOLETE serial_write (load_desc, buffer, count);
// OBSOLETE section_address += count;
// OBSOLETE fptr += count;
// OBSOLETE section_size -= count;
// OBSOLETE }
// OBSOLETE }
// OBSOLETE else
// OBSOLETE /* BSS and such */
// OBSOLETE {
// OBSOLETE printf_filtered ("[section %s: not loading]\n",
// OBSOLETE section_name);
// OBSOLETE }
// OBSOLETE }
// OBSOLETE }
// OBSOLETE }
// OBSOLETE else
// OBSOLETE error ("\"%s\": Could not open", args);
// OBSOLETE
// OBSOLETE do_cleanups (old_chain);
// OBSOLETE }
// OBSOLETE
// OBSOLETE /* Open a connection to the remote NetROM devices. */
// OBSOLETE
// OBSOLETE static void
// OBSOLETE nrom_open (char *name, int from_tty)
// OBSOLETE {
// OBSOLETE int errn;
// OBSOLETE
// OBSOLETE if (!name || strchr (name, '/') || strchr (name, ':'))
// OBSOLETE error (
// OBSOLETE "To open a NetROM connection, you must specify the hostname\n\
// OBSOLETE or IP address of the NetROM device you wish to use.");
// OBSOLETE
// OBSOLETE strcpy (nrom_hostname, name);
// OBSOLETE
// OBSOLETE target_preopen (from_tty);
// OBSOLETE
// OBSOLETE unpush_target (&nrom_ops);
// OBSOLETE
// OBSOLETE ctrl_desc = open_socket (nrom_hostname, control_port);
// OBSOLETE
// OBSOLETE push_target (&nrom_ops);
// OBSOLETE
// OBSOLETE if (from_tty)
// OBSOLETE printf_filtered ("Connected to NetROM device \"%s\"\n", nrom_hostname);
// OBSOLETE }
// OBSOLETE
// OBSOLETE /* Close out all files and local state before this target loses control. */
// OBSOLETE
// OBSOLETE static void
// OBSOLETE nrom_close (int quitting)
// OBSOLETE {
// OBSOLETE if (load_desc)
// OBSOLETE serial_close (load_desc);
// OBSOLETE if (ctrl_desc)
// OBSOLETE serial_close (ctrl_desc);
// OBSOLETE }
// OBSOLETE
// OBSOLETE /* Pass arguments directly to the NetROM. */
// OBSOLETE
// OBSOLETE static void
// OBSOLETE nrom_passthru (char *args, int fromtty)
// OBSOLETE {
// OBSOLETE char buf[1024];
// OBSOLETE
// OBSOLETE sprintf (buf, "%s\n", args);
// OBSOLETE if (serial_write (ctrl_desc, buf, strlen (buf)))
// OBSOLETE error ("nrom_reset: control_send() of `%s'failed", args);
// OBSOLETE }
// OBSOLETE
// OBSOLETE static void
// OBSOLETE nrom_mourn (void)
// OBSOLETE {
// OBSOLETE unpush_target (&nrom_ops);
// OBSOLETE generic_mourn_inferior ();
// OBSOLETE }
// OBSOLETE
// OBSOLETE /* Define the target vector. */
// OBSOLETE
// OBSOLETE struct target_ops nrom_ops;
// OBSOLETE
// OBSOLETE static void
// OBSOLETE init_nrom_ops (void)
// OBSOLETE {
// OBSOLETE nrom_ops.to_shortname = "nrom";
// OBSOLETE nrom_ops.to_longname = "Remote XDI `NetROM' target";
// OBSOLETE nrom_ops.to_doc = "Remote debug using a NetROM over Ethernet";
// OBSOLETE nrom_ops.to_open = nrom_open;
// OBSOLETE nrom_ops.to_close = nrom_close;
// OBSOLETE nrom_ops.to_attach = NULL;
// OBSOLETE nrom_ops.to_post_attach = NULL;
// OBSOLETE nrom_ops.to_require_attach = NULL;
// OBSOLETE nrom_ops.to_detach = NULL;
// OBSOLETE nrom_ops.to_require_detach = NULL;
// OBSOLETE nrom_ops.to_resume = NULL;
// OBSOLETE nrom_ops.to_wait = NULL;
// OBSOLETE nrom_ops.to_post_wait = NULL;
// OBSOLETE nrom_ops.to_fetch_registers = NULL;
// OBSOLETE nrom_ops.to_store_registers = NULL;
// OBSOLETE nrom_ops.to_prepare_to_store = NULL;
// OBSOLETE nrom_ops.to_xfer_memory = NULL;
// OBSOLETE nrom_ops.to_files_info = NULL;
// OBSOLETE nrom_ops.to_insert_breakpoint = NULL;
// OBSOLETE nrom_ops.to_remove_breakpoint = NULL;
// OBSOLETE nrom_ops.to_terminal_init = NULL;
// OBSOLETE nrom_ops.to_terminal_inferior = NULL;
// OBSOLETE nrom_ops.to_terminal_ours_for_output = NULL;
// OBSOLETE nrom_ops.to_terminal_ours = NULL;
// OBSOLETE nrom_ops.to_terminal_info = NULL;
// OBSOLETE nrom_ops.to_kill = nrom_kill;
// OBSOLETE nrom_ops.to_load = nrom_load;
// OBSOLETE nrom_ops.to_lookup_symbol = NULL;
// OBSOLETE nrom_ops.to_create_inferior = NULL;
// OBSOLETE nrom_ops.to_post_startup_inferior = NULL;
// OBSOLETE nrom_ops.to_acknowledge_created_inferior = NULL;
// OBSOLETE nrom_ops.to_clone_and_follow_inferior = NULL;
// OBSOLETE nrom_ops.to_post_follow_inferior_by_clone = NULL;
// OBSOLETE nrom_ops.to_insert_fork_catchpoint = NULL;
// OBSOLETE nrom_ops.to_remove_fork_catchpoint = NULL;
// OBSOLETE nrom_ops.to_insert_vfork_catchpoint = NULL;
// OBSOLETE nrom_ops.to_remove_vfork_catchpoint = NULL;
// OBSOLETE nrom_ops.to_has_forked = NULL;
// OBSOLETE nrom_ops.to_has_vforked = NULL;
// OBSOLETE nrom_ops.to_can_follow_vfork_prior_to_exec = NULL;
// OBSOLETE nrom_ops.to_post_follow_vfork = NULL;
// OBSOLETE nrom_ops.to_insert_exec_catchpoint = NULL;
// OBSOLETE nrom_ops.to_remove_exec_catchpoint = NULL;
// OBSOLETE nrom_ops.to_has_execd = NULL;
// OBSOLETE nrom_ops.to_reported_exec_events_per_exec_call = NULL;
// OBSOLETE nrom_ops.to_has_exited = NULL;
// OBSOLETE nrom_ops.to_mourn_inferior = nrom_mourn;
// OBSOLETE nrom_ops.to_can_run = NULL;
// OBSOLETE nrom_ops.to_notice_signals = 0;
// OBSOLETE nrom_ops.to_thread_alive = 0;
// OBSOLETE nrom_ops.to_stop = 0;
// OBSOLETE nrom_ops.to_pid_to_exec_file = NULL;
// OBSOLETE nrom_ops.to_stratum = download_stratum;
// OBSOLETE nrom_ops.DONT_USE = NULL;
// OBSOLETE nrom_ops.to_has_all_memory = 1;
// OBSOLETE nrom_ops.to_has_memory = 1;
// OBSOLETE nrom_ops.to_has_stack = 1;
// OBSOLETE nrom_ops.to_has_registers = 1;
// OBSOLETE nrom_ops.to_has_execution = 0;
// OBSOLETE nrom_ops.to_sections = NULL;
// OBSOLETE nrom_ops.to_sections_end = NULL;
// OBSOLETE nrom_ops.to_magic = OPS_MAGIC;
// OBSOLETE }
// OBSOLETE
// OBSOLETE void
// OBSOLETE _initialize_remote_nrom (void)
// OBSOLETE {
// OBSOLETE init_nrom_ops ();
// OBSOLETE add_target (&nrom_ops);
// OBSOLETE
// OBSOLETE add_show_from_set (
// OBSOLETE add_set_cmd ("nrom_load_port", no_class, var_zinteger, (char *) &load_port,
// OBSOLETE "Set the port to use for NetROM downloads\n", &setlist),
// OBSOLETE &showlist);
// OBSOLETE
// OBSOLETE add_show_from_set (
// OBSOLETE add_set_cmd ("nrom_control_port", no_class, var_zinteger, (char *) &control_port,
// OBSOLETE "Set the port to use for NetROM debugger services\n", &setlist),
// OBSOLETE &showlist);
// OBSOLETE
// OBSOLETE add_cmd ("nrom", no_class, nrom_passthru,
// OBSOLETE "Pass arguments as command to NetROM",
// OBSOLETE &cmdlist);
// OBSOLETE }

File diff suppressed because it is too large Load diff

View file

@ -1,160 +0,0 @@
// OBSOLETE /* i80960-dependent portions of the RPC protocol
// OBSOLETE used with a VxWorks target
// OBSOLETE
// OBSOLETE Contributed by Wind River Systems.
// 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 <stdio.h>
// OBSOLETE #include "defs.h"
// OBSOLETE
// OBSOLETE #include "vx-share/regPacket.h"
// OBSOLETE #include "frame.h"
// OBSOLETE #include "inferior.h"
// OBSOLETE #include "target.h"
// OBSOLETE #include "gdbcore.h"
// OBSOLETE #include "command.h"
// OBSOLETE #include "symtab.h"
// OBSOLETE #include "symfile.h" /* for struct complaint */
// OBSOLETE #include "regcache.h"
// OBSOLETE
// OBSOLETE #include "gdb_string.h"
// OBSOLETE #include <errno.h>
// OBSOLETE #include <fcntl.h>
// OBSOLETE #include <sys/types.h>
// OBSOLETE #include <sys/time.h>
// OBSOLETE #include <sys/socket.h>
// OBSOLETE
// OBSOLETE #ifdef _AIX /* IBM claims "void *malloc()" not char * */
// OBSOLETE #define malloc bogon_malloc
// OBSOLETE #endif
// OBSOLETE
// OBSOLETE #include <rpc/rpc.h>
// OBSOLETE #include <sys/time.h> /* UTek's <rpc/rpc.h> doesn't #incl this */
// OBSOLETE #include <netdb.h>
// OBSOLETE #include "vx-share/ptrace.h"
// OBSOLETE #include "vx-share/xdr_ptrace.h"
// OBSOLETE #include "vx-share/xdr_ld.h"
// OBSOLETE #include "vx-share/xdr_rdb.h"
// OBSOLETE #include "vx-share/dbgRpcLib.h"
// OBSOLETE
// OBSOLETE /* get rid of value.h if possible */
// OBSOLETE #include <value.h>
// OBSOLETE #include <symtab.h>
// OBSOLETE
// OBSOLETE /* Flag set if target has fpu */
// OBSOLETE
// OBSOLETE extern int target_has_fp;
// OBSOLETE
// OBSOLETE /* 960 floating point format descriptor, from "i960-tdep.c." */
// OBSOLETE
// OBSOLETE extern struct ext_format ext_format_i960;
// OBSOLETE
// OBSOLETE /* Generic register read/write routines in remote-vx.c. */
// OBSOLETE
// OBSOLETE extern void net_read_registers ();
// OBSOLETE extern void net_write_registers ();
// OBSOLETE
// OBSOLETE /* Read a register or registers from the VxWorks target.
// OBSOLETE REGNO is the register to read, or -1 for all; currently,
// OBSOLETE it is ignored. FIXME look at regno to improve efficiency. */
// OBSOLETE
// OBSOLETE void
// OBSOLETE vx_read_register (int regno)
// OBSOLETE {
// OBSOLETE char i960_greg_packet[I960_GREG_PLEN];
// OBSOLETE char i960_fpreg_packet[I960_FPREG_PLEN];
// OBSOLETE
// OBSOLETE /* Get general-purpose registers. When copying values into
// OBSOLETE registers [], don't assume that a location in registers []
// OBSOLETE is properly aligned for the target data type. */
// OBSOLETE
// OBSOLETE net_read_registers (i960_greg_packet, I960_GREG_PLEN, PTRACE_GETREGS);
// OBSOLETE
// OBSOLETE bcopy (&i960_greg_packet[I960_R_R0],
// OBSOLETE &registers[REGISTER_BYTE (R0_REGNUM)], 16 * I960_GREG_SIZE);
// OBSOLETE bcopy (&i960_greg_packet[I960_R_G0],
// OBSOLETE &registers[REGISTER_BYTE (G0_REGNUM)], 16 * I960_GREG_SIZE);
// OBSOLETE bcopy (&i960_greg_packet[I960_R_PCW],
// OBSOLETE &registers[REGISTER_BYTE (PCW_REGNUM)], sizeof (int));
// OBSOLETE bcopy (&i960_greg_packet[I960_R_ACW],
// OBSOLETE &registers[REGISTER_BYTE (ACW_REGNUM)], sizeof (int));
// OBSOLETE bcopy (&i960_greg_packet[I960_R_TCW],
// OBSOLETE &registers[REGISTER_BYTE (TCW_REGNUM)], sizeof (int));
// OBSOLETE
// OBSOLETE /* If the target has floating point registers, fetch them.
// OBSOLETE Otherwise, zero the floating point register values in
// OBSOLETE registers[] for good measure, even though we might not
// OBSOLETE need to. */
// OBSOLETE
// OBSOLETE if (target_has_fp)
// OBSOLETE {
// OBSOLETE net_read_registers (i960_fpreg_packet, I960_FPREG_PLEN,
// OBSOLETE PTRACE_GETFPREGS);
// OBSOLETE bcopy (&i960_fpreg_packet[I960_R_FP0],
// OBSOLETE &registers[REGISTER_BYTE (FP0_REGNUM)],
// OBSOLETE REGISTER_RAW_SIZE (FP0_REGNUM) * 4);
// OBSOLETE }
// OBSOLETE else
// OBSOLETE bzero (&registers[REGISTER_BYTE (FP0_REGNUM)],
// OBSOLETE REGISTER_RAW_SIZE (FP0_REGNUM) * 4);
// OBSOLETE
// OBSOLETE /* Mark the register cache valid. */
// OBSOLETE
// OBSOLETE registers_fetched ();
// OBSOLETE }
// OBSOLETE
// OBSOLETE /* Store a register or registers into the VxWorks target.
// OBSOLETE REGNO is the register to store, or -1 for all; currently,
// OBSOLETE it is ignored. FIXME look at regno to improve efficiency. */
// OBSOLETE
// OBSOLETE void
// OBSOLETE vx_write_register (int regno)
// OBSOLETE {
// OBSOLETE char i960_greg_packet[I960_GREG_PLEN];
// OBSOLETE char i960_fpreg_packet[I960_FPREG_PLEN];
// OBSOLETE
// OBSOLETE /* Store floating-point registers. When copying values from
// OBSOLETE registers [], don't assume that a location in registers []
// OBSOLETE is properly aligned for the target data type. */
// OBSOLETE
// OBSOLETE bcopy (&registers[REGISTER_BYTE (R0_REGNUM)],
// OBSOLETE &i960_greg_packet[I960_R_R0], 16 * I960_GREG_SIZE);
// OBSOLETE bcopy (&registers[REGISTER_BYTE (G0_REGNUM)],
// OBSOLETE &i960_greg_packet[I960_R_G0], 16 * I960_GREG_SIZE);
// OBSOLETE bcopy (&registers[REGISTER_BYTE (PCW_REGNUM)],
// OBSOLETE &i960_greg_packet[I960_R_PCW], sizeof (int));
// OBSOLETE bcopy (&registers[REGISTER_BYTE (ACW_REGNUM)],
// OBSOLETE &i960_greg_packet[I960_R_ACW], sizeof (int));
// OBSOLETE bcopy (&registers[REGISTER_BYTE (TCW_REGNUM)],
// OBSOLETE &i960_greg_packet[I960_R_TCW], sizeof (int));
// OBSOLETE
// OBSOLETE net_write_registers (i960_greg_packet, I960_GREG_PLEN, PTRACE_SETREGS);
// OBSOLETE
// OBSOLETE /* Store floating point registers if the target has them. */
// OBSOLETE
// OBSOLETE if (target_has_fp)
// OBSOLETE {
// OBSOLETE bcopy (&registers[REGISTER_BYTE (FP0_REGNUM)],
// OBSOLETE &i960_fpreg_packet[I960_R_FP0],
// OBSOLETE REGISTER_RAW_SIZE (FP0_REGNUM) * 4);
// OBSOLETE
// OBSOLETE net_write_registers (i960_fpreg_packet, I960_FPREG_PLEN,
// OBSOLETE PTRACE_SETFPREGS);
// OBSOLETE }
// OBSOLETE }