* 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-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
+++ /dev/null
-// 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 \f
-// 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 \f
-// 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 \f
-// 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 \f
-// 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 \f
-// 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 \f
-// 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 \f
-// 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 }
+++ /dev/null
-// OBSOLETE /* Parser for GNU CHILL (CCITT High-Level Language) -*- C -*-
-// OBSOLETE Copyright 1992, 1993, 1995, 1996, 1997, 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 /* Parse a Chill expression from text in a string,
-// OBSOLETE and return the result as a struct expression pointer.
-// OBSOLETE That structure contains arithmetic operations in reverse polish,
-// OBSOLETE with constants represented by operations that are followed by special data.
-// OBSOLETE See expression.h for the details of the format.
-// OBSOLETE What is important here is that it can be built up sequentially
-// OBSOLETE during the process of parsing; the lower levels of the tree always
-// OBSOLETE come first in the result.
-// OBSOLETE
-// OBSOLETE Note that the language accepted by this parser is more liberal
-// OBSOLETE than the one accepted by an actual Chill compiler. For example, the
-// OBSOLETE language rule that a simple name string can not be one of the reserved
-// OBSOLETE simple name strings is not enforced (e.g "case" is not treated as a
-// OBSOLETE reserved name). Another example is that Chill is a strongly typed
-// OBSOLETE language, and certain expressions that violate the type constraints
-// OBSOLETE may still be evaluated if gdb can do so in a meaningful manner, while
-// OBSOLETE such expressions would be rejected by the compiler. The reason for
-// OBSOLETE this more liberal behavior is the philosophy that the debugger
-// OBSOLETE is intended to be a tool that is used by the programmer when things
-// OBSOLETE go wrong, and as such, it should provide as few artificial barriers
-// OBSOLETE to it's use as possible. If it can do something meaningful, even
-// OBSOLETE something that violates language contraints that are enforced by the
-// OBSOLETE compiler, it should do so without complaint.
-// OBSOLETE
-// OBSOLETE */
-// OBSOLETE
-// OBSOLETE #include "defs.h"
-// OBSOLETE #include "gdb_string.h"
-// OBSOLETE #include <ctype.h>
-// OBSOLETE #include "expression.h"
-// OBSOLETE #include "language.h"
-// OBSOLETE #include "value.h"
-// OBSOLETE #include "parser-defs.h"
-// OBSOLETE #include "ch-lang.h"
-// OBSOLETE #include "bfd.h" /* Required by objfiles.h. */
-// OBSOLETE #include "symfile.h" /* Required by objfiles.h. */
-// OBSOLETE #include "objfiles.h" /* For have_full_symbols and have_partial_symbols */
-// OBSOLETE
-// OBSOLETE #ifdef __GNUC__
-// OBSOLETE #define INLINE __inline__
-// OBSOLETE #endif
-// OBSOLETE
-// OBSOLETE typedef union
-// OBSOLETE
-// OBSOLETE {
-// OBSOLETE LONGEST lval;
-// OBSOLETE ULONGEST ulval;
-// OBSOLETE struct
-// OBSOLETE {
-// OBSOLETE LONGEST val;
-// OBSOLETE struct type *type;
-// OBSOLETE }
-// OBSOLETE typed_val;
-// OBSOLETE double dval;
-// OBSOLETE struct symbol *sym;
-// OBSOLETE struct type *tval;
-// OBSOLETE struct stoken sval;
-// OBSOLETE struct ttype tsym;
-// OBSOLETE struct symtoken ssym;
-// OBSOLETE }
-// OBSOLETE YYSTYPE;
-// OBSOLETE
-// OBSOLETE enum ch_terminal
-// OBSOLETE {
-// OBSOLETE END_TOKEN = 0,
-// OBSOLETE /* '\001' ... '\xff' come first. */
-// OBSOLETE OPEN_PAREN = '(',
-// OBSOLETE TOKEN_NOT_READ = 999,
-// OBSOLETE INTEGER_LITERAL,
-// OBSOLETE BOOLEAN_LITERAL,
-// OBSOLETE CHARACTER_LITERAL,
-// OBSOLETE FLOAT_LITERAL,
-// OBSOLETE GENERAL_PROCEDURE_NAME,
-// OBSOLETE LOCATION_NAME,
-// OBSOLETE EMPTINESS_LITERAL,
-// OBSOLETE CHARACTER_STRING_LITERAL,
-// OBSOLETE BIT_STRING_LITERAL,
-// OBSOLETE TYPENAME,
-// OBSOLETE DOT_FIELD_NAME, /* '.' followed by <field name> */
-// OBSOLETE CASE,
-// OBSOLETE OF,
-// OBSOLETE ESAC,
-// OBSOLETE LOGIOR,
-// OBSOLETE ORIF,
-// OBSOLETE LOGXOR,
-// OBSOLETE LOGAND,
-// OBSOLETE ANDIF,
-// OBSOLETE NOTEQUAL,
-// OBSOLETE GEQ,
-// OBSOLETE LEQ,
-// OBSOLETE IN,
-// OBSOLETE SLASH_SLASH,
-// OBSOLETE MOD,
-// OBSOLETE REM,
-// OBSOLETE NOT,
-// OBSOLETE POINTER,
-// OBSOLETE RECEIVE,
-// OBSOLETE UP,
-// OBSOLETE IF,
-// OBSOLETE THEN,
-// OBSOLETE ELSE,
-// OBSOLETE FI,
-// OBSOLETE ELSIF,
-// OBSOLETE ILLEGAL_TOKEN,
-// OBSOLETE NUM,
-// OBSOLETE PRED,
-// OBSOLETE SUCC,
-// OBSOLETE ABS,
-// OBSOLETE CARD,
-// OBSOLETE MAX_TOKEN,
-// OBSOLETE MIN_TOKEN,
-// OBSOLETE ADDR_TOKEN,
-// OBSOLETE SIZE,
-// OBSOLETE UPPER,
-// OBSOLETE LOWER,
-// OBSOLETE LENGTH,
-// OBSOLETE ARRAY,
-// OBSOLETE GDB_VARIABLE,
-// OBSOLETE GDB_ASSIGNMENT
-// OBSOLETE };
-// OBSOLETE
-// OBSOLETE /* Forward declarations. */
-// OBSOLETE
-// OBSOLETE static void write_lower_upper_value (enum exp_opcode, struct type *);
-// OBSOLETE static enum ch_terminal match_bitstring_literal (void);
-// OBSOLETE static enum ch_terminal match_integer_literal (void);
-// OBSOLETE static enum ch_terminal match_character_literal (void);
-// OBSOLETE static enum ch_terminal match_string_literal (void);
-// OBSOLETE static enum ch_terminal match_float_literal (void);
-// OBSOLETE static int decode_integer_literal (LONGEST *, char **);
-// OBSOLETE static int decode_integer_value (int, char **, LONGEST *);
-// OBSOLETE static char *match_simple_name_string (void);
-// OBSOLETE static void growbuf_by_size (int);
-// OBSOLETE static void parse_case_label (void);
-// OBSOLETE static void parse_untyped_expr (void);
-// OBSOLETE static void parse_if_expression (void);
-// OBSOLETE static void parse_if_expression_body (void);
-// OBSOLETE static void parse_else_alternative (void);
-// OBSOLETE static void parse_then_alternative (void);
-// OBSOLETE static void parse_expr (void);
-// OBSOLETE static void parse_operand0 (void);
-// OBSOLETE static void parse_operand1 (void);
-// OBSOLETE static void parse_operand2 (void);
-// OBSOLETE static void parse_operand3 (void);
-// OBSOLETE static void parse_operand4 (void);
-// OBSOLETE static void parse_operand5 (void);
-// OBSOLETE static void parse_operand6 (void);
-// OBSOLETE static void parse_primval (void);
-// OBSOLETE static void parse_tuple (struct type *);
-// OBSOLETE static void parse_opt_element_list (struct type *);
-// OBSOLETE static void parse_tuple_element (struct type *);
-// OBSOLETE static void parse_named_record_element (void);
-// OBSOLETE static void parse_call (void);
-// OBSOLETE static struct type *parse_mode_or_normal_call (void);
-// OBSOLETE #if 0
-// OBSOLETE static struct type *parse_mode_call (void);
-// OBSOLETE #endif
-// OBSOLETE static void parse_unary_call (void);
-// OBSOLETE static int parse_opt_untyped_expr (void);
-// OBSOLETE static int expect (enum ch_terminal, char *);
-// OBSOLETE static enum ch_terminal ch_lex (void);
-// OBSOLETE INLINE static enum ch_terminal PEEK_TOKEN (void);
-// OBSOLETE static enum ch_terminal peek_token_ (int);
-// OBSOLETE static void forward_token_ (void);
-// OBSOLETE static void require (enum ch_terminal);
-// OBSOLETE static int check_token (enum ch_terminal);
-// OBSOLETE
-// OBSOLETE #define MAX_LOOK_AHEAD 2
-// OBSOLETE static enum ch_terminal terminal_buffer[MAX_LOOK_AHEAD + 1] =
-// OBSOLETE {
-// OBSOLETE TOKEN_NOT_READ, TOKEN_NOT_READ, TOKEN_NOT_READ};
-// OBSOLETE static YYSTYPE yylval;
-// OBSOLETE static YYSTYPE val_buffer[MAX_LOOK_AHEAD + 1];
-// OBSOLETE
-// OBSOLETE /*int current_token, lookahead_token; */
-// OBSOLETE
-// OBSOLETE INLINE static enum ch_terminal
-// OBSOLETE PEEK_TOKEN (void)
-// OBSOLETE {
-// OBSOLETE if (terminal_buffer[0] == TOKEN_NOT_READ)
-// OBSOLETE {
-// OBSOLETE terminal_buffer[0] = ch_lex ();
-// OBSOLETE val_buffer[0] = yylval;
-// OBSOLETE }
-// OBSOLETE return terminal_buffer[0];
-// OBSOLETE }
-// OBSOLETE #define PEEK_LVAL() val_buffer[0]
-// OBSOLETE #define PEEK_TOKEN1() peek_token_(1)
-// OBSOLETE #define PEEK_TOKEN2() peek_token_(2)
-// OBSOLETE static enum ch_terminal
-// OBSOLETE peek_token_ (int i)
-// OBSOLETE {
-// OBSOLETE if (i > MAX_LOOK_AHEAD)
-// OBSOLETE internal_error (__FILE__, __LINE__,
-// OBSOLETE "too much lookahead");
-// OBSOLETE if (terminal_buffer[i] == TOKEN_NOT_READ)
-// OBSOLETE {
-// OBSOLETE terminal_buffer[i] = ch_lex ();
-// OBSOLETE val_buffer[i] = yylval;
-// OBSOLETE }
-// OBSOLETE return terminal_buffer[i];
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE #if 0
-// OBSOLETE
-// OBSOLETE static void
-// OBSOLETE pushback_token (enum ch_terminal code, YYSTYPE node)
-// OBSOLETE {
-// OBSOLETE int i;
-// OBSOLETE if (terminal_buffer[MAX_LOOK_AHEAD] != TOKEN_NOT_READ)
-// OBSOLETE internal_error (__FILE__, __LINE__,
-// OBSOLETE "cannot pushback token");
-// OBSOLETE for (i = MAX_LOOK_AHEAD; i > 0; i--)
-// OBSOLETE {
-// OBSOLETE terminal_buffer[i] = terminal_buffer[i - 1];
-// OBSOLETE val_buffer[i] = val_buffer[i - 1];
-// OBSOLETE }
-// OBSOLETE terminal_buffer[0] = code;
-// OBSOLETE val_buffer[0] = node;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE #endif
-// OBSOLETE
-// OBSOLETE static void
-// OBSOLETE forward_token_ (void)
-// OBSOLETE {
-// OBSOLETE int i;
-// OBSOLETE for (i = 0; i < MAX_LOOK_AHEAD; i++)
-// OBSOLETE {
-// OBSOLETE terminal_buffer[i] = terminal_buffer[i + 1];
-// OBSOLETE val_buffer[i] = val_buffer[i + 1];
-// OBSOLETE }
-// OBSOLETE terminal_buffer[MAX_LOOK_AHEAD] = TOKEN_NOT_READ;
-// OBSOLETE }
-// OBSOLETE #define FORWARD_TOKEN() forward_token_()
-// OBSOLETE
-// OBSOLETE /* Skip the next token.
-// OBSOLETE if it isn't TOKEN, the parser is broken. */
-// OBSOLETE
-// OBSOLETE static void
-// OBSOLETE require (enum ch_terminal token)
-// OBSOLETE {
-// OBSOLETE if (PEEK_TOKEN () != token)
-// OBSOLETE {
-// OBSOLETE internal_error (__FILE__, __LINE__,
-// OBSOLETE "expected token %d", (int) token);
-// OBSOLETE }
-// OBSOLETE FORWARD_TOKEN ();
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE static int
-// OBSOLETE check_token (enum ch_terminal token)
-// OBSOLETE {
-// OBSOLETE if (PEEK_TOKEN () != token)
-// OBSOLETE return 0;
-// OBSOLETE FORWARD_TOKEN ();
-// OBSOLETE return 1;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* return 0 if expected token was not found,
-// OBSOLETE else return 1.
-// OBSOLETE */
-// OBSOLETE static int
-// OBSOLETE expect (enum ch_terminal token, char *message)
-// OBSOLETE {
-// OBSOLETE if (PEEK_TOKEN () != token)
-// OBSOLETE {
-// OBSOLETE if (message)
-// OBSOLETE error (message);
-// OBSOLETE else if (token < 256)
-// OBSOLETE error ("syntax error - expected a '%c' here \"%s\"", token, lexptr);
-// OBSOLETE else
-// OBSOLETE error ("syntax error");
-// OBSOLETE return 0;
-// OBSOLETE }
-// OBSOLETE else
-// OBSOLETE FORWARD_TOKEN ();
-// OBSOLETE return 1;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE #if 0
-// OBSOLETE /* Parse a name string. If ALLOW_ALL is 1, ALL is allowed as a postfix. */
-// OBSOLETE
-// OBSOLETE static tree
-// OBSOLETE parse_opt_name_string (int allow_all)
-// OBSOLETE {
-// OBSOLETE int token = PEEK_TOKEN ();
-// OBSOLETE tree name;
-// OBSOLETE if (token != NAME)
-// OBSOLETE {
-// OBSOLETE if (token == ALL && allow_all)
-// OBSOLETE {
-// OBSOLETE FORWARD_TOKEN ();
-// OBSOLETE return ALL_POSTFIX;
-// OBSOLETE }
-// OBSOLETE return NULL_TREE;
-// OBSOLETE }
-// OBSOLETE name = PEEK_LVAL ();
-// OBSOLETE for (;;)
-// OBSOLETE {
-// OBSOLETE FORWARD_TOKEN ();
-// OBSOLETE token = PEEK_TOKEN ();
-// OBSOLETE if (token != '!')
-// OBSOLETE return name;
-// OBSOLETE FORWARD_TOKEN ();
-// OBSOLETE token = PEEK_TOKEN ();
-// OBSOLETE if (token == ALL && allow_all)
-// OBSOLETE return get_identifier3 (IDENTIFIER_POINTER (name), "!", "*");
-// OBSOLETE if (token != NAME)
-// OBSOLETE {
-// OBSOLETE if (pass == 1)
-// OBSOLETE error ("'%s!' is not followed by an identifier",
-// OBSOLETE IDENTIFIER_POINTER (name));
-// OBSOLETE return name;
-// OBSOLETE }
-// OBSOLETE name = get_identifier3 (IDENTIFIER_POINTER (name),
-// OBSOLETE "!", IDENTIFIER_POINTER (PEEK_LVAL ()));
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE static tree
-// OBSOLETE parse_simple_name_string (void)
-// OBSOLETE {
-// OBSOLETE int token = PEEK_TOKEN ();
-// OBSOLETE tree name;
-// OBSOLETE if (token != NAME)
-// OBSOLETE {
-// OBSOLETE error ("expected a name here");
-// OBSOLETE return error_mark_node;
-// OBSOLETE }
-// OBSOLETE name = PEEK_LVAL ();
-// OBSOLETE FORWARD_TOKEN ();
-// OBSOLETE return name;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE static tree
-// OBSOLETE parse_name_string (void)
-// OBSOLETE {
-// OBSOLETE tree name = parse_opt_name_string (0);
-// OBSOLETE if (name)
-// OBSOLETE return name;
-// OBSOLETE if (pass == 1)
-// OBSOLETE error ("expected a name string here");
-// OBSOLETE return error_mark_node;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Matches: <name_string>
-// OBSOLETE Returns if pass 1: the identifier.
-// OBSOLETE Returns if pass 2: a decl or value for identifier. */
-// OBSOLETE
-// OBSOLETE static tree
-// OBSOLETE parse_name (void)
-// OBSOLETE {
-// OBSOLETE tree name = parse_name_string ();
-// OBSOLETE if (pass == 1 || ignoring)
-// OBSOLETE return name;
-// OBSOLETE else
-// OBSOLETE {
-// OBSOLETE tree decl = lookup_name (name);
-// OBSOLETE if (decl == NULL_TREE)
-// OBSOLETE {
-// OBSOLETE error ("`%s' undeclared", IDENTIFIER_POINTER (name));
-// OBSOLETE return error_mark_node;
-// OBSOLETE }
-// OBSOLETE else if (TREE_CODE (TREE_TYPE (decl)) == ERROR_MARK)
-// OBSOLETE return error_mark_node;
-// OBSOLETE else if (TREE_CODE (decl) == CONST_DECL)
-// OBSOLETE return DECL_INITIAL (decl);
-// OBSOLETE else if (TREE_CODE (TREE_TYPE (decl)) == REFERENCE_TYPE)
-// OBSOLETE return convert_from_reference (decl);
-// OBSOLETE else
-// OBSOLETE return decl;
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE #endif
-// OBSOLETE
-// OBSOLETE #if 0
-// OBSOLETE static void
-// OBSOLETE pushback_paren_expr (tree expr)
-// OBSOLETE {
-// OBSOLETE if (pass == 1 && !ignoring)
-// OBSOLETE expr = build1 (PAREN_EXPR, NULL_TREE, expr);
-// OBSOLETE pushback_token (EXPR, expr);
-// OBSOLETE }
-// OBSOLETE #endif
-// OBSOLETE
-// OBSOLETE /* Matches: <case label> */
-// OBSOLETE
-// OBSOLETE static void
-// OBSOLETE parse_case_label (void)
-// OBSOLETE {
-// OBSOLETE if (check_token (ELSE))
-// OBSOLETE error ("ELSE in tuples labels not implemented");
-// OBSOLETE /* Does not handle the case of a mode name. FIXME */
-// OBSOLETE parse_expr ();
-// OBSOLETE if (check_token (':'))
-// OBSOLETE {
-// OBSOLETE parse_expr ();
-// OBSOLETE write_exp_elt_opcode (BINOP_RANGE);
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE static int
-// OBSOLETE parse_opt_untyped_expr (void)
-// OBSOLETE {
-// OBSOLETE switch (PEEK_TOKEN ())
-// OBSOLETE {
-// OBSOLETE case ',':
-// OBSOLETE case ':':
-// OBSOLETE case ')':
-// OBSOLETE return 0;
-// OBSOLETE default:
-// OBSOLETE parse_untyped_expr ();
-// OBSOLETE return 1;
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE static void
-// OBSOLETE parse_unary_call (void)
-// OBSOLETE {
-// OBSOLETE FORWARD_TOKEN ();
-// OBSOLETE expect ('(', NULL);
-// OBSOLETE parse_expr ();
-// OBSOLETE expect (')', NULL);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Parse NAME '(' MODENAME ')'. */
-// OBSOLETE
-// OBSOLETE #if 0
-// OBSOLETE
-// OBSOLETE static struct type *
-// OBSOLETE parse_mode_call (void)
-// OBSOLETE {
-// OBSOLETE struct type *type;
-// OBSOLETE FORWARD_TOKEN ();
-// OBSOLETE expect ('(', NULL);
-// OBSOLETE if (PEEK_TOKEN () != TYPENAME)
-// OBSOLETE error ("expect MODENAME here `%s'", lexptr);
-// OBSOLETE type = PEEK_LVAL ().tsym.type;
-// OBSOLETE FORWARD_TOKEN ();
-// OBSOLETE expect (')', NULL);
-// OBSOLETE return type;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE #endif
-// OBSOLETE
-// OBSOLETE static struct type *
-// OBSOLETE parse_mode_or_normal_call (void)
-// OBSOLETE {
-// OBSOLETE struct type *type;
-// OBSOLETE FORWARD_TOKEN ();
-// OBSOLETE expect ('(', NULL);
-// OBSOLETE if (PEEK_TOKEN () == TYPENAME)
-// OBSOLETE {
-// OBSOLETE type = PEEK_LVAL ().tsym.type;
-// OBSOLETE FORWARD_TOKEN ();
-// OBSOLETE }
-// OBSOLETE else
-// OBSOLETE {
-// OBSOLETE parse_expr ();
-// OBSOLETE type = NULL;
-// OBSOLETE }
-// OBSOLETE expect (')', NULL);
-// OBSOLETE return type;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Parse something that looks like a function call.
-// OBSOLETE Assume we have parsed the function, and are at the '('. */
-// OBSOLETE
-// OBSOLETE static void
-// OBSOLETE parse_call (void)
-// OBSOLETE {
-// OBSOLETE int arg_count;
-// OBSOLETE require ('(');
-// OBSOLETE /* This is to save the value of arglist_len
-// OBSOLETE being accumulated for each dimension. */
-// OBSOLETE start_arglist ();
-// OBSOLETE if (parse_opt_untyped_expr ())
-// OBSOLETE {
-// OBSOLETE int tok = PEEK_TOKEN ();
-// OBSOLETE arglist_len = 1;
-// OBSOLETE if (tok == UP || tok == ':')
-// OBSOLETE {
-// OBSOLETE FORWARD_TOKEN ();
-// OBSOLETE parse_expr ();
-// OBSOLETE expect (')', "expected ')' to terminate slice");
-// OBSOLETE end_arglist ();
-// OBSOLETE write_exp_elt_opcode (tok == UP ? TERNOP_SLICE_COUNT
-// OBSOLETE : TERNOP_SLICE);
-// OBSOLETE return;
-// OBSOLETE }
-// OBSOLETE while (check_token (','))
-// OBSOLETE {
-// OBSOLETE parse_untyped_expr ();
-// OBSOLETE arglist_len++;
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE else
-// OBSOLETE arglist_len = 0;
-// OBSOLETE expect (')', NULL);
-// OBSOLETE arg_count = end_arglist ();
-// OBSOLETE write_exp_elt_opcode (MULTI_SUBSCRIPT);
-// OBSOLETE write_exp_elt_longcst (arg_count);
-// OBSOLETE write_exp_elt_opcode (MULTI_SUBSCRIPT);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE static void
-// OBSOLETE parse_named_record_element (void)
-// OBSOLETE {
-// OBSOLETE struct stoken label;
-// OBSOLETE char buf[256];
-// OBSOLETE
-// OBSOLETE label = PEEK_LVAL ().sval;
-// OBSOLETE sprintf (buf, "expected a field name here `%s'", lexptr);
-// OBSOLETE expect (DOT_FIELD_NAME, buf);
-// OBSOLETE if (check_token (','))
-// OBSOLETE parse_named_record_element ();
-// OBSOLETE else if (check_token (':'))
-// OBSOLETE parse_expr ();
-// OBSOLETE else
-// OBSOLETE error ("syntax error near `%s' in named record tuple element", lexptr);
-// OBSOLETE write_exp_elt_opcode (OP_LABELED);
-// OBSOLETE write_exp_string (label);
-// OBSOLETE write_exp_elt_opcode (OP_LABELED);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Returns one or more TREE_LIST nodes, in reverse order. */
-// OBSOLETE
-// OBSOLETE static void
-// OBSOLETE parse_tuple_element (struct type *type)
-// OBSOLETE {
-// OBSOLETE if (PEEK_TOKEN () == DOT_FIELD_NAME)
-// OBSOLETE {
-// OBSOLETE /* Parse a labelled structure tuple. */
-// OBSOLETE parse_named_record_element ();
-// OBSOLETE return;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE if (check_token ('('))
-// OBSOLETE {
-// OBSOLETE if (check_token ('*'))
-// OBSOLETE {
-// OBSOLETE expect (')', "missing ')' after '*' case label list");
-// OBSOLETE if (type)
-// OBSOLETE {
-// OBSOLETE if (TYPE_CODE (type) == TYPE_CODE_ARRAY)
-// OBSOLETE {
-// OBSOLETE /* do this as a range from low to high */
-// OBSOLETE struct type *range_type = TYPE_FIELD_TYPE (type, 0);
-// OBSOLETE LONGEST low_bound, high_bound;
-// OBSOLETE if (get_discrete_bounds (range_type, &low_bound, &high_bound) < 0)
-// OBSOLETE error ("cannot determine bounds for (*)");
-// OBSOLETE /* lower bound */
-// OBSOLETE write_exp_elt_opcode (OP_LONG);
-// OBSOLETE write_exp_elt_type (range_type);
-// OBSOLETE write_exp_elt_longcst (low_bound);
-// OBSOLETE write_exp_elt_opcode (OP_LONG);
-// OBSOLETE /* upper bound */
-// OBSOLETE write_exp_elt_opcode (OP_LONG);
-// OBSOLETE write_exp_elt_type (range_type);
-// OBSOLETE write_exp_elt_longcst (high_bound);
-// OBSOLETE write_exp_elt_opcode (OP_LONG);
-// OBSOLETE write_exp_elt_opcode (BINOP_RANGE);
-// OBSOLETE }
-// OBSOLETE else
-// OBSOLETE error ("(*) in invalid context");
-// OBSOLETE }
-// OBSOLETE else
-// OBSOLETE error ("(*) only possible with modename in front of tuple (mode[..])");
-// OBSOLETE }
-// OBSOLETE else
-// OBSOLETE {
-// OBSOLETE parse_case_label ();
-// OBSOLETE while (check_token (','))
-// OBSOLETE {
-// OBSOLETE parse_case_label ();
-// OBSOLETE write_exp_elt_opcode (BINOP_COMMA);
-// OBSOLETE }
-// OBSOLETE expect (')', NULL);
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE else
-// OBSOLETE parse_untyped_expr ();
-// OBSOLETE if (check_token (':'))
-// OBSOLETE {
-// OBSOLETE /* A powerset range or a labeled Array. */
-// OBSOLETE parse_untyped_expr ();
-// OBSOLETE write_exp_elt_opcode (BINOP_RANGE);
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Matches: a COMMA-separated list of tuple elements.
-// OBSOLETE Returns a list (of TREE_LIST nodes). */
-// OBSOLETE static void
-// OBSOLETE parse_opt_element_list (struct type *type)
-// OBSOLETE {
-// OBSOLETE arglist_len = 0;
-// OBSOLETE if (PEEK_TOKEN () == ']')
-// OBSOLETE return;
-// OBSOLETE for (;;)
-// OBSOLETE {
-// OBSOLETE parse_tuple_element (type);
-// OBSOLETE arglist_len++;
-// OBSOLETE if (PEEK_TOKEN () == ']')
-// OBSOLETE break;
-// OBSOLETE if (!check_token (','))
-// OBSOLETE error ("bad syntax in tuple");
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Parses: '[' elements ']'
-// OBSOLETE If modename is non-NULL it prefixed the tuple. */
-// OBSOLETE
-// OBSOLETE static void
-// OBSOLETE parse_tuple (struct type *mode)
-// OBSOLETE {
-// OBSOLETE struct type *type;
-// OBSOLETE if (mode)
-// OBSOLETE type = check_typedef (mode);
-// OBSOLETE else
-// OBSOLETE type = 0;
-// OBSOLETE require ('[');
-// OBSOLETE start_arglist ();
-// OBSOLETE parse_opt_element_list (type);
-// OBSOLETE expect (']', "missing ']' after tuple");
-// OBSOLETE write_exp_elt_opcode (OP_ARRAY);
-// OBSOLETE write_exp_elt_longcst ((LONGEST) 0);
-// OBSOLETE write_exp_elt_longcst ((LONGEST) end_arglist () - 1);
-// OBSOLETE write_exp_elt_opcode (OP_ARRAY);
-// OBSOLETE if (type)
-// OBSOLETE {
-// OBSOLETE if (TYPE_CODE (type) != TYPE_CODE_ARRAY
-// OBSOLETE && TYPE_CODE (type) != TYPE_CODE_STRUCT
-// OBSOLETE && TYPE_CODE (type) != TYPE_CODE_SET)
-// OBSOLETE error ("invalid tuple mode");
-// OBSOLETE write_exp_elt_opcode (UNOP_CAST);
-// OBSOLETE write_exp_elt_type (mode);
-// OBSOLETE write_exp_elt_opcode (UNOP_CAST);
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE static void
-// OBSOLETE parse_primval (void)
-// OBSOLETE {
-// OBSOLETE struct type *type;
-// OBSOLETE enum exp_opcode op;
-// OBSOLETE char *op_name;
-// OBSOLETE switch (PEEK_TOKEN ())
-// OBSOLETE {
-// OBSOLETE case INTEGER_LITERAL:
-// OBSOLETE case CHARACTER_LITERAL:
-// OBSOLETE write_exp_elt_opcode (OP_LONG);
-// OBSOLETE write_exp_elt_type (PEEK_LVAL ().typed_val.type);
-// OBSOLETE write_exp_elt_longcst (PEEK_LVAL ().typed_val.val);
-// OBSOLETE write_exp_elt_opcode (OP_LONG);
-// OBSOLETE FORWARD_TOKEN ();
-// OBSOLETE break;
-// OBSOLETE case BOOLEAN_LITERAL:
-// OBSOLETE write_exp_elt_opcode (OP_BOOL);
-// OBSOLETE write_exp_elt_longcst ((LONGEST) PEEK_LVAL ().ulval);
-// OBSOLETE write_exp_elt_opcode (OP_BOOL);
-// OBSOLETE FORWARD_TOKEN ();
-// OBSOLETE break;
-// OBSOLETE case FLOAT_LITERAL:
-// OBSOLETE write_exp_elt_opcode (OP_DOUBLE);
-// OBSOLETE write_exp_elt_type (builtin_type_double);
-// OBSOLETE write_exp_elt_dblcst (PEEK_LVAL ().dval);
-// OBSOLETE write_exp_elt_opcode (OP_DOUBLE);
-// OBSOLETE FORWARD_TOKEN ();
-// OBSOLETE break;
-// OBSOLETE case EMPTINESS_LITERAL:
-// OBSOLETE write_exp_elt_opcode (OP_LONG);
-// OBSOLETE write_exp_elt_type (lookup_pointer_type (builtin_type_void));
-// OBSOLETE write_exp_elt_longcst (0);
-// OBSOLETE write_exp_elt_opcode (OP_LONG);
-// OBSOLETE FORWARD_TOKEN ();
-// OBSOLETE break;
-// OBSOLETE case CHARACTER_STRING_LITERAL:
-// OBSOLETE write_exp_elt_opcode (OP_STRING);
-// OBSOLETE write_exp_string (PEEK_LVAL ().sval);
-// OBSOLETE write_exp_elt_opcode (OP_STRING);
-// OBSOLETE FORWARD_TOKEN ();
-// OBSOLETE break;
-// OBSOLETE case BIT_STRING_LITERAL:
-// OBSOLETE write_exp_elt_opcode (OP_BITSTRING);
-// OBSOLETE write_exp_bitstring (PEEK_LVAL ().sval);
-// OBSOLETE write_exp_elt_opcode (OP_BITSTRING);
-// OBSOLETE FORWARD_TOKEN ();
-// OBSOLETE break;
-// OBSOLETE case ARRAY:
-// OBSOLETE FORWARD_TOKEN ();
-// OBSOLETE /* This is pseudo-Chill, similar to C's '(TYPE[])EXPR'
-// OBSOLETE which casts to an artificial array. */
-// OBSOLETE expect ('(', NULL);
-// OBSOLETE expect (')', NULL);
-// OBSOLETE if (PEEK_TOKEN () != TYPENAME)
-// OBSOLETE error ("missing MODENAME after ARRAY()");
-// OBSOLETE type = PEEK_LVAL ().tsym.type;
-// OBSOLETE FORWARD_TOKEN ();
-// OBSOLETE expect ('(', NULL);
-// OBSOLETE parse_expr ();
-// OBSOLETE expect (')', "missing right parenthesis");
-// OBSOLETE type = create_array_type ((struct type *) NULL, type,
-// OBSOLETE create_range_type ((struct type *) NULL,
-// OBSOLETE builtin_type_int, 0, 0));
-// OBSOLETE TYPE_ARRAY_UPPER_BOUND_TYPE (type) = BOUND_CANNOT_BE_DETERMINED;
-// OBSOLETE write_exp_elt_opcode (UNOP_CAST);
-// OBSOLETE write_exp_elt_type (type);
-// OBSOLETE write_exp_elt_opcode (UNOP_CAST);
-// OBSOLETE break;
-// OBSOLETE #if 0
-// OBSOLETE case CONST:
-// OBSOLETE case EXPR:
-// OBSOLETE val = PEEK_LVAL ();
-// OBSOLETE FORWARD_TOKEN ();
-// OBSOLETE break;
-// OBSOLETE #endif
-// OBSOLETE case '(':
-// OBSOLETE FORWARD_TOKEN ();
-// OBSOLETE parse_expr ();
-// OBSOLETE expect (')', "missing right parenthesis");
-// OBSOLETE break;
-// OBSOLETE case '[':
-// OBSOLETE parse_tuple (NULL);
-// OBSOLETE break;
-// OBSOLETE case GENERAL_PROCEDURE_NAME:
-// OBSOLETE case LOCATION_NAME:
-// OBSOLETE write_exp_elt_opcode (OP_VAR_VALUE);
-// OBSOLETE write_exp_elt_block (NULL);
-// OBSOLETE write_exp_elt_sym (PEEK_LVAL ().ssym.sym);
-// OBSOLETE write_exp_elt_opcode (OP_VAR_VALUE);
-// OBSOLETE FORWARD_TOKEN ();
-// OBSOLETE break;
-// OBSOLETE case GDB_VARIABLE: /* gdb specific */
-// OBSOLETE FORWARD_TOKEN ();
-// OBSOLETE break;
-// OBSOLETE case NUM:
-// OBSOLETE parse_unary_call ();
-// OBSOLETE write_exp_elt_opcode (UNOP_CAST);
-// OBSOLETE write_exp_elt_type (builtin_type_int);
-// OBSOLETE write_exp_elt_opcode (UNOP_CAST);
-// OBSOLETE break;
-// OBSOLETE case CARD:
-// OBSOLETE parse_unary_call ();
-// OBSOLETE write_exp_elt_opcode (UNOP_CARD);
-// OBSOLETE break;
-// OBSOLETE case MAX_TOKEN:
-// OBSOLETE parse_unary_call ();
-// OBSOLETE write_exp_elt_opcode (UNOP_CHMAX);
-// OBSOLETE break;
-// OBSOLETE case MIN_TOKEN:
-// OBSOLETE parse_unary_call ();
-// OBSOLETE write_exp_elt_opcode (UNOP_CHMIN);
-// OBSOLETE break;
-// OBSOLETE case PRED:
-// OBSOLETE op_name = "PRED";
-// OBSOLETE goto unimplemented_unary_builtin;
-// OBSOLETE case SUCC:
-// OBSOLETE op_name = "SUCC";
-// OBSOLETE goto unimplemented_unary_builtin;
-// OBSOLETE case ABS:
-// OBSOLETE op_name = "ABS";
-// OBSOLETE goto unimplemented_unary_builtin;
-// OBSOLETE unimplemented_unary_builtin:
-// OBSOLETE parse_unary_call ();
-// OBSOLETE error ("not implemented: %s builtin function", op_name);
-// OBSOLETE break;
-// OBSOLETE case ADDR_TOKEN:
-// OBSOLETE parse_unary_call ();
-// OBSOLETE write_exp_elt_opcode (UNOP_ADDR);
-// OBSOLETE break;
-// OBSOLETE case SIZE:
-// OBSOLETE type = parse_mode_or_normal_call ();
-// OBSOLETE if (type)
-// OBSOLETE {
-// OBSOLETE write_exp_elt_opcode (OP_LONG);
-// OBSOLETE write_exp_elt_type (builtin_type_int);
-// OBSOLETE CHECK_TYPEDEF (type);
-// OBSOLETE write_exp_elt_longcst ((LONGEST) TYPE_LENGTH (type));
-// OBSOLETE write_exp_elt_opcode (OP_LONG);
-// OBSOLETE }
-// OBSOLETE else
-// OBSOLETE write_exp_elt_opcode (UNOP_SIZEOF);
-// OBSOLETE break;
-// OBSOLETE case LOWER:
-// OBSOLETE op = UNOP_LOWER;
-// OBSOLETE goto lower_upper;
-// OBSOLETE case UPPER:
-// OBSOLETE op = UNOP_UPPER;
-// OBSOLETE goto lower_upper;
-// OBSOLETE lower_upper:
-// OBSOLETE type = parse_mode_or_normal_call ();
-// OBSOLETE write_lower_upper_value (op, type);
-// OBSOLETE break;
-// OBSOLETE case LENGTH:
-// OBSOLETE parse_unary_call ();
-// OBSOLETE write_exp_elt_opcode (UNOP_LENGTH);
-// OBSOLETE break;
-// OBSOLETE case TYPENAME:
-// OBSOLETE type = PEEK_LVAL ().tsym.type;
-// OBSOLETE FORWARD_TOKEN ();
-// OBSOLETE switch (PEEK_TOKEN ())
-// OBSOLETE {
-// OBSOLETE case '[':
-// OBSOLETE parse_tuple (type);
-// OBSOLETE break;
-// OBSOLETE case '(':
-// OBSOLETE FORWARD_TOKEN ();
-// OBSOLETE parse_expr ();
-// OBSOLETE expect (')', "missing right parenthesis");
-// OBSOLETE write_exp_elt_opcode (UNOP_CAST);
-// OBSOLETE write_exp_elt_type (type);
-// OBSOLETE write_exp_elt_opcode (UNOP_CAST);
-// OBSOLETE break;
-// OBSOLETE default:
-// OBSOLETE error ("typename in invalid context");
-// OBSOLETE }
-// OBSOLETE break;
-// OBSOLETE
-// OBSOLETE default:
-// OBSOLETE error ("invalid expression syntax at `%s'", lexptr);
-// OBSOLETE }
-// OBSOLETE for (;;)
-// OBSOLETE {
-// OBSOLETE switch (PEEK_TOKEN ())
-// OBSOLETE {
-// OBSOLETE case DOT_FIELD_NAME:
-// OBSOLETE write_exp_elt_opcode (STRUCTOP_STRUCT);
-// OBSOLETE write_exp_string (PEEK_LVAL ().sval);
-// OBSOLETE write_exp_elt_opcode (STRUCTOP_STRUCT);
-// OBSOLETE FORWARD_TOKEN ();
-// OBSOLETE continue;
-// OBSOLETE case POINTER:
-// OBSOLETE FORWARD_TOKEN ();
-// OBSOLETE if (PEEK_TOKEN () == TYPENAME)
-// OBSOLETE {
-// OBSOLETE type = PEEK_LVAL ().tsym.type;
-// OBSOLETE write_exp_elt_opcode (UNOP_CAST);
-// OBSOLETE write_exp_elt_type (lookup_pointer_type (type));
-// OBSOLETE write_exp_elt_opcode (UNOP_CAST);
-// OBSOLETE FORWARD_TOKEN ();
-// OBSOLETE }
-// OBSOLETE write_exp_elt_opcode (UNOP_IND);
-// OBSOLETE continue;
-// OBSOLETE case OPEN_PAREN:
-// OBSOLETE parse_call ();
-// OBSOLETE continue;
-// OBSOLETE case CHARACTER_STRING_LITERAL:
-// OBSOLETE case CHARACTER_LITERAL:
-// OBSOLETE case BIT_STRING_LITERAL:
-// OBSOLETE /* Handle string repetition. (See comment in parse_operand5.) */
-// OBSOLETE parse_primval ();
-// OBSOLETE write_exp_elt_opcode (MULTI_SUBSCRIPT);
-// OBSOLETE write_exp_elt_longcst (1);
-// OBSOLETE write_exp_elt_opcode (MULTI_SUBSCRIPT);
-// OBSOLETE continue;
-// OBSOLETE case END_TOKEN:
-// OBSOLETE case TOKEN_NOT_READ:
-// OBSOLETE case INTEGER_LITERAL:
-// OBSOLETE case BOOLEAN_LITERAL:
-// OBSOLETE case FLOAT_LITERAL:
-// OBSOLETE case GENERAL_PROCEDURE_NAME:
-// OBSOLETE case LOCATION_NAME:
-// OBSOLETE case EMPTINESS_LITERAL:
-// OBSOLETE case TYPENAME:
-// OBSOLETE case CASE:
-// OBSOLETE case OF:
-// OBSOLETE case ESAC:
-// OBSOLETE case LOGIOR:
-// OBSOLETE case ORIF:
-// OBSOLETE case LOGXOR:
-// OBSOLETE case LOGAND:
-// OBSOLETE case ANDIF:
-// OBSOLETE case NOTEQUAL:
-// OBSOLETE case GEQ:
-// OBSOLETE case LEQ:
-// OBSOLETE case IN:
-// OBSOLETE case SLASH_SLASH:
-// OBSOLETE case MOD:
-// OBSOLETE case REM:
-// OBSOLETE case NOT:
-// OBSOLETE case RECEIVE:
-// OBSOLETE case UP:
-// OBSOLETE case IF:
-// OBSOLETE case THEN:
-// OBSOLETE case ELSE:
-// OBSOLETE case FI:
-// OBSOLETE case ELSIF:
-// OBSOLETE case ILLEGAL_TOKEN:
-// OBSOLETE case NUM:
-// OBSOLETE case PRED:
-// OBSOLETE case SUCC:
-// OBSOLETE case ABS:
-// OBSOLETE case CARD:
-// OBSOLETE case MAX_TOKEN:
-// OBSOLETE case MIN_TOKEN:
-// OBSOLETE case ADDR_TOKEN:
-// OBSOLETE case SIZE:
-// OBSOLETE case UPPER:
-// OBSOLETE case LOWER:
-// OBSOLETE case LENGTH:
-// OBSOLETE case ARRAY:
-// OBSOLETE case GDB_VARIABLE:
-// OBSOLETE case GDB_ASSIGNMENT:
-// OBSOLETE break;
-// OBSOLETE }
-// OBSOLETE break;
-// OBSOLETE }
-// OBSOLETE return;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE static void
-// OBSOLETE parse_operand6 (void)
-// OBSOLETE {
-// OBSOLETE if (check_token (RECEIVE))
-// OBSOLETE {
-// OBSOLETE parse_primval ();
-// OBSOLETE error ("not implemented: RECEIVE expression");
-// OBSOLETE }
-// OBSOLETE else if (check_token (POINTER))
-// OBSOLETE {
-// OBSOLETE parse_primval ();
-// OBSOLETE write_exp_elt_opcode (UNOP_ADDR);
-// OBSOLETE }
-// OBSOLETE else
-// OBSOLETE parse_primval ();
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE static void
-// OBSOLETE parse_operand5 (void)
-// OBSOLETE {
-// OBSOLETE enum exp_opcode op;
-// OBSOLETE /* We are supposed to be looking for a <string repetition operator>,
-// OBSOLETE but in general we can't distinguish that from a parenthesized
-// OBSOLETE expression. This is especially difficult if we allow the
-// OBSOLETE string operand to be a constant expression (as requested by
-// OBSOLETE some users), and not just a string literal.
-// OBSOLETE Consider: LPRN expr RPRN LPRN expr RPRN
-// OBSOLETE Is that a function call or string repetition?
-// OBSOLETE Instead, we handle string repetition in parse_primval,
-// OBSOLETE and build_generalized_call. */
-// OBSOLETE switch (PEEK_TOKEN ())
-// OBSOLETE {
-// OBSOLETE case NOT:
-// OBSOLETE op = UNOP_LOGICAL_NOT;
-// OBSOLETE break;
-// OBSOLETE case '-':
-// OBSOLETE op = UNOP_NEG;
-// OBSOLETE break;
-// OBSOLETE default:
-// OBSOLETE op = OP_NULL;
-// OBSOLETE }
-// OBSOLETE if (op != OP_NULL)
-// OBSOLETE FORWARD_TOKEN ();
-// OBSOLETE parse_operand6 ();
-// OBSOLETE if (op != OP_NULL)
-// OBSOLETE write_exp_elt_opcode (op);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE static void
-// OBSOLETE parse_operand4 (void)
-// OBSOLETE {
-// OBSOLETE enum exp_opcode op;
-// OBSOLETE parse_operand5 ();
-// OBSOLETE for (;;)
-// OBSOLETE {
-// OBSOLETE switch (PEEK_TOKEN ())
-// OBSOLETE {
-// OBSOLETE case '*':
-// OBSOLETE op = BINOP_MUL;
-// OBSOLETE break;
-// OBSOLETE case '/':
-// OBSOLETE op = BINOP_DIV;
-// OBSOLETE break;
-// OBSOLETE case MOD:
-// OBSOLETE op = BINOP_MOD;
-// OBSOLETE break;
-// OBSOLETE case REM:
-// OBSOLETE op = BINOP_REM;
-// OBSOLETE break;
-// OBSOLETE default:
-// OBSOLETE return;
-// OBSOLETE }
-// OBSOLETE FORWARD_TOKEN ();
-// OBSOLETE parse_operand5 ();
-// OBSOLETE write_exp_elt_opcode (op);
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE static void
-// OBSOLETE parse_operand3 (void)
-// OBSOLETE {
-// OBSOLETE enum exp_opcode op;
-// OBSOLETE parse_operand4 ();
-// OBSOLETE for (;;)
-// OBSOLETE {
-// OBSOLETE switch (PEEK_TOKEN ())
-// OBSOLETE {
-// OBSOLETE case '+':
-// OBSOLETE op = BINOP_ADD;
-// OBSOLETE break;
-// OBSOLETE case '-':
-// OBSOLETE op = BINOP_SUB;
-// OBSOLETE break;
-// OBSOLETE case SLASH_SLASH:
-// OBSOLETE op = BINOP_CONCAT;
-// OBSOLETE break;
-// OBSOLETE default:
-// OBSOLETE return;
-// OBSOLETE }
-// OBSOLETE FORWARD_TOKEN ();
-// OBSOLETE parse_operand4 ();
-// OBSOLETE write_exp_elt_opcode (op);
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE static void
-// OBSOLETE parse_operand2 (void)
-// OBSOLETE {
-// OBSOLETE enum exp_opcode op;
-// OBSOLETE parse_operand3 ();
-// OBSOLETE for (;;)
-// OBSOLETE {
-// OBSOLETE if (check_token (IN))
-// OBSOLETE {
-// OBSOLETE parse_operand3 ();
-// OBSOLETE write_exp_elt_opcode (BINOP_IN);
-// OBSOLETE }
-// OBSOLETE else
-// OBSOLETE {
-// OBSOLETE switch (PEEK_TOKEN ())
-// OBSOLETE {
-// OBSOLETE case '>':
-// OBSOLETE op = BINOP_GTR;
-// OBSOLETE break;
-// OBSOLETE case GEQ:
-// OBSOLETE op = BINOP_GEQ;
-// OBSOLETE break;
-// OBSOLETE case '<':
-// OBSOLETE op = BINOP_LESS;
-// OBSOLETE break;
-// OBSOLETE case LEQ:
-// OBSOLETE op = BINOP_LEQ;
-// OBSOLETE break;
-// OBSOLETE case '=':
-// OBSOLETE op = BINOP_EQUAL;
-// OBSOLETE break;
-// OBSOLETE case NOTEQUAL:
-// OBSOLETE op = BINOP_NOTEQUAL;
-// OBSOLETE break;
-// OBSOLETE default:
-// OBSOLETE return;
-// OBSOLETE }
-// OBSOLETE FORWARD_TOKEN ();
-// OBSOLETE parse_operand3 ();
-// OBSOLETE write_exp_elt_opcode (op);
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE static void
-// OBSOLETE parse_operand1 (void)
-// OBSOLETE {
-// OBSOLETE enum exp_opcode op;
-// OBSOLETE parse_operand2 ();
-// OBSOLETE for (;;)
-// OBSOLETE {
-// OBSOLETE switch (PEEK_TOKEN ())
-// OBSOLETE {
-// OBSOLETE case LOGAND:
-// OBSOLETE op = BINOP_BITWISE_AND;
-// OBSOLETE break;
-// OBSOLETE case ANDIF:
-// OBSOLETE op = BINOP_LOGICAL_AND;
-// OBSOLETE break;
-// OBSOLETE default:
-// OBSOLETE return;
-// OBSOLETE }
-// OBSOLETE FORWARD_TOKEN ();
-// OBSOLETE parse_operand2 ();
-// OBSOLETE write_exp_elt_opcode (op);
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE static void
-// OBSOLETE parse_operand0 (void)
-// OBSOLETE {
-// OBSOLETE enum exp_opcode op;
-// OBSOLETE parse_operand1 ();
-// OBSOLETE for (;;)
-// OBSOLETE {
-// OBSOLETE switch (PEEK_TOKEN ())
-// OBSOLETE {
-// OBSOLETE case LOGIOR:
-// OBSOLETE op = BINOP_BITWISE_IOR;
-// OBSOLETE break;
-// OBSOLETE case LOGXOR:
-// OBSOLETE op = BINOP_BITWISE_XOR;
-// OBSOLETE break;
-// OBSOLETE case ORIF:
-// OBSOLETE op = BINOP_LOGICAL_OR;
-// OBSOLETE break;
-// OBSOLETE default:
-// OBSOLETE return;
-// OBSOLETE }
-// OBSOLETE FORWARD_TOKEN ();
-// OBSOLETE parse_operand1 ();
-// OBSOLETE write_exp_elt_opcode (op);
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE static void
-// OBSOLETE parse_expr (void)
-// OBSOLETE {
-// OBSOLETE parse_operand0 ();
-// OBSOLETE if (check_token (GDB_ASSIGNMENT))
-// OBSOLETE {
-// OBSOLETE parse_expr ();
-// OBSOLETE write_exp_elt_opcode (BINOP_ASSIGN);
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE static void
-// OBSOLETE parse_then_alternative (void)
-// OBSOLETE {
-// OBSOLETE expect (THEN, "missing 'THEN' in 'IF' expression");
-// OBSOLETE parse_expr ();
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE static void
-// OBSOLETE parse_else_alternative (void)
-// OBSOLETE {
-// OBSOLETE if (check_token (ELSIF))
-// OBSOLETE parse_if_expression_body ();
-// OBSOLETE else if (check_token (ELSE))
-// OBSOLETE parse_expr ();
-// OBSOLETE else
-// OBSOLETE error ("missing ELSE/ELSIF in IF expression");
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Matches: <boolean expression> <then alternative> <else alternative> */
-// OBSOLETE
-// OBSOLETE static void
-// OBSOLETE parse_if_expression_body (void)
-// OBSOLETE {
-// OBSOLETE parse_expr ();
-// OBSOLETE parse_then_alternative ();
-// OBSOLETE parse_else_alternative ();
-// OBSOLETE write_exp_elt_opcode (TERNOP_COND);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE static void
-// OBSOLETE parse_if_expression (void)
-// OBSOLETE {
-// OBSOLETE require (IF);
-// OBSOLETE parse_if_expression_body ();
-// OBSOLETE expect (FI, "missing 'FI' at end of conditional expression");
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* An <untyped_expr> is a superset of <expr>. It also includes
-// OBSOLETE <conditional expressions> and untyped <tuples>, whose types
-// OBSOLETE are not given by their constituents. Hence, these are only
-// OBSOLETE allowed in certain contexts that expect a certain type.
-// OBSOLETE You should call convert() to fix up the <untyped_expr>. */
-// OBSOLETE
-// OBSOLETE static void
-// OBSOLETE parse_untyped_expr (void)
-// OBSOLETE {
-// OBSOLETE switch (PEEK_TOKEN ())
-// OBSOLETE {
-// OBSOLETE case IF:
-// OBSOLETE parse_if_expression ();
-// OBSOLETE return;
-// OBSOLETE case CASE:
-// OBSOLETE error ("not implemented: CASE expression");
-// OBSOLETE case '(':
-// OBSOLETE switch (PEEK_TOKEN1 ())
-// OBSOLETE {
-// OBSOLETE case IF:
-// OBSOLETE case CASE:
-// OBSOLETE goto skip_lprn;
-// OBSOLETE case '[':
-// OBSOLETE skip_lprn:
-// OBSOLETE FORWARD_TOKEN ();
-// OBSOLETE parse_untyped_expr ();
-// OBSOLETE expect (')', "missing ')'");
-// OBSOLETE return;
-// OBSOLETE default:;
-// OBSOLETE /* fall through */
-// OBSOLETE }
-// OBSOLETE default:
-// OBSOLETE parse_operand0 ();
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE int
-// OBSOLETE chill_parse (void)
-// OBSOLETE {
-// OBSOLETE terminal_buffer[0] = TOKEN_NOT_READ;
-// OBSOLETE if (PEEK_TOKEN () == TYPENAME && PEEK_TOKEN1 () == END_TOKEN)
-// OBSOLETE {
-// OBSOLETE write_exp_elt_opcode (OP_TYPE);
-// OBSOLETE write_exp_elt_type (PEEK_LVAL ().tsym.type);
-// OBSOLETE write_exp_elt_opcode (OP_TYPE);
-// OBSOLETE FORWARD_TOKEN ();
-// OBSOLETE }
-// OBSOLETE else
-// OBSOLETE parse_expr ();
-// OBSOLETE if (terminal_buffer[0] != END_TOKEN)
-// OBSOLETE {
-// OBSOLETE if (comma_terminates && terminal_buffer[0] == ',')
-// OBSOLETE lexptr--; /* Put the comma back. */
-// OBSOLETE else
-// OBSOLETE error ("Junk after end of expression.");
-// OBSOLETE }
-// OBSOLETE return 0;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE /* Implementation of a dynamically expandable buffer for processing input
-// OBSOLETE characters acquired through lexptr and building a value to return in
-// OBSOLETE yylval. */
-// OBSOLETE
-// OBSOLETE static char *tempbuf; /* Current buffer contents */
-// OBSOLETE static int tempbufsize; /* Size of allocated buffer */
-// OBSOLETE static int tempbufindex; /* Current index into buffer */
-// OBSOLETE
-// OBSOLETE #define GROWBY_MIN_SIZE 64 /* Minimum amount to grow buffer by */
-// OBSOLETE
-// OBSOLETE #define CHECKBUF(size) \
-// OBSOLETE do { \
-// OBSOLETE if (tempbufindex + (size) >= tempbufsize) \
-// OBSOLETE { \
-// OBSOLETE growbuf_by_size (size); \
-// OBSOLETE } \
-// OBSOLETE } while (0);
-// OBSOLETE
-// OBSOLETE /* Grow the static temp buffer if necessary, including allocating the first one
-// OBSOLETE on demand. */
-// OBSOLETE
-// OBSOLETE static void
-// OBSOLETE growbuf_by_size (int count)
-// OBSOLETE {
-// OBSOLETE int growby;
-// OBSOLETE
-// OBSOLETE growby = max (count, GROWBY_MIN_SIZE);
-// OBSOLETE tempbufsize += growby;
-// OBSOLETE if (tempbuf == NULL)
-// OBSOLETE {
-// OBSOLETE tempbuf = (char *) xmalloc (tempbufsize);
-// OBSOLETE }
-// OBSOLETE else
-// OBSOLETE {
-// OBSOLETE tempbuf = (char *) xrealloc (tempbuf, tempbufsize);
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Try to consume a simple name string token. If successful, returns
-// OBSOLETE a pointer to a nullbyte terminated copy of the name that can be used
-// OBSOLETE in symbol table lookups. If not successful, returns NULL. */
-// OBSOLETE
-// OBSOLETE static char *
-// OBSOLETE match_simple_name_string (void)
-// OBSOLETE {
-// OBSOLETE char *tokptr = lexptr;
-// OBSOLETE
-// OBSOLETE if (isalpha (*tokptr) || *tokptr == '_')
-// OBSOLETE {
-// OBSOLETE char *result;
-// OBSOLETE do
-// OBSOLETE {
-// OBSOLETE tokptr++;
-// OBSOLETE }
-// OBSOLETE while (isalnum (*tokptr) || (*tokptr == '_'));
-// OBSOLETE yylval.sval.ptr = lexptr;
-// OBSOLETE yylval.sval.length = tokptr - lexptr;
-// OBSOLETE lexptr = tokptr;
-// OBSOLETE result = copy_name (yylval.sval);
-// OBSOLETE return result;
-// OBSOLETE }
-// OBSOLETE return (NULL);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Start looking for a value composed of valid digits as set by the base
-// OBSOLETE in use. Note that '_' characters are valid anywhere, in any quantity,
-// OBSOLETE and are simply ignored. Since we must find at least one valid digit,
-// OBSOLETE or reject this token as an integer literal, we keep track of how many
-// OBSOLETE digits we have encountered. */
-// OBSOLETE
-// OBSOLETE static int
-// OBSOLETE decode_integer_value (int base, char **tokptrptr, LONGEST *ivalptr)
-// OBSOLETE {
-// OBSOLETE char *tokptr = *tokptrptr;
-// OBSOLETE int temp;
-// OBSOLETE int digits = 0;
-// OBSOLETE
-// OBSOLETE while (*tokptr != '\0')
-// OBSOLETE {
-// OBSOLETE temp = *tokptr;
-// OBSOLETE if (isupper (temp))
-// OBSOLETE temp = tolower (temp);
-// OBSOLETE tokptr++;
-// OBSOLETE switch (temp)
-// OBSOLETE {
-// OBSOLETE case '_':
-// OBSOLETE continue;
-// 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 temp -= '0';
-// OBSOLETE break;
-// OBSOLETE case 'a':
-// OBSOLETE case 'b':
-// OBSOLETE case 'c':
-// OBSOLETE case 'd':
-// OBSOLETE case 'e':
-// OBSOLETE case 'f':
-// OBSOLETE temp -= 'a';
-// OBSOLETE temp += 10;
-// OBSOLETE break;
-// OBSOLETE default:
-// OBSOLETE temp = base;
-// OBSOLETE break;
-// OBSOLETE }
-// OBSOLETE if (temp < base)
-// OBSOLETE {
-// OBSOLETE digits++;
-// OBSOLETE *ivalptr *= base;
-// OBSOLETE *ivalptr += temp;
-// OBSOLETE }
-// OBSOLETE else
-// OBSOLETE {
-// OBSOLETE /* Found something not in domain for current base. */
-// OBSOLETE tokptr--; /* Unconsume what gave us indigestion. */
-// OBSOLETE break;
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* If we didn't find any digits, then we don't have a valid integer
-// OBSOLETE value, so reject the entire token. Otherwise, update the lexical
-// OBSOLETE scan pointer, and return non-zero for success. */
-// OBSOLETE
-// OBSOLETE if (digits == 0)
-// OBSOLETE {
-// OBSOLETE return (0);
-// OBSOLETE }
-// OBSOLETE else
-// OBSOLETE {
-// OBSOLETE *tokptrptr = tokptr;
-// OBSOLETE return (1);
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE static int
-// OBSOLETE decode_integer_literal (LONGEST *valptr, char **tokptrptr)
-// OBSOLETE {
-// OBSOLETE char *tokptr = *tokptrptr;
-// OBSOLETE int base = 0;
-// OBSOLETE LONGEST ival = 0;
-// OBSOLETE int explicit_base = 0;
-// OBSOLETE
-// OBSOLETE /* Look for an explicit base specifier, which is optional. */
-// OBSOLETE
-// OBSOLETE switch (*tokptr)
-// OBSOLETE {
-// OBSOLETE case 'd':
-// OBSOLETE case 'D':
-// OBSOLETE explicit_base++;
-// OBSOLETE base = 10;
-// OBSOLETE tokptr++;
-// OBSOLETE break;
-// OBSOLETE case 'b':
-// OBSOLETE case 'B':
-// OBSOLETE explicit_base++;
-// OBSOLETE base = 2;
-// OBSOLETE tokptr++;
-// OBSOLETE break;
-// OBSOLETE case 'h':
-// OBSOLETE case 'H':
-// OBSOLETE explicit_base++;
-// OBSOLETE base = 16;
-// OBSOLETE tokptr++;
-// OBSOLETE break;
-// OBSOLETE case 'o':
-// OBSOLETE case 'O':
-// OBSOLETE explicit_base++;
-// OBSOLETE base = 8;
-// OBSOLETE tokptr++;
-// OBSOLETE break;
-// OBSOLETE default:
-// OBSOLETE base = 10;
-// OBSOLETE break;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* If we found an explicit base ensure that the character after the
-// OBSOLETE explicit base is a single quote. */
-// OBSOLETE
-// OBSOLETE if (explicit_base && (*tokptr++ != '\''))
-// OBSOLETE {
-// OBSOLETE return (0);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Attempt to decode whatever follows as an integer value in the
-// OBSOLETE indicated base, updating the token pointer in the process and
-// OBSOLETE computing the value into ival. Also, if we have an explicit
-// OBSOLETE base, then the next character must not be a single quote, or we
-// OBSOLETE have a bitstring literal, so reject the entire token in this case.
-// OBSOLETE Otherwise, update the lexical scan pointer, and return non-zero
-// OBSOLETE for success. */
-// OBSOLETE
-// OBSOLETE if (!decode_integer_value (base, &tokptr, &ival))
-// OBSOLETE {
-// OBSOLETE return (0);
-// OBSOLETE }
-// OBSOLETE else if (explicit_base && (*tokptr == '\''))
-// OBSOLETE {
-// OBSOLETE return (0);
-// OBSOLETE }
-// OBSOLETE else
-// OBSOLETE {
-// OBSOLETE *valptr = ival;
-// OBSOLETE *tokptrptr = tokptr;
-// OBSOLETE return (1);
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* If it wasn't for the fact that floating point values can contain '_'
-// OBSOLETE characters, we could just let strtod do all the hard work by letting it
-// OBSOLETE try to consume as much of the current token buffer as possible and
-// OBSOLETE find a legal conversion. Unfortunately we need to filter out the '_'
-// OBSOLETE characters before calling strtod, which we do by copying the other
-// OBSOLETE legal chars to a local buffer to be converted. However since we also
-// OBSOLETE need to keep track of where the last unconsumed character in the input
-// OBSOLETE buffer is, we have transfer only as many characters as may compose a
-// OBSOLETE legal floating point value. */
-// OBSOLETE
-// OBSOLETE static enum ch_terminal
-// OBSOLETE match_float_literal (void)
-// OBSOLETE {
-// OBSOLETE char *tokptr = lexptr;
-// OBSOLETE char *buf;
-// OBSOLETE char *copy;
-// OBSOLETE double dval;
-// OBSOLETE extern double strtod ();
-// OBSOLETE
-// OBSOLETE /* Make local buffer in which to build the string to convert. This is
-// OBSOLETE required because underscores are valid in chill floating point numbers
-// OBSOLETE but not in the string passed to strtod to convert. The string will be
-// OBSOLETE no longer than our input string. */
-// OBSOLETE
-// OBSOLETE copy = buf = (char *) alloca (strlen (tokptr) + 1);
-// OBSOLETE
-// OBSOLETE /* Transfer all leading digits to the conversion buffer, discarding any
-// OBSOLETE underscores. */
-// OBSOLETE
-// OBSOLETE while (isdigit (*tokptr) || *tokptr == '_')
-// OBSOLETE {
-// OBSOLETE if (*tokptr != '_')
-// OBSOLETE {
-// OBSOLETE *copy++ = *tokptr;
-// OBSOLETE }
-// OBSOLETE tokptr++;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Now accept either a '.', or one of [eEdD]. Dot is legal regardless
-// OBSOLETE of whether we found any leading digits, and we simply accept it and
-// OBSOLETE continue on to look for the fractional part and/or exponent. One of
-// OBSOLETE [eEdD] is legal only if we have seen digits, and means that there
-// OBSOLETE is no fractional part. If we find neither of these, then this is
-// OBSOLETE not a floating point number, so return failure. */
-// OBSOLETE
-// OBSOLETE switch (*tokptr++)
-// OBSOLETE {
-// OBSOLETE case '.':
-// OBSOLETE /* Accept and then look for fractional part and/or exponent. */
-// OBSOLETE *copy++ = '.';
-// OBSOLETE break;
-// OBSOLETE
-// OBSOLETE case 'e':
-// OBSOLETE case 'E':
-// OBSOLETE case 'd':
-// OBSOLETE case 'D':
-// OBSOLETE if (copy == buf)
-// OBSOLETE {
-// OBSOLETE return (0);
-// OBSOLETE }
-// OBSOLETE *copy++ = 'e';
-// OBSOLETE goto collect_exponent;
-// OBSOLETE break;
-// OBSOLETE
-// OBSOLETE default:
-// OBSOLETE return (0);
-// OBSOLETE break;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* We found a '.', copy any fractional digits to the conversion buffer, up
-// OBSOLETE to the first nondigit, non-underscore character. */
-// OBSOLETE
-// OBSOLETE while (isdigit (*tokptr) || *tokptr == '_')
-// OBSOLETE {
-// OBSOLETE if (*tokptr != '_')
-// OBSOLETE {
-// OBSOLETE *copy++ = *tokptr;
-// OBSOLETE }
-// OBSOLETE tokptr++;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Look for an exponent, which must start with one of [eEdD]. If none
-// OBSOLETE is found, jump directly to trying to convert what we have collected
-// OBSOLETE so far. */
-// OBSOLETE
-// OBSOLETE switch (*tokptr)
-// OBSOLETE {
-// OBSOLETE case 'e':
-// OBSOLETE case 'E':
-// OBSOLETE case 'd':
-// OBSOLETE case 'D':
-// OBSOLETE *copy++ = 'e';
-// OBSOLETE tokptr++;
-// OBSOLETE break;
-// OBSOLETE default:
-// OBSOLETE goto convert_float;
-// OBSOLETE break;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Accept an optional '-' or '+' following one of [eEdD]. */
-// OBSOLETE
-// OBSOLETE collect_exponent:
-// OBSOLETE if (*tokptr == '+' || *tokptr == '-')
-// OBSOLETE {
-// OBSOLETE *copy++ = *tokptr++;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Now copy an exponent into the conversion buffer. Note that at the
-// OBSOLETE moment underscores are *not* allowed in exponents. */
-// OBSOLETE
-// OBSOLETE while (isdigit (*tokptr))
-// OBSOLETE {
-// OBSOLETE *copy++ = *tokptr++;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* If we transfered any chars to the conversion buffer, try to interpret its
-// OBSOLETE contents as a floating point value. If any characters remain, then we
-// OBSOLETE must not have a valid floating point string. */
-// OBSOLETE
-// OBSOLETE convert_float:
-// OBSOLETE *copy = '\0';
-// OBSOLETE if (copy != buf)
-// OBSOLETE {
-// OBSOLETE dval = strtod (buf, ©);
-// OBSOLETE if (*copy == '\0')
-// OBSOLETE {
-// OBSOLETE yylval.dval = dval;
-// OBSOLETE lexptr = tokptr;
-// OBSOLETE return (FLOAT_LITERAL);
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE return (0);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Recognize a string literal. A string literal is a sequence
-// OBSOLETE of characters enclosed in matching single or double quotes, except that
-// OBSOLETE a single character inside single quotes is a character literal, which
-// OBSOLETE we reject as a string literal. To embed the terminator character inside
-// OBSOLETE a string, it is simply doubled (I.E. "this""is""one""string") */
-// OBSOLETE
-// OBSOLETE static enum ch_terminal
-// OBSOLETE match_string_literal (void)
-// OBSOLETE {
-// OBSOLETE char *tokptr = lexptr;
-// OBSOLETE int in_ctrlseq = 0;
-// OBSOLETE LONGEST ival;
-// OBSOLETE
-// OBSOLETE for (tempbufindex = 0, tokptr++; *tokptr != '\0'; tokptr++)
-// OBSOLETE {
-// OBSOLETE CHECKBUF (1);
-// OBSOLETE tryagain:;
-// OBSOLETE if (in_ctrlseq)
-// OBSOLETE {
-// OBSOLETE /* skip possible whitespaces */
-// OBSOLETE while ((*tokptr == ' ' || *tokptr == '\t') && *tokptr)
-// OBSOLETE tokptr++;
-// OBSOLETE if (*tokptr == ')')
-// OBSOLETE {
-// OBSOLETE in_ctrlseq = 0;
-// OBSOLETE tokptr++;
-// OBSOLETE goto tryagain;
-// OBSOLETE }
-// OBSOLETE else if (*tokptr != ',')
-// OBSOLETE error ("Invalid control sequence");
-// OBSOLETE tokptr++;
-// OBSOLETE /* skip possible whitespaces */
-// OBSOLETE while ((*tokptr == ' ' || *tokptr == '\t') && *tokptr)
-// OBSOLETE tokptr++;
-// OBSOLETE if (!decode_integer_literal (&ival, &tokptr))
-// OBSOLETE error ("Invalid control sequence");
-// OBSOLETE tokptr--;
-// OBSOLETE }
-// OBSOLETE else if (*tokptr == *lexptr)
-// OBSOLETE {
-// OBSOLETE if (*(tokptr + 1) == *lexptr)
-// OBSOLETE {
-// OBSOLETE ival = *tokptr++;
-// OBSOLETE }
-// OBSOLETE else
-// OBSOLETE {
-// OBSOLETE break;
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE else if (*tokptr == '^')
-// OBSOLETE {
-// OBSOLETE if (*(tokptr + 1) == '(')
-// OBSOLETE {
-// OBSOLETE in_ctrlseq = 1;
-// OBSOLETE tokptr += 2;
-// OBSOLETE if (!decode_integer_literal (&ival, &tokptr))
-// OBSOLETE error ("Invalid control sequence");
-// OBSOLETE tokptr--;
-// OBSOLETE }
-// OBSOLETE else if (*(tokptr + 1) == '^')
-// OBSOLETE ival = *tokptr++;
-// OBSOLETE else
-// OBSOLETE error ("Invalid control sequence");
-// OBSOLETE }
-// OBSOLETE else
-// OBSOLETE ival = *tokptr;
-// OBSOLETE tempbuf[tempbufindex++] = ival;
-// OBSOLETE }
-// OBSOLETE if (in_ctrlseq)
-// OBSOLETE error ("Invalid control sequence");
-// OBSOLETE
-// OBSOLETE if (*tokptr == '\0' /* no terminator */
-// OBSOLETE || (tempbufindex == 1 && *tokptr == '\'')) /* char literal */
-// OBSOLETE {
-// OBSOLETE return (0);
-// OBSOLETE }
-// OBSOLETE else
-// OBSOLETE {
-// OBSOLETE tempbuf[tempbufindex] = '\0';
-// OBSOLETE yylval.sval.ptr = tempbuf;
-// OBSOLETE yylval.sval.length = tempbufindex;
-// OBSOLETE lexptr = ++tokptr;
-// OBSOLETE return (CHARACTER_STRING_LITERAL);
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Recognize a character literal. A character literal is single character
-// OBSOLETE or a control sequence, enclosed in single quotes. A control sequence
-// OBSOLETE is a comma separated list of one or more integer literals, enclosed
-// OBSOLETE in parenthesis and introduced with a circumflex character.
-// OBSOLETE
-// OBSOLETE EX: 'a' '^(7)' '^(7,8)'
-// OBSOLETE
-// OBSOLETE As a GNU chill extension, the syntax C'xx' is also recognized as a
-// OBSOLETE character literal, where xx is a hex value for the character.
-// OBSOLETE
-// OBSOLETE Note that more than a single character, enclosed in single quotes, is
-// OBSOLETE a string literal.
-// OBSOLETE
-// OBSOLETE Returns CHARACTER_LITERAL if a match is found.
-// OBSOLETE */
-// OBSOLETE
-// OBSOLETE static enum ch_terminal
-// OBSOLETE match_character_literal (void)
-// OBSOLETE {
-// OBSOLETE char *tokptr = lexptr;
-// OBSOLETE LONGEST ival = 0;
-// OBSOLETE
-// OBSOLETE if ((*tokptr == 'c' || *tokptr == 'C') && (*(tokptr + 1) == '\''))
-// OBSOLETE {
-// OBSOLETE /* We have a GNU chill extension form, so skip the leading "C'",
-// OBSOLETE decode the hex value, and then ensure that we have a trailing
-// OBSOLETE single quote character. */
-// OBSOLETE tokptr += 2;
-// OBSOLETE if (!decode_integer_value (16, &tokptr, &ival) || (*tokptr != '\''))
-// OBSOLETE {
-// OBSOLETE return (0);
-// OBSOLETE }
-// OBSOLETE tokptr++;
-// OBSOLETE }
-// OBSOLETE else if (*tokptr == '\'')
-// OBSOLETE {
-// OBSOLETE tokptr++;
-// OBSOLETE
-// OBSOLETE /* Determine which form we have, either a control sequence or the
-// OBSOLETE single character form. */
-// OBSOLETE
-// OBSOLETE if (*tokptr == '^')
-// OBSOLETE {
-// OBSOLETE if (*(tokptr + 1) == '(')
-// OBSOLETE {
-// OBSOLETE /* Match and decode a control sequence. Return zero if we don't
-// OBSOLETE find a valid integer literal, or if the next unconsumed character
-// OBSOLETE after the integer literal is not the trailing ')'. */
-// OBSOLETE tokptr += 2;
-// OBSOLETE if (!decode_integer_literal (&ival, &tokptr) || (*tokptr++ != ')'))
-// OBSOLETE {
-// OBSOLETE return (0);
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE else if (*(tokptr + 1) == '^')
-// OBSOLETE {
-// OBSOLETE ival = *tokptr;
-// OBSOLETE tokptr += 2;
-// OBSOLETE }
-// OBSOLETE else
-// OBSOLETE /* fail */
-// OBSOLETE error ("Invalid control sequence");
-// OBSOLETE }
-// OBSOLETE else if (*tokptr == '\'')
-// OBSOLETE {
-// OBSOLETE /* this must be duplicated */
-// OBSOLETE ival = *tokptr;
-// OBSOLETE tokptr += 2;
-// OBSOLETE }
-// OBSOLETE else
-// OBSOLETE {
-// OBSOLETE ival = *tokptr++;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* The trailing quote has not yet been consumed. If we don't find
-// OBSOLETE it, then we have no match. */
-// OBSOLETE
-// OBSOLETE if (*tokptr++ != '\'')
-// OBSOLETE {
-// OBSOLETE return (0);
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE else
-// OBSOLETE {
-// OBSOLETE /* Not a character literal. */
-// OBSOLETE return (0);
-// OBSOLETE }
-// OBSOLETE yylval.typed_val.val = ival;
-// OBSOLETE yylval.typed_val.type = builtin_type_chill_char;
-// OBSOLETE lexptr = tokptr;
-// OBSOLETE return (CHARACTER_LITERAL);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Recognize an integer literal, as specified in Z.200 sec 5.2.4.2.
-// OBSOLETE Note that according to 5.2.4.2, a single "_" is also a valid integer
-// OBSOLETE literal, however GNU-chill requires there to be at least one "digit"
-// OBSOLETE in any integer literal. */
-// OBSOLETE
-// OBSOLETE static enum ch_terminal
-// OBSOLETE match_integer_literal (void)
-// OBSOLETE {
-// OBSOLETE char *tokptr = lexptr;
-// OBSOLETE LONGEST ival;
-// OBSOLETE
-// OBSOLETE if (!decode_integer_literal (&ival, &tokptr))
-// OBSOLETE {
-// OBSOLETE return (0);
-// OBSOLETE }
-// OBSOLETE else
-// OBSOLETE {
-// OBSOLETE yylval.typed_val.val = ival;
-// OBSOLETE #if defined(CC_HAS_LONG_LONG)
-// OBSOLETE if (ival > (LONGEST) 2147483647U || ival < -(LONGEST) 2147483648U)
-// OBSOLETE yylval.typed_val.type = builtin_type_long_long;
-// OBSOLETE else
-// OBSOLETE #endif
-// OBSOLETE yylval.typed_val.type = builtin_type_int;
-// OBSOLETE lexptr = tokptr;
-// OBSOLETE return (INTEGER_LITERAL);
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Recognize a bit-string literal, as specified in Z.200 sec 5.2.4.8
-// OBSOLETE Note that according to 5.2.4.8, a single "_" is also a valid bit-string
-// OBSOLETE literal, however GNU-chill requires there to be at least one "digit"
-// OBSOLETE in any bit-string literal. */
-// OBSOLETE
-// OBSOLETE static enum ch_terminal
-// OBSOLETE match_bitstring_literal (void)
-// OBSOLETE {
-// OBSOLETE register char *tokptr = lexptr;
-// OBSOLETE int bitoffset = 0;
-// OBSOLETE int bitcount = 0;
-// OBSOLETE int bits_per_char;
-// OBSOLETE int digit;
-// OBSOLETE
-// OBSOLETE tempbufindex = 0;
-// OBSOLETE CHECKBUF (1);
-// OBSOLETE tempbuf[0] = 0;
-// OBSOLETE
-// OBSOLETE /* Look for the required explicit base specifier. */
-// OBSOLETE
-// OBSOLETE switch (*tokptr++)
-// OBSOLETE {
-// OBSOLETE case 'b':
-// OBSOLETE case 'B':
-// OBSOLETE bits_per_char = 1;
-// OBSOLETE break;
-// OBSOLETE case 'o':
-// OBSOLETE case 'O':
-// OBSOLETE bits_per_char = 3;
-// OBSOLETE break;
-// OBSOLETE case 'h':
-// OBSOLETE case 'H':
-// OBSOLETE bits_per_char = 4;
-// OBSOLETE break;
-// OBSOLETE default:
-// OBSOLETE return (0);
-// OBSOLETE break;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Ensure that the character after the explicit base is a single quote. */
-// OBSOLETE
-// OBSOLETE if (*tokptr++ != '\'')
-// OBSOLETE {
-// OBSOLETE return (0);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE while (*tokptr != '\0' && *tokptr != '\'')
-// OBSOLETE {
-// OBSOLETE digit = *tokptr;
-// OBSOLETE if (isupper (digit))
-// OBSOLETE digit = tolower (digit);
-// OBSOLETE tokptr++;
-// OBSOLETE switch (digit)
-// OBSOLETE {
-// OBSOLETE case '_':
-// OBSOLETE continue;
-// 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 digit -= '0';
-// OBSOLETE break;
-// OBSOLETE case 'a':
-// OBSOLETE case 'b':
-// OBSOLETE case 'c':
-// OBSOLETE case 'd':
-// OBSOLETE case 'e':
-// OBSOLETE case 'f':
-// OBSOLETE digit -= 'a';
-// OBSOLETE digit += 10;
-// OBSOLETE break;
-// OBSOLETE default:
-// OBSOLETE /* this is not a bitstring literal, probably an integer */
-// OBSOLETE return 0;
-// OBSOLETE }
-// OBSOLETE if (digit >= 1 << bits_per_char)
-// OBSOLETE {
-// OBSOLETE /* Found something not in domain for current base. */
-// OBSOLETE error ("Too-large digit in bitstring or integer.");
-// OBSOLETE }
-// OBSOLETE else
-// OBSOLETE {
-// OBSOLETE /* Extract bits from digit, packing them into the bitstring byte. */
-// OBSOLETE int k = TARGET_BYTE_ORDER == BFD_ENDIAN_BIG ? bits_per_char - 1 : 0;
-// OBSOLETE for (; TARGET_BYTE_ORDER == BFD_ENDIAN_BIG ? k >= 0 : k < bits_per_char;
-// OBSOLETE TARGET_BYTE_ORDER == BFD_ENDIAN_BIG ? k-- : k++)
-// OBSOLETE {
-// OBSOLETE bitcount++;
-// OBSOLETE if (digit & (1 << k))
-// OBSOLETE {
-// OBSOLETE tempbuf[tempbufindex] |=
-// OBSOLETE (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
-// OBSOLETE ? (1 << (HOST_CHAR_BIT - 1 - bitoffset))
-// OBSOLETE : (1 << bitoffset);
-// OBSOLETE }
-// OBSOLETE bitoffset++;
-// OBSOLETE if (bitoffset == HOST_CHAR_BIT)
-// OBSOLETE {
-// OBSOLETE bitoffset = 0;
-// OBSOLETE tempbufindex++;
-// OBSOLETE CHECKBUF (1);
-// OBSOLETE tempbuf[tempbufindex] = 0;
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Verify that we consumed everything up to the trailing single quote,
-// OBSOLETE and that we found some bits (IE not just underbars). */
-// OBSOLETE
-// OBSOLETE if (*tokptr++ != '\'')
-// OBSOLETE {
-// OBSOLETE return (0);
-// OBSOLETE }
-// OBSOLETE else
-// OBSOLETE {
-// OBSOLETE yylval.sval.ptr = tempbuf;
-// OBSOLETE yylval.sval.length = bitcount;
-// OBSOLETE lexptr = tokptr;
-// OBSOLETE return (BIT_STRING_LITERAL);
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE struct token
-// OBSOLETE {
-// OBSOLETE char *operator;
-// OBSOLETE int token;
-// OBSOLETE };
-// OBSOLETE
-// OBSOLETE static const struct token idtokentab[] =
-// OBSOLETE {
-// OBSOLETE {"array", ARRAY},
-// OBSOLETE {"length", LENGTH},
-// OBSOLETE {"lower", LOWER},
-// OBSOLETE {"upper", UPPER},
-// OBSOLETE {"andif", ANDIF},
-// OBSOLETE {"pred", PRED},
-// OBSOLETE {"succ", SUCC},
-// OBSOLETE {"card", CARD},
-// OBSOLETE {"size", SIZE},
-// OBSOLETE {"orif", ORIF},
-// OBSOLETE {"num", NUM},
-// OBSOLETE {"abs", ABS},
-// OBSOLETE {"max", MAX_TOKEN},
-// OBSOLETE {"min", MIN_TOKEN},
-// OBSOLETE {"mod", MOD},
-// OBSOLETE {"rem", REM},
-// OBSOLETE {"not", NOT},
-// OBSOLETE {"xor", LOGXOR},
-// OBSOLETE {"and", LOGAND},
-// OBSOLETE {"in", IN},
-// OBSOLETE {"or", LOGIOR},
-// OBSOLETE {"up", UP},
-// OBSOLETE {"addr", ADDR_TOKEN},
-// OBSOLETE {"null", EMPTINESS_LITERAL}
-// OBSOLETE };
-// OBSOLETE
-// OBSOLETE static const struct token tokentab2[] =
-// OBSOLETE {
-// OBSOLETE {":=", GDB_ASSIGNMENT},
-// OBSOLETE {"//", SLASH_SLASH},
-// OBSOLETE {"->", POINTER},
-// OBSOLETE {"/=", NOTEQUAL},
-// OBSOLETE {"<=", LEQ},
-// OBSOLETE {">=", GEQ}
-// OBSOLETE };
-// OBSOLETE
-// OBSOLETE /* Read one token, getting characters through lexptr. */
-// OBSOLETE /* This is where we will check to make sure that the language and the
-// OBSOLETE operators used are compatible. */
-// OBSOLETE
-// OBSOLETE static enum ch_terminal
-// OBSOLETE ch_lex (void)
-// OBSOLETE {
-// OBSOLETE unsigned int i;
-// OBSOLETE enum ch_terminal token;
-// OBSOLETE char *inputname;
-// OBSOLETE struct symbol *sym;
-// OBSOLETE
-// OBSOLETE /* Skip over any leading whitespace. */
-// OBSOLETE while (isspace (*lexptr))
-// OBSOLETE {
-// OBSOLETE lexptr++;
-// OBSOLETE }
-// OBSOLETE /* Look for special single character cases which can't be the first
-// OBSOLETE character of some other multicharacter token. */
-// OBSOLETE switch (*lexptr)
-// OBSOLETE {
-// OBSOLETE case '\0':
-// OBSOLETE return END_TOKEN;
-// OBSOLETE case ',':
-// OBSOLETE case '=':
-// OBSOLETE case ';':
-// OBSOLETE case '!':
-// OBSOLETE case '+':
-// OBSOLETE case '*':
-// OBSOLETE case '(':
-// OBSOLETE case ')':
-// OBSOLETE case '[':
-// OBSOLETE case ']':
-// OBSOLETE return (*lexptr++);
-// OBSOLETE }
-// OBSOLETE /* Look for characters which start a particular kind of multicharacter
-// OBSOLETE token, such as a character literal, register name, convenience
-// OBSOLETE variable name, string literal, etc. */
-// OBSOLETE switch (*lexptr)
-// OBSOLETE {
-// OBSOLETE case '\'':
-// OBSOLETE case '\"':
-// OBSOLETE /* First try to match a string literal, which is any
-// OBSOLETE sequence of characters enclosed in matching single or double
-// OBSOLETE quotes, except that a single character inside single quotes
-// OBSOLETE is a character literal, so we have to catch that case also. */
-// OBSOLETE token = match_string_literal ();
-// OBSOLETE if (token != 0)
-// OBSOLETE {
-// OBSOLETE return (token);
-// OBSOLETE }
-// OBSOLETE if (*lexptr == '\'')
-// OBSOLETE {
-// OBSOLETE token = match_character_literal ();
-// OBSOLETE if (token != 0)
-// OBSOLETE {
-// OBSOLETE return (token);
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE break;
-// OBSOLETE case 'C':
-// OBSOLETE case 'c':
-// OBSOLETE token = match_character_literal ();
-// OBSOLETE if (token != 0)
-// OBSOLETE {
-// OBSOLETE return (token);
-// OBSOLETE }
-// OBSOLETE break;
-// OBSOLETE case '$':
-// OBSOLETE yylval.sval.ptr = lexptr;
-// OBSOLETE do
-// OBSOLETE {
-// OBSOLETE lexptr++;
-// OBSOLETE }
-// OBSOLETE while (isalnum (*lexptr) || *lexptr == '_' || *lexptr == '$');
-// OBSOLETE yylval.sval.length = lexptr - yylval.sval.ptr;
-// OBSOLETE write_dollar_variable (yylval.sval);
-// OBSOLETE return GDB_VARIABLE;
-// OBSOLETE break;
-// OBSOLETE }
-// OBSOLETE /* See if it is a special token of length 2. */
-// OBSOLETE for (i = 0; i < sizeof (tokentab2) / sizeof (tokentab2[0]); i++)
-// OBSOLETE {
-// OBSOLETE if (STREQN (lexptr, tokentab2[i].operator, 2))
-// OBSOLETE {
-// OBSOLETE lexptr += 2;
-// OBSOLETE return (tokentab2[i].token);
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE /* Look for single character cases which which could be the first
-// OBSOLETE character of some other multicharacter token, but aren't, or we
-// OBSOLETE would already have found it. */
-// OBSOLETE switch (*lexptr)
-// OBSOLETE {
-// OBSOLETE case '-':
-// OBSOLETE case ':':
-// OBSOLETE case '/':
-// OBSOLETE case '<':
-// OBSOLETE case '>':
-// OBSOLETE return (*lexptr++);
-// OBSOLETE }
-// OBSOLETE /* Look for a float literal before looking for an integer literal, so
-// OBSOLETE we match as much of the input stream as possible. */
-// OBSOLETE token = match_float_literal ();
-// OBSOLETE if (token != 0)
-// OBSOLETE {
-// OBSOLETE return (token);
-// OBSOLETE }
-// OBSOLETE token = match_bitstring_literal ();
-// OBSOLETE if (token != 0)
-// OBSOLETE {
-// OBSOLETE return (token);
-// OBSOLETE }
-// OBSOLETE token = match_integer_literal ();
-// OBSOLETE if (token != 0)
-// OBSOLETE {
-// OBSOLETE return (token);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Try to match a simple name string, and if a match is found, then
-// OBSOLETE further classify what sort of name it is and return an appropriate
-// OBSOLETE token. Note that attempting to match a simple name string consumes
-// OBSOLETE the token from lexptr, so we can't back out if we later find that
-// OBSOLETE we can't classify what sort of name it is. */
-// OBSOLETE
-// OBSOLETE inputname = match_simple_name_string ();
-// OBSOLETE
-// OBSOLETE if (inputname != NULL)
-// OBSOLETE {
-// OBSOLETE char *simplename = (char *) alloca (strlen (inputname) + 1);
-// OBSOLETE
-// OBSOLETE char *dptr = simplename, *sptr = inputname;
-// OBSOLETE for (; *sptr; sptr++)
-// OBSOLETE *dptr++ = isupper (*sptr) ? tolower (*sptr) : *sptr;
-// OBSOLETE *dptr = '\0';
-// OBSOLETE
-// OBSOLETE /* See if it is a reserved identifier. */
-// OBSOLETE for (i = 0; i < sizeof (idtokentab) / sizeof (idtokentab[0]); i++)
-// OBSOLETE {
-// OBSOLETE if (STREQ (simplename, idtokentab[i].operator))
-// OBSOLETE {
-// OBSOLETE return (idtokentab[i].token);
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Look for other special tokens. */
-// OBSOLETE if (STREQ (simplename, "true"))
-// OBSOLETE {
-// OBSOLETE yylval.ulval = 1;
-// OBSOLETE return (BOOLEAN_LITERAL);
-// OBSOLETE }
-// OBSOLETE if (STREQ (simplename, "false"))
-// OBSOLETE {
-// OBSOLETE yylval.ulval = 0;
-// OBSOLETE return (BOOLEAN_LITERAL);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE sym = lookup_symbol (inputname, expression_context_block,
-// OBSOLETE VAR_NAMESPACE, (int *) NULL,
-// OBSOLETE (struct symtab **) NULL);
-// OBSOLETE if (sym == NULL && strcmp (inputname, simplename) != 0)
-// OBSOLETE {
-// OBSOLETE sym = lookup_symbol (simplename, expression_context_block,
-// OBSOLETE VAR_NAMESPACE, (int *) NULL,
-// OBSOLETE (struct symtab **) NULL);
-// OBSOLETE }
-// OBSOLETE if (sym != NULL)
-// OBSOLETE {
-// OBSOLETE yylval.ssym.stoken.ptr = NULL;
-// OBSOLETE yylval.ssym.stoken.length = 0;
-// OBSOLETE yylval.ssym.sym = sym;
-// OBSOLETE yylval.ssym.is_a_field_of_this = 0; /* FIXME, C++'ism */
-// OBSOLETE switch (SYMBOL_CLASS (sym))
-// OBSOLETE {
-// OBSOLETE case LOC_BLOCK:
-// OBSOLETE /* Found a procedure name. */
-// OBSOLETE return (GENERAL_PROCEDURE_NAME);
-// OBSOLETE case LOC_STATIC:
-// OBSOLETE /* Found a global or local static variable. */
-// OBSOLETE return (LOCATION_NAME);
-// OBSOLETE case LOC_REGISTER:
-// OBSOLETE case LOC_ARG:
-// OBSOLETE case LOC_REF_ARG:
-// OBSOLETE case LOC_REGPARM:
-// OBSOLETE case LOC_REGPARM_ADDR:
-// OBSOLETE case LOC_LOCAL:
-// OBSOLETE case LOC_LOCAL_ARG:
-// OBSOLETE case LOC_BASEREG:
-// OBSOLETE case LOC_BASEREG_ARG:
-// OBSOLETE if (innermost_block == NULL
-// OBSOLETE || contained_in (block_found, innermost_block))
-// OBSOLETE {
-// OBSOLETE innermost_block = block_found;
-// OBSOLETE }
-// OBSOLETE return (LOCATION_NAME);
-// OBSOLETE break;
-// OBSOLETE case LOC_CONST:
-// OBSOLETE case LOC_LABEL:
-// OBSOLETE return (LOCATION_NAME);
-// OBSOLETE break;
-// OBSOLETE case LOC_TYPEDEF:
-// OBSOLETE yylval.tsym.type = SYMBOL_TYPE (sym);
-// OBSOLETE return TYPENAME;
-// OBSOLETE case LOC_UNDEF:
-// OBSOLETE case LOC_CONST_BYTES:
-// OBSOLETE case LOC_OPTIMIZED_OUT:
-// OBSOLETE error ("Symbol \"%s\" names no location.", inputname);
-// OBSOLETE break;
-// OBSOLETE default:
-// OBSOLETE internal_error (__FILE__, __LINE__,
-// OBSOLETE "unhandled SYMBOL_CLASS in ch_lex()");
-// OBSOLETE break;
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE else if (!have_full_symbols () && !have_partial_symbols ())
-// OBSOLETE {
-// OBSOLETE error ("No symbol table is loaded. Use the \"file\" command.");
-// OBSOLETE }
-// OBSOLETE else
-// OBSOLETE {
-// OBSOLETE error ("No symbol \"%s\" in current context.", inputname);
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Catch single character tokens which are not part of some
-// OBSOLETE longer token. */
-// OBSOLETE
-// OBSOLETE switch (*lexptr)
-// OBSOLETE {
-// OBSOLETE case '.': /* Not float for example. */
-// OBSOLETE lexptr++;
-// OBSOLETE while (isspace (*lexptr))
-// OBSOLETE lexptr++;
-// OBSOLETE inputname = match_simple_name_string ();
-// OBSOLETE if (!inputname)
-// OBSOLETE return '.';
-// OBSOLETE return DOT_FIELD_NAME;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE return (ILLEGAL_TOKEN);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE static void
-// OBSOLETE write_lower_upper_value (enum exp_opcode opcode, /* Either UNOP_LOWER or UNOP_UPPER */
-// OBSOLETE struct type *type)
-// OBSOLETE {
-// OBSOLETE if (type == NULL)
-// OBSOLETE write_exp_elt_opcode (opcode);
-// OBSOLETE else
-// OBSOLETE {
-// OBSOLETE struct type *result_type;
-// OBSOLETE LONGEST val = type_lower_upper (opcode, type, &result_type);
-// OBSOLETE write_exp_elt_opcode (OP_LONG);
-// OBSOLETE write_exp_elt_type (result_type);
-// OBSOLETE write_exp_elt_longcst (val);
-// OBSOLETE write_exp_elt_opcode (OP_LONG);
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE void
-// OBSOLETE chill_error (char *msg)
-// OBSOLETE {
-// OBSOLETE /* Never used. */
-// OBSOLETE }
+++ /dev/null
-// 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 \f
-// 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 \f
-// 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 }
+++ /dev/null
-// 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 **);
+++ /dev/null
-// 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 }
+++ /dev/null
-// 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 \f
-// 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 \f
-// 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 \f
-// 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 }
+++ /dev/null
-# OBSOLETE # Target: ARC processor
-# OBSOLETE TDEPFILES = arc-tdep.o
-# OBSOLETE TM_FILE = tm-arc.h
+++ /dev/null
-// 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 \f
-// 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 \f
-// 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 \f
-// 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 }
+++ /dev/null
-# 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
+++ /dev/null
-/* 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 \f */
-/* 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 */ */
+++ /dev/null
-# 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
+++ /dev/null
-// 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)
+++ /dev/null
-# 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
+++ /dev/null
-# 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
+++ /dev/null
-# 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
+++ /dev/null
-# OBSOLETE # Target: Intel 386 with a.out under Mach 3
-# OBSOLETE TDEPFILES= i386-tdep.o
-# OBSOLETE TM_FILE= tm-i386m3.h
+++ /dev/null
-# 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
+++ /dev/null
-# OBSOLETE # Target: Intel 386 running OS9000
-# OBSOLETE TDEPFILES= i386-tdep.o remote-os9k.o
-# OBSOLETE TM_FILE= tm-i386os9k.h
+++ /dev/null
-// 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 */
+++ /dev/null
-// 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)
+++ /dev/null
-// 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"
+++ /dev/null
-// 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 */
+++ /dev/null
-// 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]))
+++ /dev/null
-// 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
+++ /dev/null
-// 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
+++ /dev/null
-// 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 */
+++ /dev/null
-// 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;
+++ /dev/null
-// 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"
+++ /dev/null
-# 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
+++ /dev/null
-# 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
+++ /dev/null
-// 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 \f
-// 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 \f
-// 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 \f
-// 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.) */
+++ /dev/null
-// 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
+++ /dev/null
-// 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
+++ /dev/null
-// 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) */
+++ /dev/null
-# 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
+++ /dev/null
-# 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
+++ /dev/null
-# OBSOLETE # Target: Apollo m68k in BSD mode
-# OBSOLETE TDEPFILES= m68k-tdep.o dstread.o
-# OBSOLETE TM_FILE= tm-apollo68b.h
+++ /dev/null
-# 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
+++ /dev/null
-# 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
+++ /dev/null
-# OBSOLETE # Target: Hewlett-Packard 9000 series 300, running BSD
-# OBSOLETE TDEPFILES= m68k-tdep.o
-# OBSOLETE TM_FILE= tm-hp300bsd.h
+++ /dev/null
-# 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
+++ /dev/null
-# 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
+++ /dev/null
-# 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
+++ /dev/null
-# OBSOLETE # Target: Motorola 88k running SVR3
-# OBSOLETE TDEPFILES= m88k-tdep.o
-# OBSOLETE TM_FILE= tm-delta88.h
+++ /dev/null
-# 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
+++ /dev/null
-# OBSOLETE # Target: Motorola 88k running SVR4
-# OBSOLETE TDEPFILES= m88k-tdep.o
-# OBSOLETE TM_FILE= tm-delta88v4.h
+++ /dev/null
-# 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
+++ /dev/null
-# OBSOLETE # Target: Motorola 88k Binary Compatibility Standard
-# OBSOLETE TDEPFILES= m88k-tdep.o remote-bug.o
-# OBSOLETE TM_FILE= tm-m88k.h
+++ /dev/null
-// 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"
+++ /dev/null
-// 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));
+++ /dev/null
-// 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)
+++ /dev/null
-// 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)
+++ /dev/null
-// 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 \f
-// 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)
+++ /dev/null
-// 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
+++ /dev/null
-// 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
+++ /dev/null
-// 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 *) ®isters[REGISTER_BYTE (regi)];
-// OBSOLETE
-// OBSOLETE if ((regno == -1) || (regno == SXIP_REGNUM))
-// OBSOLETE *(regp + R_XIP) = *(int *) ®isters[REGISTER_BYTE (SXIP_REGNUM)];
-// OBSOLETE if ((regno == -1) || (regno == SNIP_REGNUM))
-// OBSOLETE *(regp + R_NIP) = *(int *) ®isters[REGISTER_BYTE (SNIP_REGNUM)];
-// OBSOLETE if ((regno == -1) || (regno == SFIP_REGNUM))
-// OBSOLETE *(regp + R_FIP) = *(int *) ®isters[REGISTER_BYTE (SFIP_REGNUM)];
-// OBSOLETE if ((regno == -1) || (regno == PSR_REGNUM))
-// OBSOLETE *(regp + R_PSR) = *(int *) ®isters[REGISTER_BYTE (PSR_REGNUM)];
-// OBSOLETE if ((regno == -1) || (regno == FPSR_REGNUM))
-// OBSOLETE *(regp + R_FPSR) = *(int *) ®isters[REGISTER_BYTE (FPSR_REGNUM)];
-// OBSOLETE if ((regno == -1) || (regno == FPCR_REGNUM))
-// OBSOLETE *(regp + R_FPCR) = *(int *) ®isters[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 (§ion_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, §ion_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 */
+++ /dev/null
-/* OBSOLETE /* Target-dependent code for Mitsubishi D30V, for GDB. */
-/* OBSOLETE */
-/* OBSOLETE Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002 Free Software */
-/* OBSOLETE 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 /* Contributed by Martin Hunt, hunt@cygnus.com */ */
-/* OBSOLETE */
-/* OBSOLETE #include "defs.h" */
-/* OBSOLETE #include "frame.h" */
-/* OBSOLETE #include "obstack.h" */
-/* OBSOLETE #include "symtab.h" */
-/* OBSOLETE #include "gdbtypes.h" */
-/* OBSOLETE #include "gdbcmd.h" */
-/* OBSOLETE #include "gdbcore.h" */
-/* OBSOLETE #include "gdb_string.h" */
-/* OBSOLETE #include "value.h" */
-/* OBSOLETE #include "inferior.h" */
-/* OBSOLETE #include "dis-asm.h" */
-/* OBSOLETE #include "symfile.h" */
-/* OBSOLETE #include "objfiles.h" */
-/* OBSOLETE #include "regcache.h" */
-/* OBSOLETE */
-/* OBSOLETE #include "language.h" /* For local_hex_string() */ */
-/* OBSOLETE */
-/* OBSOLETE void d30v_frame_find_saved_regs (struct frame_info *fi, */
-/* OBSOLETE struct frame_saved_regs *fsr); */
-/* OBSOLETE void d30v_frame_find_saved_regs_offsets (struct frame_info *fi, */
-/* OBSOLETE struct frame_saved_regs *fsr); */
-/* OBSOLETE static void d30v_pop_dummy_frame (struct frame_info *fi); */
-/* OBSOLETE static void d30v_print_flags (void); */
-/* OBSOLETE static void print_flags_command (char *, int); */
-/* OBSOLETE */
-/* OBSOLETE /* the following defines assume: */
-/* OBSOLETE fp is r61, lr is r62, sp is r63, and ?? is r22 */
-/* OBSOLETE if that changes, they will need to be updated */ */
-/* OBSOLETE */
-/* OBSOLETE #define OP_MASK_ALL_BUT_RA 0x0ffc0fff /* throw away Ra, keep the rest */ */
-/* OBSOLETE */
-/* OBSOLETE #define OP_STW_SPM 0x054c0fc0 /* stw Ra, @(sp-) */ */
-/* OBSOLETE #define OP_STW_SP_R0 0x05400fc0 /* stw Ra, @(sp,r0) */ */
-/* OBSOLETE #define OP_STW_SP_IMM0 0x05480fc0 /* st Ra, @(sp, 0x0) */ */
-/* OBSOLETE #define OP_STW_R22P_R0 0x05440580 /* stw Ra, @(r22+,r0) */ */
-/* OBSOLETE */
-/* OBSOLETE #define OP_ST2W_SPM 0x056c0fc0 /* st2w Ra, @(sp-) */ */
-/* OBSOLETE #define OP_ST2W_SP_R0 0x05600fc0 /* st2w Ra, @(sp, r0) */ */
-/* OBSOLETE #define OP_ST2W_SP_IMM0 0x05680fc0 /* st2w Ra, @(sp, 0x0) */ */
-/* OBSOLETE #define OP_ST2W_R22P_R0 0x05640580 /* st2w Ra, @(r22+, r0) */ */
-/* OBSOLETE */
-/* OBSOLETE #define OP_MASK_OPCODE 0x0ffc0000 /* just the opcode, ign operands */ */
-/* OBSOLETE #define OP_NOP 0x00f00000 /* nop */ */
-/* OBSOLETE */
-/* OBSOLETE #define OP_MASK_ALL_BUT_IMM 0x0fffffc0 /* throw away imm, keep the rest */ */
-/* OBSOLETE #define OP_SUB_SP_IMM 0x082bffc0 /* sub sp,sp,imm */ */
-/* OBSOLETE #define OP_ADD_SP_IMM 0x080bffc0 /* add sp,sp,imm */ */
-/* OBSOLETE #define OP_ADD_R22_SP_IMM 0x08096fc0 /* add r22,sp,imm */ */
-/* OBSOLETE #define OP_STW_FP_SP_IMM 0x054bdfc0 /* stw fp,@(sp,imm) */ */
-/* OBSOLETE #define OP_OR_SP_R0_IMM 0x03abf000 /* or sp,r0,imm */ */
-/* OBSOLETE */
-/* OBSOLETE /* no mask */ */
-/* OBSOLETE #define OP_OR_FP_R0_SP 0x03a3d03f /* or fp,r0,sp */ */
-/* OBSOLETE #define OP_OR_FP_SP_R0 0x03a3dfc0 /* or fp,sp,r0 */ */
-/* OBSOLETE #define OP_OR_FP_IMM0_SP 0x03abd03f /* or fp,0x0,sp */ */
-/* OBSOLETE #define OP_STW_FP_R22P_R0 0x0547d580 /* stw fp,@(r22+,r0) */ */
-/* OBSOLETE #define OP_STW_LR_R22P_R0 0x0547e580 /* stw lr,@(r22+,r0) */ */
-/* OBSOLETE */
-/* OBSOLETE #define OP_MASK_OP_AND_RB 0x0ff80fc0 /* keep op and rb,throw away rest */ */
-/* OBSOLETE #define OP_STW_SP_IMM 0x05480fc0 /* stw Ra,@(sp,imm) */ */
-/* OBSOLETE #define OP_ST2W_SP_IMM 0x05680fc0 /* st2w Ra,@(sp,imm) */ */
-/* OBSOLETE #define OP_STW_FP_IMM 0x05480f40 /* stw Ra,@(fp,imm) */ */
-/* OBSOLETE #define OP_STW_FP_R0 0x05400f40 /* stw Ra,@(fp,r0) */ */
-/* OBSOLETE */
-/* OBSOLETE #define OP_MASK_FM_BIT 0x80000000 */
-/* OBSOLETE #define OP_MASK_CC_BITS 0x70000000 */
-/* OBSOLETE #define OP_MASK_SUB_INST 0x0fffffff */
-/* OBSOLETE */
-/* OBSOLETE #define EXTRACT_RA(op) (((op) >> 12) & 0x3f) */
-/* OBSOLETE #define EXTRACT_RB(op) (((op) >> 6) & 0x3f) */
-/* OBSOLETE #define EXTRACT_RC(op) (((op) & 0x3f) */
-/* OBSOLETE #define EXTRACT_UIMM6(op) ((op) & 0x3f) */
-/* OBSOLETE #define EXTRACT_IMM6(op) ((((int)EXTRACT_UIMM6(op)) << 26) >> 26) */
-/* OBSOLETE #define EXTRACT_IMM26(op) ((((op)&0x0ff00000) >> 2) | ((op)&0x0003ffff)) */
-/* OBSOLETE #define EXTRACT_IMM32(opl, opr) ((EXTRACT_UIMM6(opl) << 26)|EXTRACT_IMM26(opr)) */
-/* OBSOLETE */
-/* OBSOLETE */
-/* OBSOLETE int */
-/* OBSOLETE d30v_frame_chain_valid (CORE_ADDR chain, struct frame_info *fi) */
-/* OBSOLETE { */
-/* OBSOLETE #if 0 */
-/* OBSOLETE return ((chain) != 0 && (fi) != 0 && (fi)->return_pc != 0); */
-/* OBSOLETE #else */
-/* OBSOLETE return ((chain) != 0 && (fi) != 0 && (fi)->frame <= chain); */
-/* OBSOLETE #endif */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE /* Discard from the stack the innermost frame, restoring all saved */
-/* OBSOLETE registers. */ */
-/* OBSOLETE */
-/* OBSOLETE void */
-/* OBSOLETE d30v_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 raw_buffer[8]; */
-/* OBSOLETE */
-/* OBSOLETE fp = FRAME_FP (frame); */
-/* OBSOLETE if (frame->dummy) */
-/* OBSOLETE { */
-/* OBSOLETE d30v_pop_dummy_frame (frame); */
-/* OBSOLETE return; */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE /* fill out fsr with the address of where each */ */
-/* OBSOLETE /* register was stored in the frame */ */
-/* OBSOLETE get_frame_saved_regs (frame, &fsr); */
-/* OBSOLETE */
-/* OBSOLETE /* now update the current registers with the old values */ */
-/* OBSOLETE for (regnum = A0_REGNUM; regnum < A0_REGNUM + 2; regnum++) */
-/* OBSOLETE { */
-/* OBSOLETE if (fsr.regs[regnum]) */
-/* OBSOLETE { */
-/* OBSOLETE read_memory (fsr.regs[regnum], raw_buffer, 8); */
-/* OBSOLETE write_register_bytes (REGISTER_BYTE (regnum), raw_buffer, 8); */
-/* OBSOLETE } */
-/* OBSOLETE } */
-/* OBSOLETE for (regnum = 0; regnum < SP_REGNUM; regnum++) */
-/* OBSOLETE { */
-/* OBSOLETE if (fsr.regs[regnum]) */
-/* OBSOLETE { */
-/* OBSOLETE write_register (regnum, read_memory_unsigned_integer (fsr.regs[regnum], 4)); */
-/* OBSOLETE } */
-/* OBSOLETE } */
-/* OBSOLETE if (fsr.regs[PSW_REGNUM]) */
-/* OBSOLETE { */
-/* OBSOLETE write_register (PSW_REGNUM, read_memory_unsigned_integer (fsr.regs[PSW_REGNUM], 4)); */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE write_register (PC_REGNUM, read_register (LR_REGNUM)); */
-/* OBSOLETE write_register (SP_REGNUM, fp + frame->size); */
-/* OBSOLETE target_store_registers (-1); */
-/* OBSOLETE flush_cached_frames (); */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE static int */
-/* OBSOLETE check_prologue (unsigned long op) */
-/* OBSOLETE { */
-/* OBSOLETE /* add sp,sp,imm -- observed */ */
-/* OBSOLETE if ((op & OP_MASK_ALL_BUT_IMM) == OP_ADD_SP_IMM) */
-/* OBSOLETE return 1; */
-/* OBSOLETE */
-/* OBSOLETE /* add r22,sp,imm -- observed */ */
-/* OBSOLETE if ((op & OP_MASK_ALL_BUT_IMM) == OP_ADD_R22_SP_IMM) */
-/* OBSOLETE return 1; */
-/* OBSOLETE */
-/* OBSOLETE /* or fp,r0,sp -- observed */ */
-/* OBSOLETE if (op == OP_OR_FP_R0_SP) */
-/* OBSOLETE return 1; */
-/* OBSOLETE */
-/* OBSOLETE /* nop */ */
-/* OBSOLETE if ((op & OP_MASK_OPCODE) == OP_NOP) */
-/* OBSOLETE return 1; */
-/* OBSOLETE */
-/* OBSOLETE /* stw Ra,@(sp,r0) */ */
-/* OBSOLETE if ((op & OP_MASK_ALL_BUT_RA) == OP_STW_SP_R0) */
-/* OBSOLETE return 1; */
-/* OBSOLETE */
-/* OBSOLETE /* stw Ra,@(sp,0x0) */ */
-/* OBSOLETE if ((op & OP_MASK_ALL_BUT_RA) == OP_STW_SP_IMM0) */
-/* OBSOLETE return 1; */
-/* OBSOLETE */
-/* OBSOLETE /* st2w Ra,@(sp,r0) */ */
-/* OBSOLETE if ((op & OP_MASK_ALL_BUT_RA) == OP_ST2W_SP_R0) */
-/* OBSOLETE return 1; */
-/* OBSOLETE */
-/* OBSOLETE /* st2w Ra,@(sp,0x0) */ */
-/* OBSOLETE if ((op & OP_MASK_ALL_BUT_RA) == OP_ST2W_SP_IMM0) */
-/* OBSOLETE return 1; */
-/* OBSOLETE */
-/* OBSOLETE /* stw fp, @(r22+,r0) -- observed */ */
-/* OBSOLETE if (op == OP_STW_FP_R22P_R0) */
-/* OBSOLETE return 1; */
-/* OBSOLETE */
-/* OBSOLETE /* stw r62, @(r22+,r0) -- observed */ */
-/* OBSOLETE if (op == OP_STW_LR_R22P_R0) */
-/* OBSOLETE return 1; */
-/* OBSOLETE */
-/* OBSOLETE /* stw Ra, @(fp,r0) -- observed */ */
-/* OBSOLETE if ((op & OP_MASK_ALL_BUT_RA) == OP_STW_FP_R0) */
-/* OBSOLETE return 1; /* first arg */ */
-/* OBSOLETE */
-/* OBSOLETE /* stw Ra, @(fp,imm) -- observed */ */
-/* OBSOLETE if ((op & OP_MASK_OP_AND_RB) == OP_STW_FP_IMM) */
-/* OBSOLETE return 1; /* second and subsequent args */ */
-/* OBSOLETE */
-/* OBSOLETE /* stw fp,@(sp,imm) -- observed */ */
-/* OBSOLETE if ((op & OP_MASK_ALL_BUT_IMM) == OP_STW_FP_SP_IMM) */
-/* OBSOLETE return 1; */
-/* OBSOLETE */
-/* OBSOLETE /* st2w Ra,@(r22+,r0) */ */
-/* OBSOLETE if ((op & OP_MASK_ALL_BUT_RA) == OP_ST2W_R22P_R0) */
-/* OBSOLETE return 1; */
-/* OBSOLETE */
-/* OBSOLETE /* stw Ra, @(sp-) */ */
-/* OBSOLETE if ((op & OP_MASK_ALL_BUT_RA) == OP_STW_SPM) */
-/* OBSOLETE return 1; */
-/* OBSOLETE */
-/* OBSOLETE /* st2w Ra, @(sp-) */ */
-/* OBSOLETE if ((op & OP_MASK_ALL_BUT_RA) == OP_ST2W_SPM) */
-/* OBSOLETE return 1; */
-/* OBSOLETE */
-/* OBSOLETE /* sub.? sp,sp,imm */ */
-/* OBSOLETE if ((op & OP_MASK_ALL_BUT_IMM) == OP_SUB_SP_IMM) */
-/* OBSOLETE return 1; */
-/* OBSOLETE */
-/* OBSOLETE return 0; */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE CORE_ADDR */
-/* OBSOLETE d30v_skip_prologue (CORE_ADDR pc) */
-/* OBSOLETE { */
-/* OBSOLETE unsigned long op[2]; */
-/* OBSOLETE unsigned long opl, opr; /* left / right sub operations */ */
-/* OBSOLETE unsigned long fm0, fm1; /* left / right mode bits */ */
-/* OBSOLETE unsigned long cc0, cc1; */
-/* OBSOLETE unsigned long op1, op2; */
-/* OBSOLETE CORE_ADDR func_addr, func_end; */
-/* OBSOLETE struct symtab_and_line sal; */
-/* OBSOLETE */
-/* OBSOLETE /* If we have line debugging information, then the end of the */ */
-/* OBSOLETE /* prologue should the first assembly instruction of the first source line */ */
-/* OBSOLETE if (find_pc_partial_function (pc, NULL, &func_addr, &func_end)) */
-/* OBSOLETE { */
-/* OBSOLETE sal = find_pc_line (func_addr, 0); */
-/* OBSOLETE if (sal.end && sal.end < func_end) */
-/* OBSOLETE return sal.end; */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE if (target_read_memory (pc, (char *) &op[0], 8)) */
-/* OBSOLETE return pc; /* Can't access it -- assume no prologue. */ */
-/* OBSOLETE */
-/* OBSOLETE while (1) */
-/* OBSOLETE { */
-/* OBSOLETE opl = (unsigned long) read_memory_integer (pc, 4); */
-/* OBSOLETE opr = (unsigned long) read_memory_integer (pc + 4, 4); */
-/* OBSOLETE */
-/* OBSOLETE fm0 = (opl & OP_MASK_FM_BIT); */
-/* OBSOLETE fm1 = (opr & OP_MASK_FM_BIT); */
-/* OBSOLETE */
-/* OBSOLETE cc0 = (opl & OP_MASK_CC_BITS); */
-/* OBSOLETE cc1 = (opr & OP_MASK_CC_BITS); */
-/* OBSOLETE */
-/* OBSOLETE opl = (opl & OP_MASK_SUB_INST); */
-/* OBSOLETE opr = (opr & OP_MASK_SUB_INST); */
-/* OBSOLETE */
-/* OBSOLETE if (fm0 && fm1) */
-/* OBSOLETE { */
-/* OBSOLETE /* long instruction (opl contains the opcode) */ */
-/* OBSOLETE if (((opl & OP_MASK_ALL_BUT_IMM) != OP_ADD_SP_IMM) && /* add sp,sp,imm */ */
-/* OBSOLETE ((opl & OP_MASK_ALL_BUT_IMM) != OP_ADD_R22_SP_IMM) && /* add r22,sp,imm */ */
-/* OBSOLETE ((opl & OP_MASK_OP_AND_RB) != OP_STW_SP_IMM) && /* stw Ra, @(sp,imm) */ */
-/* OBSOLETE ((opl & OP_MASK_OP_AND_RB) != OP_ST2W_SP_IMM)) /* st2w Ra, @(sp,imm) */ */
-/* OBSOLETE break; */
-/* OBSOLETE } */
-/* OBSOLETE else */
-/* OBSOLETE { */
-/* OBSOLETE /* short instructions */ */
-/* OBSOLETE if (fm0 && !fm1) */
-/* OBSOLETE { */
-/* OBSOLETE op1 = opr; */
-/* OBSOLETE op2 = opl; */
-/* OBSOLETE } */
-/* OBSOLETE else */
-/* OBSOLETE { */
-/* OBSOLETE op1 = opl; */
-/* OBSOLETE op2 = opr; */
-/* OBSOLETE } */
-/* OBSOLETE if (check_prologue (op1)) */
-/* OBSOLETE { */
-/* OBSOLETE if (!check_prologue (op2)) */
-/* OBSOLETE { */
-/* OBSOLETE /* if the previous opcode was really part of the prologue */ */
-/* OBSOLETE /* and not just a NOP, then we want to break after both instructions */ */
-/* OBSOLETE if ((op1 & OP_MASK_OPCODE) != OP_NOP) */
-/* OBSOLETE pc += 8; */
-/* OBSOLETE break; */
-/* OBSOLETE } */
-/* OBSOLETE } */
-/* OBSOLETE else */
-/* OBSOLETE break; */
-/* OBSOLETE } */
-/* OBSOLETE pc += 8; */
-/* OBSOLETE } */
-/* OBSOLETE return pc; */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE static int end_of_stack; */
-/* 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 */
-/* OBSOLETE CORE_ADDR */
-/* OBSOLETE d30v_frame_chain (struct frame_info *frame) */
-/* OBSOLETE { */
-/* OBSOLETE struct frame_saved_regs fsr; */
-/* OBSOLETE */
-/* OBSOLETE d30v_frame_find_saved_regs (frame, &fsr); */
-/* OBSOLETE */
-/* OBSOLETE if (end_of_stack) */
-/* OBSOLETE return (CORE_ADDR) 0; */
-/* OBSOLETE */
-/* OBSOLETE if (frame->return_pc == IMEM_START) */
-/* OBSOLETE return (CORE_ADDR) 0; */
-/* OBSOLETE */
-/* OBSOLETE if (!fsr.regs[FP_REGNUM]) */
-/* OBSOLETE { */
-/* OBSOLETE if (!fsr.regs[SP_REGNUM] || fsr.regs[SP_REGNUM] == STACK_START) */
-/* OBSOLETE return (CORE_ADDR) 0; */
-/* OBSOLETE */
-/* OBSOLETE return fsr.regs[SP_REGNUM]; */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE if (!read_memory_unsigned_integer (fsr.regs[FP_REGNUM], 4)) */
-/* OBSOLETE return (CORE_ADDR) 0; */
-/* OBSOLETE */
-/* OBSOLETE return read_memory_unsigned_integer (fsr.regs[FP_REGNUM], 4); */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE static int next_addr, uses_frame; */
-/* OBSOLETE static int frame_size; */
-/* OBSOLETE */
-/* OBSOLETE static int */
-/* OBSOLETE prologue_find_regs (unsigned long op, struct frame_saved_regs *fsr, */
-/* OBSOLETE CORE_ADDR addr) */
-/* OBSOLETE { */
-/* OBSOLETE int n; */
-/* OBSOLETE int offset; */
-/* OBSOLETE */
-/* OBSOLETE /* add sp,sp,imm -- observed */ */
-/* OBSOLETE if ((op & OP_MASK_ALL_BUT_IMM) == OP_ADD_SP_IMM) */
-/* OBSOLETE { */
-/* OBSOLETE offset = EXTRACT_IMM6 (op); */
-/* OBSOLETE /*next_addr += offset; */ */
-/* OBSOLETE frame_size += -offset; */
-/* OBSOLETE return 1; */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE /* add r22,sp,imm -- observed */ */
-/* OBSOLETE if ((op & OP_MASK_ALL_BUT_IMM) == OP_ADD_R22_SP_IMM) */
-/* OBSOLETE { */
-/* OBSOLETE offset = EXTRACT_IMM6 (op); */
-/* OBSOLETE next_addr = (offset - frame_size); */
-/* OBSOLETE return 1; */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE /* stw Ra, @(fp, offset) -- observed */ */
-/* OBSOLETE if ((op & OP_MASK_OP_AND_RB) == OP_STW_FP_IMM) */
-/* OBSOLETE { */
-/* OBSOLETE n = EXTRACT_RA (op); */
-/* OBSOLETE offset = EXTRACT_IMM6 (op); */
-/* OBSOLETE fsr->regs[n] = (offset - frame_size); */
-/* OBSOLETE return 1; */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE /* stw Ra, @(fp, r0) -- observed */ */
-/* OBSOLETE if ((op & OP_MASK_ALL_BUT_RA) == OP_STW_FP_R0) */
-/* OBSOLETE { */
-/* OBSOLETE n = EXTRACT_RA (op); */
-/* OBSOLETE fsr->regs[n] = (-frame_size); */
-/* OBSOLETE return 1; */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE /* or fp,0,sp -- observed */ */
-/* OBSOLETE if ((op == OP_OR_FP_R0_SP) || */
-/* OBSOLETE (op == OP_OR_FP_SP_R0) || */
-/* OBSOLETE (op == OP_OR_FP_IMM0_SP)) */
-/* OBSOLETE { */
-/* OBSOLETE uses_frame = 1; */
-/* OBSOLETE return 1; */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE /* nop */ */
-/* OBSOLETE if ((op & OP_MASK_OPCODE) == OP_NOP) */
-/* OBSOLETE return 1; */
-/* OBSOLETE */
-/* OBSOLETE /* stw Ra,@(r22+,r0) -- observed */ */
-/* OBSOLETE if ((op & OP_MASK_ALL_BUT_RA) == OP_STW_R22P_R0) */
-/* OBSOLETE { */
-/* OBSOLETE n = EXTRACT_RA (op); */
-/* OBSOLETE fsr->regs[n] = next_addr; */
-/* OBSOLETE next_addr += 4; */
-/* OBSOLETE return 1; */
-/* OBSOLETE } */
-/* OBSOLETE #if 0 /* subsumed in pattern above */ */
-/* OBSOLETE /* stw fp,@(r22+,r0) -- observed */ */
-/* OBSOLETE if (op == OP_STW_FP_R22P_R0) */
-/* OBSOLETE { */
-/* OBSOLETE fsr->regs[FP_REGNUM] = next_addr; /* XXX */ */
-/* OBSOLETE next_addr += 4; */
-/* OBSOLETE return 1; */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE /* stw r62,@(r22+,r0) -- observed */ */
-/* OBSOLETE if (op == OP_STW_LR_R22P_R0) */
-/* OBSOLETE { */
-/* OBSOLETE fsr->regs[LR_REGNUM] = next_addr; */
-/* OBSOLETE next_addr += 4; */
-/* OBSOLETE return 1; */
-/* OBSOLETE } */
-/* OBSOLETE #endif */
-/* OBSOLETE /* st2w Ra,@(r22+,r0) -- observed */ */
-/* OBSOLETE if ((op & OP_MASK_ALL_BUT_RA) == OP_ST2W_R22P_R0) */
-/* OBSOLETE { */
-/* OBSOLETE n = EXTRACT_RA (op); */
-/* OBSOLETE fsr->regs[n] = next_addr; */
-/* OBSOLETE fsr->regs[n + 1] = next_addr + 4; */
-/* OBSOLETE next_addr += 8; */
-/* OBSOLETE return 1; */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE /* stw rn, @(sp-) */ */
-/* OBSOLETE if ((op & OP_MASK_ALL_BUT_RA) == OP_STW_SPM) */
-/* OBSOLETE { */
-/* OBSOLETE n = EXTRACT_RA (op); */
-/* OBSOLETE fsr->regs[n] = next_addr; */
-/* OBSOLETE next_addr -= 4; */
-/* OBSOLETE return 1; */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE /* st2w Ra, @(sp-) */ */
-/* OBSOLETE else if ((op & OP_MASK_ALL_BUT_RA) == OP_ST2W_SPM) */
-/* OBSOLETE { */
-/* OBSOLETE n = EXTRACT_RA (op); */
-/* OBSOLETE fsr->regs[n] = next_addr; */
-/* OBSOLETE fsr->regs[n + 1] = next_addr + 4; */
-/* OBSOLETE next_addr -= 8; */
-/* OBSOLETE return 1; */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE /* sub sp,sp,imm */ */
-/* OBSOLETE if ((op & OP_MASK_ALL_BUT_IMM) == OP_SUB_SP_IMM) */
-/* OBSOLETE { */
-/* OBSOLETE offset = EXTRACT_IMM6 (op); */
-/* OBSOLETE frame_size += -offset; */
-/* OBSOLETE return 1; */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE /* st rn, @(sp,0) -- observed */ */
-/* OBSOLETE if (((op & OP_MASK_ALL_BUT_RA) == OP_STW_SP_R0) || */
-/* OBSOLETE ((op & OP_MASK_ALL_BUT_RA) == OP_STW_SP_IMM0)) */
-/* OBSOLETE { */
-/* OBSOLETE n = EXTRACT_RA (op); */
-/* OBSOLETE fsr->regs[n] = (-frame_size); */
-/* OBSOLETE return 1; */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE /* st2w rn, @(sp,0) */ */
-/* OBSOLETE if (((op & OP_MASK_ALL_BUT_RA) == OP_ST2W_SP_R0) || */
-/* OBSOLETE ((op & OP_MASK_ALL_BUT_RA) == OP_ST2W_SP_IMM0)) */
-/* OBSOLETE { */
-/* OBSOLETE n = EXTRACT_RA (op); */
-/* OBSOLETE fsr->regs[n] = (-frame_size); */
-/* OBSOLETE fsr->regs[n + 1] = (-frame_size) + 4; */
-/* OBSOLETE return 1; */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE /* stw fp,@(sp,imm) -- observed */ */
-/* OBSOLETE if ((op & OP_MASK_ALL_BUT_IMM) == OP_STW_FP_SP_IMM) */
-/* OBSOLETE { */
-/* OBSOLETE offset = EXTRACT_IMM6 (op); */
-/* OBSOLETE fsr->regs[FP_REGNUM] = (offset - frame_size); */
-/* OBSOLETE return 1; */
-/* OBSOLETE } */
-/* OBSOLETE return 0; */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE /* Put here the code to store, into a struct frame_saved_regs, the */
-/* OBSOLETE 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: the address we */
-/* OBSOLETE return for it IS the sp for the next frame. */ */
-/* OBSOLETE void */
-/* OBSOLETE d30v_frame_find_saved_regs (struct frame_info *fi, struct frame_saved_regs *fsr) */
-/* OBSOLETE { */
-/* OBSOLETE CORE_ADDR fp, pc; */
-/* OBSOLETE unsigned long opl, opr; */
-/* OBSOLETE unsigned long op1, op2; */
-/* OBSOLETE unsigned long fm0, fm1; */
-/* OBSOLETE int i; */
-/* OBSOLETE */
-/* OBSOLETE fp = fi->frame; */
-/* OBSOLETE memset (fsr, 0, sizeof (*fsr)); */
-/* OBSOLETE next_addr = 0; */
-/* OBSOLETE frame_size = 0; */
-/* OBSOLETE end_of_stack = 0; */
-/* OBSOLETE */
-/* OBSOLETE uses_frame = 0; */
-/* OBSOLETE */
-/* OBSOLETE d30v_frame_find_saved_regs_offsets (fi, fsr); */
-/* OBSOLETE */
-/* OBSOLETE fi->size = frame_size; */
-/* OBSOLETE */
-/* OBSOLETE if (!fp) */
-/* OBSOLETE fp = read_register (SP_REGNUM); */
-/* OBSOLETE */
-/* OBSOLETE for (i = 0; i < NUM_REGS - 1; i++) */
-/* OBSOLETE if (fsr->regs[i]) */
-/* OBSOLETE { */
-/* OBSOLETE fsr->regs[i] = fsr->regs[i] + fp + frame_size; */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE if (fsr->regs[LR_REGNUM]) */
-/* OBSOLETE fi->return_pc = read_memory_unsigned_integer (fsr->regs[LR_REGNUM], 4); */
-/* OBSOLETE else */
-/* OBSOLETE fi->return_pc = read_register (LR_REGNUM); */
-/* OBSOLETE */
-/* OBSOLETE /* the SP is not normally (ever?) saved, but check anyway */ */
-/* OBSOLETE if (!fsr->regs[SP_REGNUM]) */
-/* OBSOLETE { */
-/* OBSOLETE /* if the FP was saved, that means the current FP is valid, */ */
-/* OBSOLETE /* otherwise, it isn't being used, so we use the SP instead */ */
-/* OBSOLETE if (uses_frame) */
-/* OBSOLETE fsr->regs[SP_REGNUM] = read_register (FP_REGNUM) + fi->size; */
-/* OBSOLETE else */
-/* OBSOLETE { */
-/* OBSOLETE fsr->regs[SP_REGNUM] = fp + fi->size; */
-/* OBSOLETE fi->frameless = 1; */
-/* OBSOLETE fsr->regs[FP_REGNUM] = 0; */
-/* OBSOLETE } */
-/* OBSOLETE } */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE void */
-/* OBSOLETE d30v_frame_find_saved_regs_offsets (struct frame_info *fi, */
-/* OBSOLETE struct frame_saved_regs *fsr) */
-/* OBSOLETE { */
-/* OBSOLETE CORE_ADDR fp, pc; */
-/* OBSOLETE unsigned long opl, opr; */
-/* OBSOLETE unsigned long op1, op2; */
-/* OBSOLETE unsigned long fm0, fm1; */
-/* OBSOLETE int i; */
-/* OBSOLETE */
-/* OBSOLETE fp = fi->frame; */
-/* OBSOLETE memset (fsr, 0, sizeof (*fsr)); */
-/* OBSOLETE next_addr = 0; */
-/* OBSOLETE frame_size = 0; */
-/* OBSOLETE end_of_stack = 0; */
-/* OBSOLETE */
-/* OBSOLETE pc = get_pc_function_start (fi->pc); */
-/* OBSOLETE */
-/* OBSOLETE uses_frame = 0; */
-/* OBSOLETE while (pc < fi->pc) */
-/* OBSOLETE { */
-/* OBSOLETE opl = (unsigned long) read_memory_integer (pc, 4); */
-/* OBSOLETE opr = (unsigned long) read_memory_integer (pc + 4, 4); */
-/* OBSOLETE */
-/* OBSOLETE fm0 = (opl & OP_MASK_FM_BIT); */
-/* OBSOLETE fm1 = (opr & OP_MASK_FM_BIT); */
-/* OBSOLETE */
-/* OBSOLETE opl = (opl & OP_MASK_SUB_INST); */
-/* OBSOLETE opr = (opr & OP_MASK_SUB_INST); */
-/* OBSOLETE */
-/* OBSOLETE if (fm0 && fm1) */
-/* OBSOLETE { */
-/* OBSOLETE /* long instruction */ */
-/* OBSOLETE if ((opl & OP_MASK_ALL_BUT_IMM) == OP_ADD_SP_IMM) */
-/* OBSOLETE { */
-/* OBSOLETE /* add sp,sp,n */ */
-/* OBSOLETE long offset = EXTRACT_IMM32 (opl, opr); */
-/* OBSOLETE frame_size += -offset; */
-/* OBSOLETE } */
-/* OBSOLETE else if ((opl & OP_MASK_ALL_BUT_IMM) == OP_ADD_R22_SP_IMM) */
-/* OBSOLETE { */
-/* OBSOLETE /* add r22,sp,offset */ */
-/* OBSOLETE long offset = EXTRACT_IMM32 (opl, opr); */
-/* OBSOLETE next_addr = (offset - frame_size); */
-/* OBSOLETE } */
-/* OBSOLETE else if ((opl & OP_MASK_OP_AND_RB) == OP_STW_SP_IMM) */
-/* OBSOLETE { */
-/* OBSOLETE /* st Ra, @(sp,imm) */ */
-/* OBSOLETE long offset = EXTRACT_IMM32 (opl, opr); */
-/* OBSOLETE short n = EXTRACT_RA (opl); */
-/* OBSOLETE fsr->regs[n] = (offset - frame_size); */
-/* OBSOLETE } */
-/* OBSOLETE else if ((opl & OP_MASK_OP_AND_RB) == OP_ST2W_SP_IMM) */
-/* OBSOLETE { */
-/* OBSOLETE /* st2w Ra, @(sp,offset) */ */
-/* OBSOLETE long offset = EXTRACT_IMM32 (opl, opr); */
-/* OBSOLETE short n = EXTRACT_RA (opl); */
-/* OBSOLETE fsr->regs[n] = (offset - frame_size); */
-/* OBSOLETE fsr->regs[n + 1] = (offset - frame_size) + 4; */
-/* OBSOLETE } */
-/* OBSOLETE else if ((opl & OP_MASK_ALL_BUT_IMM) == OP_OR_SP_R0_IMM) */
-/* OBSOLETE { */
-/* OBSOLETE end_of_stack = 1; */
-/* OBSOLETE } */
-/* OBSOLETE else */
-/* OBSOLETE break; */
-/* OBSOLETE } */
-/* OBSOLETE else */
-/* OBSOLETE { */
-/* OBSOLETE /* short instructions */ */
-/* OBSOLETE if (fm0 && !fm1) */
-/* OBSOLETE { */
-/* OBSOLETE op2 = opl; */
-/* OBSOLETE op1 = opr; */
-/* OBSOLETE } */
-/* OBSOLETE else */
-/* OBSOLETE { */
-/* OBSOLETE op1 = opl; */
-/* OBSOLETE op2 = opr; */
-/* OBSOLETE } */
-/* OBSOLETE if (!prologue_find_regs (op1, fsr, pc) || !prologue_find_regs (op2, fsr, pc)) */
-/* OBSOLETE break; */
-/* OBSOLETE } */
-/* OBSOLETE pc += 8; */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE #if 0 */
-/* OBSOLETE fi->size = frame_size; */
-/* OBSOLETE */
-/* OBSOLETE if (!fp) */
-/* OBSOLETE fp = read_register (SP_REGNUM); */
-/* OBSOLETE */
-/* OBSOLETE for (i = 0; i < NUM_REGS - 1; i++) */
-/* OBSOLETE if (fsr->regs[i]) */
-/* OBSOLETE { */
-/* OBSOLETE fsr->regs[i] = fsr->regs[i] + fp + frame_size; */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE if (fsr->regs[LR_REGNUM]) */
-/* OBSOLETE fi->return_pc = read_memory_unsigned_integer (fsr->regs[LR_REGNUM], 4); */
-/* OBSOLETE else */
-/* OBSOLETE fi->return_pc = read_register (LR_REGNUM); */
-/* OBSOLETE */
-/* OBSOLETE /* the SP is not normally (ever?) saved, but check anyway */ */
-/* OBSOLETE if (!fsr->regs[SP_REGNUM]) */
-/* OBSOLETE { */
-/* OBSOLETE /* if the FP was saved, that means the current FP is valid, */ */
-/* OBSOLETE /* otherwise, it isn't being used, so we use the SP instead */ */
-/* OBSOLETE if (uses_frame) */
-/* OBSOLETE fsr->regs[SP_REGNUM] = read_register (FP_REGNUM) + fi->size; */
-/* OBSOLETE else */
-/* OBSOLETE { */
-/* OBSOLETE fsr->regs[SP_REGNUM] = fp + fi->size; */
-/* OBSOLETE fi->frameless = 1; */
-/* OBSOLETE fsr->regs[FP_REGNUM] = 0; */
-/* OBSOLETE } */
-/* OBSOLETE } */
-/* OBSOLETE #endif */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE void */
-/* OBSOLETE d30v_init_extra_frame_info (int fromleaf, struct frame_info *fi) */
-/* OBSOLETE { */
-/* OBSOLETE struct frame_saved_regs dummy; */
-/* OBSOLETE */
-/* OBSOLETE if (fi->next && (fi->pc == 0)) */
-/* OBSOLETE fi->pc = fi->next->return_pc; */
-/* OBSOLETE */
-/* OBSOLETE d30v_frame_find_saved_regs_offsets (fi, &dummy); */
-/* OBSOLETE */
-/* OBSOLETE if (uses_frame == 0) */
-/* OBSOLETE fi->frameless = 1; */
-/* OBSOLETE else */
-/* OBSOLETE fi->frameless = 0; */
-/* OBSOLETE */
-/* OBSOLETE if ((fi->next == 0) && (uses_frame == 0)) */
-/* OBSOLETE /* innermost frame and it's "frameless", */
-/* OBSOLETE so the fi->frame field is wrong, fix it! */ */
-/* OBSOLETE fi->frame = read_sp (); */
-/* OBSOLETE */
-/* OBSOLETE if (dummy.regs[LR_REGNUM]) */
-/* OBSOLETE { */
-/* OBSOLETE /* it was saved, grab it! */ */
-/* OBSOLETE dummy.regs[LR_REGNUM] += (fi->frame + frame_size); */
-/* OBSOLETE fi->return_pc = read_memory_unsigned_integer (dummy.regs[LR_REGNUM], 4); */
-/* OBSOLETE } */
-/* OBSOLETE else */
-/* OBSOLETE fi->return_pc = read_register (LR_REGNUM); */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE void */
-/* OBSOLETE d30v_init_frame_pc (int fromleaf, struct frame_info *prev) */
-/* OBSOLETE { */
-/* OBSOLETE /* default value, put here so we can breakpoint on it and */
-/* OBSOLETE see if the default value is really the right thing to use */ */
-/* OBSOLETE prev->pc = (fromleaf ? SAVED_PC_AFTER_CALL (prev->next) : \ */
-/* OBSOLETE prev->next ? FRAME_SAVED_PC (prev->next) : read_pc ()); */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE static void d30v_print_register (int regnum, int tabular); */
-/* OBSOLETE */
-/* OBSOLETE static void */
-/* OBSOLETE d30v_print_register (int regnum, int tabular) */
-/* OBSOLETE { */
-/* OBSOLETE if (regnum < A0_REGNUM) */
-/* OBSOLETE { */
-/* OBSOLETE if (tabular) */
-/* OBSOLETE printf_filtered ("%08lx", (long) read_register (regnum)); */
-/* OBSOLETE else */
-/* OBSOLETE printf_filtered ("0x%lx %ld", */
-/* OBSOLETE (long) read_register (regnum), */
-/* OBSOLETE (long) read_register (regnum)); */
-/* OBSOLETE } */
-/* OBSOLETE else */
-/* OBSOLETE { */
-/* OBSOLETE char regbuf[MAX_REGISTER_RAW_SIZE]; */
-/* OBSOLETE */
-/* OBSOLETE frame_register_read (selected_frame, regnum, regbuf); */
-/* OBSOLETE */
-/* OBSOLETE val_print (REGISTER_VIRTUAL_TYPE (regnum), regbuf, 0, 0, */
-/* OBSOLETE gdb_stdout, 'x', 1, 0, Val_pretty_default); */
-/* OBSOLETE */
-/* OBSOLETE if (!tabular) */
-/* OBSOLETE { */
-/* OBSOLETE printf_filtered (" "); */
-/* OBSOLETE val_print (REGISTER_VIRTUAL_TYPE (regnum), regbuf, 0, 0, */
-/* OBSOLETE gdb_stdout, 'd', 1, 0, Val_pretty_default); */
-/* OBSOLETE } */
-/* OBSOLETE } */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE static void */
-/* OBSOLETE d30v_print_flags (void) */
-/* OBSOLETE { */
-/* OBSOLETE long psw = read_register (PSW_REGNUM); */
-/* OBSOLETE printf_filtered ("flags #1"); */
-/* OBSOLETE printf_filtered (" (sm) %d", (psw & PSW_SM) != 0); */
-/* OBSOLETE printf_filtered (" (ea) %d", (psw & PSW_EA) != 0); */
-/* OBSOLETE printf_filtered (" (db) %d", (psw & PSW_DB) != 0); */
-/* OBSOLETE printf_filtered (" (ds) %d", (psw & PSW_DS) != 0); */
-/* OBSOLETE printf_filtered (" (ie) %d", (psw & PSW_IE) != 0); */
-/* OBSOLETE printf_filtered (" (rp) %d", (psw & PSW_RP) != 0); */
-/* OBSOLETE printf_filtered (" (md) %d\n", (psw & PSW_MD) != 0); */
-/* OBSOLETE */
-/* OBSOLETE printf_filtered ("flags #2"); */
-/* OBSOLETE printf_filtered (" (f0) %d", (psw & PSW_F0) != 0); */
-/* OBSOLETE printf_filtered (" (f1) %d", (psw & PSW_F1) != 0); */
-/* OBSOLETE printf_filtered (" (f2) %d", (psw & PSW_F2) != 0); */
-/* OBSOLETE printf_filtered (" (f3) %d", (psw & PSW_F3) != 0); */
-/* OBSOLETE printf_filtered (" (s) %d", (psw & PSW_S) != 0); */
-/* OBSOLETE printf_filtered (" (v) %d", (psw & PSW_V) != 0); */
-/* OBSOLETE printf_filtered (" (va) %d", (psw & PSW_VA) != 0); */
-/* OBSOLETE printf_filtered (" (c) %d\n", (psw & PSW_C) != 0); */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE static void */
-/* OBSOLETE print_flags_command (char *args, int from_tty) */
-/* OBSOLETE { */
-/* OBSOLETE d30v_print_flags (); */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE void */
-/* OBSOLETE d30v_do_registers_info (int regnum, int fpregs) */
-/* OBSOLETE { */
-/* OBSOLETE long long num1, num2; */
-/* OBSOLETE long psw; */
-/* OBSOLETE */
-/* OBSOLETE if (regnum != -1) */
-/* OBSOLETE { */
-/* OBSOLETE if (REGISTER_NAME (0) == NULL || REGISTER_NAME (0)[0] == '\000') */
-/* OBSOLETE return; */
-/* OBSOLETE */
-/* OBSOLETE printf_filtered ("%s ", REGISTER_NAME (regnum)); */
-/* OBSOLETE d30v_print_register (regnum, 0); */
-/* OBSOLETE */
-/* OBSOLETE printf_filtered ("\n"); */
-/* OBSOLETE return; */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE /* Have to print all the registers. Format them nicely. */ */
-/* OBSOLETE */
-/* OBSOLETE printf_filtered ("PC="); */
-/* OBSOLETE print_address (read_pc (), gdb_stdout); */
-/* OBSOLETE */
-/* OBSOLETE printf_filtered (" PSW="); */
-/* OBSOLETE d30v_print_register (PSW_REGNUM, 1); */
-/* OBSOLETE */
-/* OBSOLETE printf_filtered (" BPC="); */
-/* OBSOLETE print_address (read_register (BPC_REGNUM), gdb_stdout); */
-/* OBSOLETE */
-/* OBSOLETE printf_filtered (" BPSW="); */
-/* OBSOLETE d30v_print_register (BPSW_REGNUM, 1); */
-/* OBSOLETE printf_filtered ("\n"); */
-/* OBSOLETE */
-/* OBSOLETE printf_filtered ("DPC="); */
-/* OBSOLETE print_address (read_register (DPC_REGNUM), gdb_stdout); */
-/* OBSOLETE */
-/* OBSOLETE printf_filtered (" DPSW="); */
-/* OBSOLETE d30v_print_register (DPSW_REGNUM, 1); */
-/* OBSOLETE */
-/* OBSOLETE printf_filtered (" IBA="); */
-/* OBSOLETE print_address (read_register (IBA_REGNUM), gdb_stdout); */
-/* OBSOLETE printf_filtered ("\n"); */
-/* OBSOLETE */
-/* OBSOLETE printf_filtered ("RPT_C="); */
-/* OBSOLETE d30v_print_register (RPT_C_REGNUM, 1); */
-/* OBSOLETE */
-/* OBSOLETE printf_filtered (" RPT_S="); */
-/* OBSOLETE print_address (read_register (RPT_S_REGNUM), gdb_stdout); */
-/* OBSOLETE */
-/* OBSOLETE printf_filtered (" RPT_E="); */
-/* OBSOLETE print_address (read_register (RPT_E_REGNUM), gdb_stdout); */
-/* OBSOLETE printf_filtered ("\n"); */
-/* OBSOLETE */
-/* OBSOLETE printf_filtered ("MOD_S="); */
-/* OBSOLETE print_address (read_register (MOD_S_REGNUM), gdb_stdout); */
-/* OBSOLETE */
-/* OBSOLETE printf_filtered (" MOD_E="); */
-/* OBSOLETE print_address (read_register (MOD_E_REGNUM), gdb_stdout); */
-/* OBSOLETE printf_filtered ("\n"); */
-/* OBSOLETE */
-/* OBSOLETE printf_filtered ("EIT_VB="); */
-/* OBSOLETE print_address (read_register (EIT_VB_REGNUM), gdb_stdout); */
-/* OBSOLETE */
-/* OBSOLETE printf_filtered (" INT_S="); */
-/* OBSOLETE d30v_print_register (INT_S_REGNUM, 1); */
-/* OBSOLETE */
-/* OBSOLETE printf_filtered (" INT_M="); */
-/* OBSOLETE d30v_print_register (INT_M_REGNUM, 1); */
-/* OBSOLETE printf_filtered ("\n"); */
-/* OBSOLETE */
-/* OBSOLETE d30v_print_flags (); */
-/* OBSOLETE for (regnum = 0; regnum <= 63;) */
-/* OBSOLETE { */
-/* OBSOLETE int i; */
-/* OBSOLETE */
-/* OBSOLETE printf_filtered ("R%d-R%d ", regnum, regnum + 7); */
-/* OBSOLETE if (regnum < 10) */
-/* OBSOLETE printf_filtered (" "); */
-/* OBSOLETE if (regnum + 7 < 10) */
-/* OBSOLETE printf_filtered (" "); */
-/* OBSOLETE */
-/* OBSOLETE for (i = 0; i < 8; i++) */
-/* OBSOLETE { */
-/* OBSOLETE printf_filtered (" "); */
-/* OBSOLETE d30v_print_register (regnum++, 1); */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE printf_filtered ("\n"); */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE printf_filtered ("A0-A1 "); */
-/* OBSOLETE */
-/* OBSOLETE d30v_print_register (A0_REGNUM, 1); */
-/* OBSOLETE printf_filtered (" "); */
-/* OBSOLETE d30v_print_register (A1_REGNUM, 1); */
-/* OBSOLETE printf_filtered ("\n"); */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE CORE_ADDR */
-/* OBSOLETE d30v_fix_call_dummy (char *dummyname, CORE_ADDR start_sp, CORE_ADDR fun, */
-/* OBSOLETE int nargs, struct value **args, */
-/* OBSOLETE struct type *type, int gcc_p) */
-/* OBSOLETE { */
-/* OBSOLETE int regnum; */
-/* OBSOLETE CORE_ADDR sp; */
-/* OBSOLETE char buffer[MAX_REGISTER_RAW_SIZE]; */
-/* OBSOLETE struct frame_info *frame = get_current_frame (); */
-/* OBSOLETE frame->dummy = start_sp; */
-/* OBSOLETE /*start_sp |= DMEM_START; */ */
-/* OBSOLETE */
-/* OBSOLETE sp = start_sp; */
-/* OBSOLETE for (regnum = 0; regnum < NUM_REGS; regnum++) */
-/* OBSOLETE { */
-/* OBSOLETE sp -= REGISTER_RAW_SIZE (regnum); */
-/* OBSOLETE store_address (buffer, REGISTER_RAW_SIZE (regnum), read_register (regnum)); */
-/* OBSOLETE write_memory (sp, buffer, REGISTER_RAW_SIZE (regnum)); */
-/* OBSOLETE } */
-/* OBSOLETE write_register (SP_REGNUM, (LONGEST) sp); */
-/* OBSOLETE /* now we need to load LR with the return address */ */
-/* OBSOLETE write_register (LR_REGNUM, (LONGEST) d30v_call_dummy_address ()); */
-/* OBSOLETE return sp; */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE static void */
-/* OBSOLETE d30v_pop_dummy_frame (struct frame_info *fi) */
-/* OBSOLETE { */
-/* OBSOLETE CORE_ADDR sp = fi->dummy; */
-/* OBSOLETE int regnum; */
-/* OBSOLETE */
-/* OBSOLETE for (regnum = 0; regnum < NUM_REGS; regnum++) */
-/* OBSOLETE { */
-/* OBSOLETE sp -= REGISTER_RAW_SIZE (regnum); */
-/* OBSOLETE write_register (regnum, read_memory_unsigned_integer (sp, REGISTER_RAW_SIZE (regnum))); */
-/* OBSOLETE } */
-/* OBSOLETE flush_cached_frames (); /* needed? */ */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE */
-/* OBSOLETE CORE_ADDR */
-/* OBSOLETE d30v_push_arguments (int nargs, struct value **args, CORE_ADDR sp, */
-/* OBSOLETE int struct_return, CORE_ADDR struct_addr) */
-/* OBSOLETE { */
-/* OBSOLETE int i, len, index = 0, regnum = 2; */
-/* OBSOLETE char buffer[4], *contents; */
-/* OBSOLETE LONGEST val; */
-/* OBSOLETE CORE_ADDR ptrs[10]; */
-/* OBSOLETE */
-/* OBSOLETE #if 0 */
-/* OBSOLETE /* Pass 1. Put all large args on stack */ */
-/* OBSOLETE for (i = 0; i < nargs; i++) */
-/* OBSOLETE { */
-/* OBSOLETE struct value *arg = args[i]; */
-/* OBSOLETE struct type *arg_type = check_typedef (VALUE_TYPE (arg)); */
-/* OBSOLETE len = TYPE_LENGTH (arg_type); */
-/* OBSOLETE contents = VALUE_CONTENTS (arg); */
-/* OBSOLETE val = extract_signed_integer (contents, len); */
-/* OBSOLETE if (len > 4) */
-/* OBSOLETE { */
-/* OBSOLETE /* put on stack and pass pointers */ */
-/* OBSOLETE sp -= len; */
-/* OBSOLETE write_memory (sp, contents, len); */
-/* OBSOLETE ptrs[index++] = sp; */
-/* OBSOLETE } */
-/* OBSOLETE } */
-/* OBSOLETE #endif */
-/* OBSOLETE index = 0; */
-/* OBSOLETE */
-/* OBSOLETE for (i = 0; i < nargs; i++) */
-/* OBSOLETE { */
-/* OBSOLETE struct value *arg = args[i]; */
-/* OBSOLETE struct type *arg_type = check_typedef (VALUE_TYPE (arg)); */
-/* OBSOLETE len = TYPE_LENGTH (arg_type); */
-/* OBSOLETE contents = VALUE_CONTENTS (arg); */
-/* OBSOLETE if (len > 4) */
-/* OBSOLETE { */
-/* OBSOLETE /* we need multiple registers */ */
-/* OBSOLETE int ndx; */
-/* OBSOLETE */
-/* OBSOLETE for (ndx = 0; len > 0; ndx += 8, len -= 8) */
-/* OBSOLETE { */
-/* OBSOLETE if (regnum & 1) */
-/* OBSOLETE regnum++; /* all args > 4 bytes start in even register */ */
-/* OBSOLETE */
-/* OBSOLETE if (regnum < 18) */
-/* OBSOLETE { */
-/* OBSOLETE val = extract_signed_integer (&contents[ndx], 4); */
-/* OBSOLETE write_register (regnum++, val); */
-/* OBSOLETE */
-/* OBSOLETE if (len >= 8) */
-/* OBSOLETE val = extract_signed_integer (&contents[ndx + 4], 4); */
-/* OBSOLETE else */
-/* OBSOLETE val = extract_signed_integer (&contents[ndx + 4], len - 4); */
-/* OBSOLETE write_register (regnum++, val); */
-/* OBSOLETE } */
-/* OBSOLETE else */
-/* OBSOLETE { */
-/* OBSOLETE /* no more registers available. put it on the stack */ */
-/* OBSOLETE */
-/* OBSOLETE /* all args > 4 bytes are padded to a multiple of 8 bytes */
-/* OBSOLETE and start on an 8 byte boundary */ */
-/* OBSOLETE if (sp & 7) */
-/* OBSOLETE sp -= (sp & 7); /* align it */ */
-/* OBSOLETE */
-/* OBSOLETE sp -= ((len + 7) & ~7); /* allocate space */ */
-/* OBSOLETE write_memory (sp, &contents[ndx], len); */
-/* OBSOLETE break; */
-/* OBSOLETE } */
-/* OBSOLETE } */
-/* OBSOLETE } */
-/* OBSOLETE else */
-/* OBSOLETE { */
-/* OBSOLETE if (regnum < 18) */
-/* OBSOLETE { */
-/* OBSOLETE val = extract_signed_integer (contents, len); */
-/* OBSOLETE write_register (regnum++, val); */
-/* OBSOLETE } */
-/* OBSOLETE else */
-/* OBSOLETE { */
-/* OBSOLETE /* all args are padded to a multiple of 4 bytes (at least) */ */
-/* OBSOLETE sp -= ((len + 3) & ~3); */
-/* OBSOLETE write_memory (sp, contents, len); */
-/* OBSOLETE } */
-/* OBSOLETE } */
-/* OBSOLETE } */
-/* OBSOLETE if (sp & 7) */
-/* OBSOLETE /* stack pointer is not on an 8 byte boundary -- align it */ */
-/* OBSOLETE sp -= (sp & 7); */
-/* OBSOLETE return sp; */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE */
-/* OBSOLETE /* pick an out-of-the-way place to set the return value */ */
-/* OBSOLETE /* for an inferior function call. The link register is set to this */ */
-/* OBSOLETE /* value and a momentary breakpoint is set there. When the breakpoint */ */
-/* OBSOLETE /* is hit, the dummy frame is popped and the previous environment is */ */
-/* OBSOLETE /* restored. */ */
-/* OBSOLETE */
-/* OBSOLETE CORE_ADDR */
-/* OBSOLETE d30v_call_dummy_address (void) */
-/* OBSOLETE { */
-/* OBSOLETE CORE_ADDR entry; */
-/* OBSOLETE struct minimal_symbol *sym; */
-/* OBSOLETE */
-/* OBSOLETE entry = entry_point_address (); */
-/* OBSOLETE */
-/* OBSOLETE if (entry != 0) */
-/* OBSOLETE return entry; */
-/* OBSOLETE */
-/* OBSOLETE sym = lookup_minimal_symbol ("_start", NULL, symfile_objfile); */
-/* OBSOLETE */
-/* OBSOLETE if (!sym || MSYMBOL_TYPE (sym) != mst_text) */
-/* OBSOLETE return 0; */
-/* OBSOLETE else */
-/* OBSOLETE return SYMBOL_VALUE_ADDRESS (sym); */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE /* Given a return value in `regbuf' with a type `valtype', */
-/* OBSOLETE extract and copy its value into `valbuf'. */ */
-/* OBSOLETE */
-/* OBSOLETE void */
-/* OBSOLETE d30v_extract_return_value (struct type *valtype, char regbuf[REGISTER_BYTES], */
-/* OBSOLETE char *valbuf) */
-/* OBSOLETE { */
-/* OBSOLETE memcpy (valbuf, regbuf + REGISTER_BYTE (2), TYPE_LENGTH (valtype)); */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE /* The following code implements access to, and display of, the D30V's */
-/* OBSOLETE instruction trace buffer. The buffer consists of 64K or more */
-/* OBSOLETE 4-byte words of data, of which each words includes an 8-bit count, */
-/* OBSOLETE an 8-bit segment number, and a 16-bit instruction address. */
-/* OBSOLETE */
-/* OBSOLETE In theory, the trace buffer is continuously capturing instruction */
-/* OBSOLETE data that the CPU presents on its "debug bus", but in practice, the */
-/* OBSOLETE ROMified GDB stub only enables tracing when it continues or steps */
-/* OBSOLETE the program, and stops tracing when the program stops; so it */
-/* OBSOLETE actually works for GDB to read the buffer counter out of memory and */
-/* OBSOLETE then read each trace word. The counter records where the tracing */
-/* OBSOLETE stops, but there is no record of where it started, so we remember */
-/* OBSOLETE the PC when we resumed and then search backwards in the trace */
-/* OBSOLETE buffer for a word that includes that address. This is not perfect, */
-/* OBSOLETE because you will miss trace data if the resumption PC is the target */
-/* OBSOLETE of a branch. (The value of the buffer counter is semi-random, any */
-/* OBSOLETE trace data from a previous program stop is gone.) */ */
-/* OBSOLETE */
-/* OBSOLETE /* The address of the last word recorded in the trace buffer. */ */
-/* OBSOLETE */
-/* OBSOLETE #define DBBC_ADDR (0xd80000) */
-/* OBSOLETE */
-/* OBSOLETE /* The base of the trace buffer, at least for the "Board_0". */ */
-/* OBSOLETE */
-/* OBSOLETE #define TRACE_BUFFER_BASE (0xf40000) */
-/* OBSOLETE */
-/* OBSOLETE static void trace_command (char *, int); */
-/* OBSOLETE */
-/* OBSOLETE static void untrace_command (char *, int); */
-/* OBSOLETE */
-/* OBSOLETE static void trace_info (char *, int); */
-/* OBSOLETE */
-/* OBSOLETE static void tdisassemble_command (char *, int); */
-/* OBSOLETE */
-/* OBSOLETE static void display_trace (int, int); */
-/* OBSOLETE */
-/* OBSOLETE /* True when instruction traces are being collected. */ */
-/* OBSOLETE */
-/* OBSOLETE static int tracing; */
-/* OBSOLETE */
-/* OBSOLETE /* Remembered PC. */ */
-/* OBSOLETE */
-/* OBSOLETE static CORE_ADDR last_pc; */
-/* OBSOLETE */
-/* OBSOLETE /* True when trace output should be displayed whenever program stops. */ */
-/* OBSOLETE */
-/* OBSOLETE static int trace_display; */
-/* OBSOLETE */
-/* OBSOLETE /* True when trace listing should include source lines. */ */
-/* OBSOLETE */
-/* OBSOLETE static int default_trace_show_source = 1; */
-/* OBSOLETE */
-/* OBSOLETE struct trace_buffer */
-/* OBSOLETE { */
-/* OBSOLETE int size; */
-/* OBSOLETE short *counts; */
-/* OBSOLETE CORE_ADDR *addrs; */
-/* OBSOLETE } */
-/* OBSOLETE trace_data; */
-/* OBSOLETE */
-/* OBSOLETE static void */
-/* OBSOLETE trace_command (char *args, int from_tty) */
-/* OBSOLETE { */
-/* OBSOLETE /* Clear the host-side trace buffer, allocating space if needed. */ */
-/* OBSOLETE trace_data.size = 0; */
-/* OBSOLETE if (trace_data.counts == NULL) */
-/* OBSOLETE trace_data.counts = (short *) xmalloc (65536 * sizeof (short)); */
-/* OBSOLETE if (trace_data.addrs == NULL) */
-/* OBSOLETE trace_data.addrs = (CORE_ADDR *) xmalloc (65536 * sizeof (CORE_ADDR)); */
-/* OBSOLETE */
-/* OBSOLETE tracing = 1; */
-/* OBSOLETE */
-/* OBSOLETE printf_filtered ("Tracing is now on.\n"); */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE static void */
-/* OBSOLETE untrace_command (char *args, int from_tty) */
-/* OBSOLETE { */
-/* OBSOLETE tracing = 0; */
-/* OBSOLETE */
-/* OBSOLETE printf_filtered ("Tracing is now off.\n"); */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE static void */
-/* OBSOLETE trace_info (char *args, int from_tty) */
-/* OBSOLETE { */
-/* OBSOLETE int i; */
-/* OBSOLETE */
-/* OBSOLETE if (trace_data.size) */
-/* OBSOLETE { */
-/* OBSOLETE printf_filtered ("%d entries in trace buffer:\n", trace_data.size); */
-/* OBSOLETE */
-/* OBSOLETE for (i = 0; i < trace_data.size; ++i) */
-/* OBSOLETE { */
-/* OBSOLETE printf_filtered ("%d: %d instruction%s at 0x%s\n", */
-/* OBSOLETE i, trace_data.counts[i], */
-/* OBSOLETE (trace_data.counts[i] == 1 ? "" : "s"), */
-/* OBSOLETE paddr_nz (trace_data.addrs[i])); */
-/* OBSOLETE } */
-/* OBSOLETE } */
-/* OBSOLETE else */
-/* OBSOLETE printf_filtered ("No entries in trace buffer.\n"); */
-/* OBSOLETE */
-/* OBSOLETE printf_filtered ("Tracing is currently %s.\n", (tracing ? "on" : "off")); */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE /* Print the instruction at address MEMADDR in debugged memory, */
-/* OBSOLETE on STREAM. Returns length of the instruction, in bytes. */ */
-/* OBSOLETE */
-/* OBSOLETE static int */
-/* OBSOLETE print_insn (CORE_ADDR memaddr, struct ui_file *stream) */
-/* OBSOLETE { */
-/* OBSOLETE /* If there's no disassembler, something is very wrong. */ */
-/* OBSOLETE if (tm_print_insn == NULL) */
-/* OBSOLETE internal_error (__FILE__, __LINE__, */
-/* OBSOLETE "print_insn: no disassembler"); */
-/* OBSOLETE */
-/* OBSOLETE if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG) */
-/* OBSOLETE tm_print_insn_info.endian = BFD_ENDIAN_BIG; */
-/* OBSOLETE else */
-/* OBSOLETE tm_print_insn_info.endian = BFD_ENDIAN_LITTLE; */
-/* OBSOLETE return TARGET_PRINT_INSN (memaddr, &tm_print_insn_info); */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE void */
-/* OBSOLETE d30v_eva_prepare_to_trace (void) */
-/* OBSOLETE { */
-/* OBSOLETE if (!tracing) */
-/* OBSOLETE return; */
-/* OBSOLETE */
-/* OBSOLETE last_pc = read_register (PC_REGNUM); */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE /* Collect trace data from the target board and format it into a form */
-/* OBSOLETE more useful for display. */ */
-/* OBSOLETE */
-/* OBSOLETE void */
-/* OBSOLETE d30v_eva_get_trace_data (void) */
-/* OBSOLETE { */
-/* OBSOLETE int count, i, j, oldsize; */
-/* OBSOLETE int trace_addr, trace_seg, trace_cnt, next_cnt; */
-/* OBSOLETE unsigned int last_trace, trace_word, next_word; */
-/* OBSOLETE unsigned int *tmpspace; */
-/* OBSOLETE */
-/* OBSOLETE if (!tracing) */
-/* OBSOLETE return; */
-/* OBSOLETE */
-/* OBSOLETE tmpspace = xmalloc (65536 * sizeof (unsigned int)); */
-/* OBSOLETE */
-/* OBSOLETE last_trace = read_memory_unsigned_integer (DBBC_ADDR, 2) << 2; */
-/* OBSOLETE */
-/* OBSOLETE /* Collect buffer contents from the target, stopping when we reach */
-/* OBSOLETE the word recorded when execution resumed. */ */
-/* OBSOLETE */
-/* OBSOLETE count = 0; */
-/* OBSOLETE while (last_trace > 0) */
-/* OBSOLETE { */
-/* OBSOLETE QUIT; */
-/* OBSOLETE trace_word = */
-/* OBSOLETE read_memory_unsigned_integer (TRACE_BUFFER_BASE + last_trace, 4); */
-/* OBSOLETE trace_addr = trace_word & 0xffff; */
-/* OBSOLETE last_trace -= 4; */
-/* OBSOLETE /* Ignore an apparently nonsensical entry. */ */
-/* OBSOLETE if (trace_addr == 0xffd5) */
-/* OBSOLETE continue; */
-/* OBSOLETE tmpspace[count++] = trace_word; */
-/* OBSOLETE if (trace_addr == last_pc) */
-/* OBSOLETE break; */
-/* OBSOLETE if (count > 65535) */
-/* OBSOLETE break; */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE /* Move the data to the host-side trace buffer, adjusting counts to */
-/* OBSOLETE include the last instruction executed and transforming the address */
-/* OBSOLETE into something that GDB likes. */ */
-/* OBSOLETE */
-/* OBSOLETE for (i = 0; i < count; ++i) */
-/* OBSOLETE { */
-/* OBSOLETE trace_word = tmpspace[i]; */
-/* OBSOLETE next_word = ((i == 0) ? 0 : tmpspace[i - 1]); */
-/* OBSOLETE trace_addr = trace_word & 0xffff; */
-/* OBSOLETE next_cnt = (next_word >> 24) & 0xff; */
-/* OBSOLETE j = trace_data.size + count - i - 1; */
-/* OBSOLETE trace_data.addrs[j] = (trace_addr << 2) + 0x1000000; */
-/* OBSOLETE trace_data.counts[j] = next_cnt + 1; */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE oldsize = trace_data.size; */
-/* OBSOLETE trace_data.size += count; */
-/* OBSOLETE */
-/* OBSOLETE xfree (tmpspace); */
-/* OBSOLETE */
-/* OBSOLETE if (trace_display) */
-/* OBSOLETE display_trace (oldsize, trace_data.size); */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE static void */
-/* OBSOLETE tdisassemble_command (char *arg, int from_tty) */
-/* OBSOLETE { */
-/* OBSOLETE int i, count; */
-/* OBSOLETE CORE_ADDR low, high; */
-/* OBSOLETE char *space_index; */
-/* OBSOLETE */
-/* OBSOLETE if (!arg) */
-/* OBSOLETE { */
-/* OBSOLETE low = 0; */
-/* OBSOLETE high = trace_data.size; */
-/* OBSOLETE } */
-/* OBSOLETE else if (!(space_index = (char *) strchr (arg, ' '))) */
-/* OBSOLETE { */
-/* OBSOLETE low = parse_and_eval_address (arg); */
-/* OBSOLETE high = low + 5; */
-/* OBSOLETE } */
-/* OBSOLETE else */
-/* OBSOLETE { */
-/* OBSOLETE /* Two arguments. */ */
-/* OBSOLETE *space_index = '\0'; */
-/* OBSOLETE low = parse_and_eval_address (arg); */
-/* OBSOLETE high = parse_and_eval_address (space_index + 1); */
-/* OBSOLETE if (high < low) */
-/* OBSOLETE high = low; */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE printf_filtered ("Dump of trace from %s to %s:\n", */
-/* OBSOLETE paddr_u (low), */
-/* OBSOLETE paddr_u (high)); */
-/* OBSOLETE */
-/* OBSOLETE display_trace (low, high); */
-/* OBSOLETE */
-/* OBSOLETE printf_filtered ("End of trace dump.\n"); */
-/* OBSOLETE gdb_flush (gdb_stdout); */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE static void */
-/* OBSOLETE display_trace (int low, int high) */
-/* OBSOLETE { */
-/* OBSOLETE int i, count, trace_show_source, first, suppress; */
-/* OBSOLETE CORE_ADDR next_address; */
-/* OBSOLETE */
-/* OBSOLETE trace_show_source = default_trace_show_source; */
-/* OBSOLETE if (!have_full_symbols () && !have_partial_symbols ()) */
-/* OBSOLETE { */
-/* OBSOLETE trace_show_source = 0; */
-/* OBSOLETE printf_filtered ("No symbol table is loaded. Use the \"file\" command.\n"); */
-/* OBSOLETE printf_filtered ("Trace will not display any source.\n"); */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE first = 1; */
-/* OBSOLETE suppress = 0; */
-/* OBSOLETE for (i = low; i < high; ++i) */
-/* OBSOLETE { */
-/* OBSOLETE next_address = trace_data.addrs[i]; */
-/* OBSOLETE count = trace_data.counts[i]; */
-/* OBSOLETE while (count-- > 0) */
-/* OBSOLETE { */
-/* OBSOLETE QUIT; */
-/* OBSOLETE if (trace_show_source) */
-/* OBSOLETE { */
-/* OBSOLETE struct symtab_and_line sal, sal_prev; */
-/* OBSOLETE */
-/* OBSOLETE sal_prev = find_pc_line (next_address - 4, 0); */
-/* OBSOLETE sal = find_pc_line (next_address, 0); */
-/* OBSOLETE */
-/* OBSOLETE if (sal.symtab) */
-/* OBSOLETE { */
-/* OBSOLETE if (first || sal.line != sal_prev.line) */
-/* OBSOLETE print_source_lines (sal.symtab, sal.line, sal.line + 1, 0); */
-/* OBSOLETE suppress = 0; */
-/* OBSOLETE } */
-/* OBSOLETE else */
-/* OBSOLETE { */
-/* OBSOLETE if (!suppress) */
-/* OBSOLETE /* FIXME-32x64--assumes sal.pc fits in long. */ */
-/* OBSOLETE printf_filtered ("No source file for address %s.\n", */
-/* OBSOLETE local_hex_string ((unsigned long) sal.pc)); */
-/* OBSOLETE suppress = 1; */
-/* OBSOLETE } */
-/* OBSOLETE } */
-/* OBSOLETE first = 0; */
-/* OBSOLETE print_address (next_address, gdb_stdout); */
-/* OBSOLETE printf_filtered (":"); */
-/* OBSOLETE printf_filtered ("\t"); */
-/* OBSOLETE wrap_here (" "); */
-/* OBSOLETE next_address = next_address + print_insn (next_address, gdb_stdout); */
-/* OBSOLETE printf_filtered ("\n"); */
-/* OBSOLETE gdb_flush (gdb_stdout); */
-/* OBSOLETE } */
-/* OBSOLETE } */
-/* OBSOLETE } */
-/* OBSOLETE */
-/* OBSOLETE extern void (*target_resume_hook) (void); */
-/* OBSOLETE extern void (*target_wait_loop_hook) (void); */
-/* OBSOLETE */
-/* OBSOLETE void */
-/* OBSOLETE _initialize_d30v_tdep (void) */
-/* OBSOLETE { */
-/* OBSOLETE tm_print_insn = print_insn_d30v; */
-/* OBSOLETE */
-/* OBSOLETE target_resume_hook = d30v_eva_prepare_to_trace; */
-/* OBSOLETE target_wait_loop_hook = d30v_eva_get_trace_data; */
-/* OBSOLETE */
-/* OBSOLETE add_info ("flags", print_flags_command, "Print d30v flags."); */
-/* OBSOLETE */
-/* OBSOLETE add_com ("trace", class_support, trace_command, */
-/* OBSOLETE "Enable tracing of instruction execution."); */
-/* OBSOLETE */
-/* OBSOLETE add_com ("untrace", class_support, untrace_command, */
-/* OBSOLETE "Disable tracing of instruction execution."); */
-/* OBSOLETE */
-/* OBSOLETE add_com ("tdisassemble", class_vars, tdisassemble_command, */
-/* OBSOLETE "Disassemble the trace buffer.\n\ */
-/* OBSOLETE Two optional arguments specify a range of trace buffer entries\n\ */
-/* OBSOLETE as reported by info trace (NOT addresses!)."); */
-/* OBSOLETE */
-/* OBSOLETE add_info ("trace", trace_info, */
-/* OBSOLETE "Display info about the trace data buffer."); */
-/* OBSOLETE */
-/* OBSOLETE add_show_from_set (add_set_cmd ("tracedisplay", no_class, */
-/* OBSOLETE var_integer, (char *) &trace_display, */
-/* OBSOLETE "Set automatic display of trace.\n", &setlist), */
-/* OBSOLETE &showlist); */
-/* OBSOLETE add_show_from_set (add_set_cmd ("tracesource", no_class, */
-/* OBSOLETE var_integer, (char *) &default_trace_show_source, */
-/* OBSOLETE "Set display of source code with trace.\n", &setlist), */
-/* OBSOLETE &showlist); */
-/* OBSOLETE */
-/* OBSOLETE } */
+++ /dev/null
-// OBSOLETE /* <apollo/dst.h> */
-// OBSOLETE /* Apollo object module DST (debug symbol table) description */
-// OBSOLETE
-// OBSOLETE #ifndef apollo_dst_h
-// OBSOLETE #define apollo_dst_h
-// OBSOLETE
-// OBSOLETE #if defined(apollo) && !defined(__GNUC__)
-// OBSOLETE #define ALIGNED1 __attribute( (aligned(1)) )
-// OBSOLETE #else
-// OBSOLETE /* Remove attribute directives from non-Apollo code: */
-// OBSOLETE #define ALIGNED1 /* nil */
-// OBSOLETE #endif
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE /* Identification of this version of the debug symbol table. Producers of the
-// OBSOLETE debug symbol table must write these values into the version number field of
-// OBSOLETE the compilation unit record in .blocks .
-// OBSOLETE */
-// OBSOLETE #define dst_version_major 1
-// OBSOLETE #define dst_version_minor 3
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE /*
-// OBSOLETE ** Enumeration of debug record types appearing in .blocks and .symbols ...
-// OBSOLETE */
-// OBSOLETE typedef enum
-// OBSOLETE {
-// OBSOLETE dst_typ_pad, /* 0 */
-// OBSOLETE dst_typ_comp_unit, /* 1 */
-// OBSOLETE dst_typ_section_tab, /* 2 */
-// OBSOLETE dst_typ_file_tab, /* 3 */
-// OBSOLETE dst_typ_block, /* 4 */
-// OBSOLETE dst_typ_5,
-// OBSOLETE dst_typ_var,
-// OBSOLETE dst_typ_pointer, /* 7 */
-// OBSOLETE dst_typ_array, /* 8 */
-// OBSOLETE dst_typ_subrange, /* 9 */
-// OBSOLETE dst_typ_set, /* 10 */
-// OBSOLETE dst_typ_implicit_enum, /* 11 */
-// OBSOLETE dst_typ_explicit_enum, /* 12 */
-// OBSOLETE dst_typ_short_rec, /* 13 */
-// OBSOLETE dst_typ_old_record,
-// OBSOLETE dst_typ_short_union, /* 15 */
-// OBSOLETE dst_typ_old_union,
-// OBSOLETE dst_typ_file, /* 17 */
-// OBSOLETE dst_typ_offset, /* 18 */
-// OBSOLETE dst_typ_alias, /* 19 */
-// OBSOLETE dst_typ_signature, /* 20 */
-// OBSOLETE dst_typ_21,
-// OBSOLETE dst_typ_old_label, /* 22 */
-// OBSOLETE dst_typ_scope, /* 23 */
-// OBSOLETE dst_typ_end_scope, /* 24 */
-// OBSOLETE dst_typ_25,
-// OBSOLETE dst_typ_26,
-// OBSOLETE dst_typ_string_tab, /* 27 */
-// OBSOLETE dst_typ_global_name_tab, /* 28 */
-// OBSOLETE dst_typ_forward, /* 29 */
-// OBSOLETE dst_typ_aux_size, /* 30 */
-// OBSOLETE dst_typ_aux_align, /* 31 */
-// OBSOLETE dst_typ_aux_field_size, /* 32 */
-// OBSOLETE dst_typ_aux_field_off, /* 33 */
-// OBSOLETE dst_typ_aux_field_align, /* 34 */
-// OBSOLETE dst_typ_aux_qual, /* 35 */
-// OBSOLETE dst_typ_aux_var_bound, /* 36 */
-// OBSOLETE dst_typ_extension, /* 37 */
-// OBSOLETE dst_typ_string, /* 38 */
-// OBSOLETE dst_typ_old_entry,
-// OBSOLETE dst_typ_const, /* 40 */
-// OBSOLETE dst_typ_reference, /* 41 */
-// OBSOLETE dst_typ_record, /* 42 */
-// OBSOLETE dst_typ_union, /* 43 */
-// OBSOLETE dst_typ_aux_type_deriv, /* 44 */
-// OBSOLETE dst_typ_locpool, /* 45 */
-// OBSOLETE dst_typ_variable, /* 46 */
-// OBSOLETE dst_typ_label, /* 47 */
-// OBSOLETE dst_typ_entry, /* 48 */
-// OBSOLETE dst_typ_aux_lifetime, /* 49 */
-// OBSOLETE dst_typ_aux_ptr_base, /* 50 */
-// OBSOLETE dst_typ_aux_src_range, /* 51 */
-// OBSOLETE dst_typ_aux_reg_val, /* 52 */
-// OBSOLETE dst_typ_aux_unit_names, /* 53 */
-// OBSOLETE dst_typ_aux_sect_info, /* 54 */
-// OBSOLETE dst_typ_END_OF_ENUM
-// OBSOLETE }
-// OBSOLETE dst_rec_type_t;
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE /*
-// OBSOLETE ** Dummy bounds for variably dimensioned arrays:
-// OBSOLETE */
-// OBSOLETE #define dst_dummy_array_size 100
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE /*
-// OBSOLETE ** Reference to another item in the symbol table.
-// OBSOLETE **
-// OBSOLETE ** The value of a dst_rel_offset_t is the relative offset from the start of the
-// OBSOLETE ** referencing record to the start of the referenced record, string, etc.
-// OBSOLETE **
-// OBSOLETE ** The value of a NIL dst_rel_offset_t is zero.
-// OBSOLETE */
-// OBSOLETE
-// OBSOLETE typedef long dst_rel_offset_t ALIGNED1;
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE /* FIXME: Here and many places we make assumptions about sizes of host
-// OBSOLETE data types, structure layout, etc. Only needs to be fixed if we care
-// OBSOLETE about cross-debugging, though. */
-// OBSOLETE
-// OBSOLETE /*
-// OBSOLETE ** Section-relative reference.
-// OBSOLETE **
-// OBSOLETE ** The section index field is an index into the local compilation unit's
-// OBSOLETE ** section table (see dst_rec_section_tab_t)--NOT into the object module
-// OBSOLETE ** section table!
-// OBSOLETE **
-// OBSOLETE ** The sect_offset field is the offset in bytes into the section.
-// OBSOLETE **
-// OBSOLETE ** A NIL dst_sect_ref_t has a sect_index field of zero. Indexes originate
-// OBSOLETE ** at one.
-// OBSOLETE */
-// OBSOLETE
-// OBSOLETE typedef struct
-// OBSOLETE {
-// OBSOLETE unsigned short sect_index;
-// OBSOLETE unsigned long sect_offset ALIGNED1;
-// OBSOLETE }
-// OBSOLETE dst_sect_ref_t;
-// OBSOLETE
-// OBSOLETE #define dst_sect_index_nil 0
-// OBSOLETE #define dst_sect_index_origin 1
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE /*
-// OBSOLETE ** Source location descriptor.
-// OBSOLETE **
-// OBSOLETE ** The file_index field is an index into the local compilation unit's
-// OBSOLETE ** file table (see dst_rec_file_tab_t).
-// OBSOLETE **
-// OBSOLETE ** A NIL dst_src_loc_t has a file_index field of zero. Indexes originate
-// OBSOLETE ** at one.
-// OBSOLETE */
-// OBSOLETE
-// OBSOLETE typedef struct
-// OBSOLETE {
-// OBSOLETE boolean reserved:1; /* reserved for future use */
-// OBSOLETE int file_index:11; /* index into .blocks source file list */
-// OBSOLETE int line_number:20; /* source line number */
-// OBSOLETE }
-// OBSOLETE dst_src_loc_t;
-// OBSOLETE
-// OBSOLETE #define dst_file_index_nil 0
-// OBSOLETE #define dst_file_index_origin 1
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE /*
-// OBSOLETE ** Standard (primitive) type codes.
-// OBSOLETE */
-// OBSOLETE
-// OBSOLETE typedef enum
-// OBSOLETE {
-// OBSOLETE dst_non_std_type,
-// OBSOLETE dst_int8_type, /* 8 bit integer */
-// OBSOLETE dst_int16_type, /* 16 bit integer */
-// OBSOLETE dst_int32_type, /* 32 bit integer */
-// OBSOLETE dst_uint8_type, /* 8 bit unsigned integer */
-// OBSOLETE dst_uint16_type, /* 16 bit unsigned integer */
-// OBSOLETE dst_uint32_type, /* 32 bit unsigned integer */
-// OBSOLETE dst_real32_type, /* single precision ieee floatining point */
-// OBSOLETE dst_real64_type, /* double precision ieee floatining point */
-// OBSOLETE dst_complex_type, /* single precision complex */
-// OBSOLETE dst_dcomplex_type, /* double precision complex */
-// OBSOLETE dst_bool8_type, /* boolean =logical*1 */
-// OBSOLETE dst_bool16_type, /* boolean =logical*2 */
-// OBSOLETE dst_bool32_type, /* boolean =logical*4 */
-// OBSOLETE dst_char_type, /* 8 bit ascii character */
-// OBSOLETE dst_string_type, /* string of 8 bit ascii characters */
-// OBSOLETE dst_ptr_type, /* univ_pointer */
-// OBSOLETE dst_set_type, /* generic 256 bit set */
-// OBSOLETE dst_proc_type, /* generic procedure (signature not specified) */
-// OBSOLETE dst_func_type, /* generic function (signature not specified) */
-// OBSOLETE dst_void_type, /* c void type */
-// OBSOLETE dst_uchar_type, /* c unsigned char */
-// OBSOLETE dst_std_type_END_OF_ENUM
-// OBSOLETE }
-// OBSOLETE dst_std_type_t;
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE /*
-// OBSOLETE ** General data type descriptor
-// OBSOLETE **
-// OBSOLETE ** If the user_defined_type bit is clear, then the type is a standard type, and
-// OBSOLETE ** the remaining bits contain the dst_std_type_t of the type. If the bit is
-// OBSOLETE ** set, then the type is defined in a separate dst record, which is referenced
-// OBSOLETE ** by the remaining bits as a dst_rel_offset_t.
-// OBSOLETE */
-// OBSOLETE
-// OBSOLETE typedef union
-// OBSOLETE {
-// OBSOLETE struct
-// OBSOLETE {
-// OBSOLETE boolean user_defined_type:1; /* tag field */
-// OBSOLETE int must_be_zero:23; /* 23 bits of pad */
-// OBSOLETE dst_std_type_t dtc:8; /* 8 bit primitive data */
-// OBSOLETE }
-// OBSOLETE std_type;
-// OBSOLETE
-// OBSOLETE struct
-// OBSOLETE {
-// OBSOLETE boolean user_defined_type:1; /* tag field */
-// OBSOLETE int doffset:31; /* offset to type record */
-// OBSOLETE }
-// OBSOLETE user_type;
-// OBSOLETE }
-// OBSOLETE dst_type_t ALIGNED1;
-// OBSOLETE
-// OBSOLETE /* The user_type.doffset field is a 31-bit signed value. Some versions of C
-// OBSOLETE do not support signed bit fields. The following macro will extract that
-// OBSOLETE field as a signed value:
-// OBSOLETE */
-// OBSOLETE #define dst_user_type_offset(type_rec) \
-// OBSOLETE ( ((int) ((type_rec).user_type.doffset << 1)) >> 1 )
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE /*================================================*/
-// OBSOLETE /*========== RECORDS IN .blocks SECTION ==========*/
-// OBSOLETE /*================================================*/
-// OBSOLETE
-// OBSOLETE /*-----------------------
-// OBSOLETE COMPILATION UNIT record
-// OBSOLETE -----------------------
-// OBSOLETE This must be the first record in each .blocks section.
-// OBSOLETE Provides a set of information describing the output of a single compilation
-// OBSOLETE and pointers to additional information for the compilation unit.
-// OBSOLETE */
-// OBSOLETE
-// OBSOLETE typedef enum
-// OBSOLETE {
-// OBSOLETE dst_pc_code_locs, /* ranges in loc strings are pc ranges */
-// OBSOLETE dst_comp_unit_END_OF_ENUM
-// OBSOLETE }
-// OBSOLETE dst_comp_unit_flag_t;
-// OBSOLETE
-// OBSOLETE typedef enum
-// OBSOLETE {
-// OBSOLETE dst_lang_unk, /* unknown language */
-// OBSOLETE dst_lang_pas, /* Pascal */
-// OBSOLETE dst_lang_ftn, /* FORTRAN */
-// OBSOLETE dst_lang_c, /* C */
-// OBSOLETE dst_lang_mod2, /* Modula-2 */
-// OBSOLETE dst_lang_asm_m68k, /* 68K assembly language */
-// OBSOLETE dst_lang_asm_a88k, /* AT assembly language */
-// OBSOLETE dst_lang_ada, /* Ada */
-// OBSOLETE dst_lang_cxx, /* C++ */
-// OBSOLETE dst_lang_END_OF_ENUM
-// OBSOLETE }
-// OBSOLETE dst_lang_type_t;
-// OBSOLETE
-// OBSOLETE typedef struct
-// OBSOLETE {
-// OBSOLETE struct
-// OBSOLETE {
-// OBSOLETE unsigned char major_part; /* = dst_version_major */
-// OBSOLETE unsigned char minor_part; /* = dst_version_minor */
-// OBSOLETE }
-// OBSOLETE version; /* version of dst */
-// OBSOLETE unsigned short flags; /* mask of dst_comp_unit_flag_t */
-// OBSOLETE unsigned short lang_type; /* source language */
-// OBSOLETE unsigned short number_of_blocks; /* number of blocks records */
-// OBSOLETE dst_rel_offset_t root_block_offset; /* offset to root block (module?) */
-// OBSOLETE dst_rel_offset_t section_table /* offset to section table record */ ;
-// OBSOLETE dst_rel_offset_t file_table; /* offset to file table record */
-// OBSOLETE unsigned long data_size; /* total size of .blocks data */
-// OBSOLETE }
-// OBSOLETE dst_rec_comp_unit_t ALIGNED1;
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE /*--------------------
-// OBSOLETE SECTION TABLE record
-// OBSOLETE --------------------
-// OBSOLETE There must be one section table associated with each compilation unit.
-// OBSOLETE Other debug records refer to sections via their index in this table. The
-// OBSOLETE section base addresses in the table are virtual addresses of the sections,
-// OBSOLETE relocated by the linker.
-// OBSOLETE */
-// OBSOLETE
-// OBSOLETE typedef struct
-// OBSOLETE {
-// OBSOLETE unsigned short number_of_sections; /* size of array: */
-// OBSOLETE unsigned long section_base[dst_dummy_array_size] ALIGNED1;
-// OBSOLETE }
-// OBSOLETE dst_rec_section_tab_t ALIGNED1;
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE /*-----------------
-// OBSOLETE FILE TABLE record
-// OBSOLETE -----------------
-// OBSOLETE There must be one file table associated with each compilation unit describing
-// OBSOLETE the source (and include) files used by each compilation unit. Other debug
-// OBSOLETE records refer to files via their index in this table. The first entry is the
-// OBSOLETE primary source file.
-// OBSOLETE */
-// OBSOLETE
-// OBSOLETE typedef struct
-// OBSOLETE {
-// OBSOLETE long dtm; /* time last modified (time_$clock_t) */
-// OBSOLETE dst_rel_offset_t noffset; /* offset to name string for source file */
-// OBSOLETE }
-// OBSOLETE dst_file_desc_t;
-// OBSOLETE
-// OBSOLETE typedef struct
-// OBSOLETE {
-// OBSOLETE unsigned short number_of_files; /* size of array: */
-// OBSOLETE dst_file_desc_t files[dst_dummy_array_size] ALIGNED1;
-// OBSOLETE }
-// OBSOLETE dst_rec_file_tab_t ALIGNED1;
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE /*-----------------
-// OBSOLETE NAME TABLE record
-// OBSOLETE -----------------
-// OBSOLETE A name table record may appear as an auxiliary record to the file table,
-// OBSOLETE providing additional qualification of the file indexes for languages that
-// OBSOLETE need it (i.e. Ada). Name table entries parallel file table entries of the
-// OBSOLETE same file index.
-// OBSOLETE */
-// OBSOLETE
-// OBSOLETE typedef struct
-// OBSOLETE {
-// OBSOLETE unsigned short number_of_names; /* size of array: */
-// OBSOLETE dst_rel_offset_t names[dst_dummy_array_size] ALIGNED1;
-// OBSOLETE }
-// OBSOLETE dst_rec_name_tab_t ALIGNED1;
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE /*--------------
-// OBSOLETE BLOCK record
-// OBSOLETE --------------
-// OBSOLETE Describes a lexical program block--a procedure, function, module, etc.
-// OBSOLETE */
-// OBSOLETE
-// OBSOLETE /* Block types. These may be used in any way desired by the compiler writers.
-// OBSOLETE The debugger uses them only to give a description to the user of the type of
-// OBSOLETE a block. The debugger makes no other assumptions about the meaning of any
-// OBSOLETE of these. For example, the fact that a block is executable (e.g., program)
-// OBSOLETE or not (e.g., module) is expressed in block attributes (see below), not
-// OBSOLETE guessed at from the block type.
-// OBSOLETE */
-// OBSOLETE typedef enum
-// OBSOLETE {
-// OBSOLETE dst_block_module, /* some pascal = modula = ada types */
-// OBSOLETE dst_block_program,
-// OBSOLETE dst_block_procedure,
-// OBSOLETE dst_block_function, /* C function */
-// OBSOLETE dst_block_subroutine, /* some fortran block types */
-// OBSOLETE dst_block_block_data,
-// OBSOLETE dst_block_stmt_function,
-// OBSOLETE dst_block_package, /* a few particular to Ada */
-// OBSOLETE dst_block_package_body,
-// OBSOLETE dst_block_subunit,
-// OBSOLETE dst_block_task,
-// OBSOLETE dst_block_file, /* a C outer scope? */
-// OBSOLETE dst_block_class, /* C++ or Simula */
-// OBSOLETE dst_block_END_OF_ENUM
-// OBSOLETE }
-// OBSOLETE dst_block_type_t;
-// OBSOLETE
-// OBSOLETE /* Block attributes. This is the information used by the debugger to represent
-// OBSOLETE the semantics of blocks.
-// OBSOLETE */
-// OBSOLETE typedef enum
-// OBSOLETE {
-// OBSOLETE dst_block_main_entry, /* the block's entry point is a main entry into
-// OBSOLETE the compilation unit */
-// OBSOLETE dst_block_executable, /* the block has an entry point */
-// OBSOLETE dst_block_attr_END_OF_ENUM
-// OBSOLETE }
-// OBSOLETE dst_block_attr_t;
-// OBSOLETE
-// OBSOLETE /* Code range. Each block has associated with it one or more code ranges. An
-// OBSOLETE individual code range is identified by a range of source (possibly nil) and
-// OBSOLETE a range of executable code. For example, a block which has its executable
-// OBSOLETE code spread over multiple sections will have one code range per section.
-// OBSOLETE */
-// OBSOLETE typedef struct
-// OBSOLETE {
-// OBSOLETE unsigned long code_size; /* size of executable code (in bytes ) */
-// OBSOLETE dst_sect_ref_t code_start; /* starting address of executable code */
-// OBSOLETE dst_sect_ref_t lines_start; /* start of line number tables */
-// OBSOLETE }
-// OBSOLETE dst_code_range_t;
-// OBSOLETE
-// OBSOLETE typedef struct
-// OBSOLETE {
-// OBSOLETE dst_block_type_t block_type:8;
-// OBSOLETE unsigned short flags:8; /* mask of dst_block_attr_t flags */
-// OBSOLETE dst_rel_offset_t sibling_block_off; /* offset to next sibling block */
-// OBSOLETE dst_rel_offset_t child_block_off; /* offset to first contained block */
-// OBSOLETE dst_rel_offset_t noffset; /* offset to block name string */
-// OBSOLETE dst_sect_ref_t symbols_start; /* start of debug symbols */
-// OBSOLETE unsigned short n_of_code_ranges; /* size of array... */
-// OBSOLETE dst_code_range_t code_ranges[dst_dummy_array_size] ALIGNED1;
-// OBSOLETE }
-// OBSOLETE dst_rec_block_t ALIGNED1;
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE /*--------------------------
-// OBSOLETE AUX SECT INFO TABLE record
-// OBSOLETE --------------------------
-// OBSOLETE Appears as an auxiliary to a block record. Expands code range information
-// OBSOLETE by providing references into additional, language-dependent sections for
-// OBSOLETE information related to specific code ranges of the block. Sect info table
-// OBSOLETE entries parallel code range array entries of the same index.
-// OBSOLETE */
-// OBSOLETE
-// OBSOLETE typedef struct
-// OBSOLETE {
-// OBSOLETE unsigned char tag; /* currently can only be zero */
-// OBSOLETE unsigned char number_of_refs; /* size of array: */
-// OBSOLETE dst_sect_ref_t refs[dst_dummy_array_size] ALIGNED1;
-// OBSOLETE }
-// OBSOLETE dst_rec_sect_info_tab_t ALIGNED1;
-// OBSOLETE
-// OBSOLETE /*=================================================*/
-// OBSOLETE /*========== RECORDS IN .symbols SECTION ==========*/
-// OBSOLETE /*=================================================*/
-// OBSOLETE
-// OBSOLETE /*-----------------
-// OBSOLETE CONSTANT record
-// OBSOLETE -----------------
-// OBSOLETE Describes a symbolic constant.
-// OBSOLETE */
-// OBSOLETE
-// OBSOLETE typedef struct
-// OBSOLETE {
-// OBSOLETE float r; /* real part */
-// OBSOLETE float i; /* imaginary part */
-// OBSOLETE }
-// OBSOLETE dst_complex_t;
-// OBSOLETE
-// OBSOLETE typedef struct
-// OBSOLETE {
-// OBSOLETE double dr; /* real part */
-// OBSOLETE double di; /* imaginary part */
-// OBSOLETE }
-// OBSOLETE dst_double_complex_t;
-// OBSOLETE
-// OBSOLETE /* The following record provides a way of describing constant values with
-// OBSOLETE non-standard type and no limit on size.
-// OBSOLETE */
-// OBSOLETE typedef union
-// OBSOLETE {
-// OBSOLETE char char_data[dst_dummy_array_size];
-// OBSOLETE short int_data[dst_dummy_array_size];
-// OBSOLETE long long_data[dst_dummy_array_size];
-// OBSOLETE }
-// OBSOLETE dst_big_kon_t;
-// OBSOLETE
-// OBSOLETE /* Representation of the value of a general constant.
-// OBSOLETE */
-// OBSOLETE typedef struct
-// OBSOLETE {
-// OBSOLETE unsigned short length; /* size of constant value (bytes) */
-// OBSOLETE
-// OBSOLETE union
-// OBSOLETE {
-// OBSOLETE unsigned short kon_int8;
-// OBSOLETE short kon_int16;
-// OBSOLETE long kon_int32 ALIGNED1;
-// OBSOLETE float kon_real ALIGNED1;
-// OBSOLETE double kon_dbl ALIGNED1;
-// OBSOLETE dst_complex_t kon_cplx ALIGNED1;
-// OBSOLETE dst_double_complex_t kon_dcplx ALIGNED1;
-// OBSOLETE char kon_char;
-// OBSOLETE dst_big_kon_t kon ALIGNED1;
-// OBSOLETE }
-// OBSOLETE val; /* value data of constant */
-// OBSOLETE }
-// OBSOLETE dst_const_t ALIGNED1;
-// OBSOLETE
-// OBSOLETE typedef struct
-// OBSOLETE {
-// OBSOLETE dst_rel_offset_t noffset; /* offset to name string */
-// OBSOLETE dst_src_loc_t src_loc; /* file/line of const definition */
-// OBSOLETE dst_type_t type_desc; /* type of this (manifest) constant */
-// OBSOLETE dst_const_t value;
-// OBSOLETE }
-// OBSOLETE dst_rec_const_t ALIGNED1;
-// OBSOLETE
-// OBSOLETE /*----------------
-// OBSOLETE VARIABLE record
-// OBSOLETE ----------------
-// OBSOLETE Describes a program variable.
-// OBSOLETE */
-// OBSOLETE
-// OBSOLETE /* Variable attributes. These define certain variable semantics to the
-// OBSOLETE debugger.
-// OBSOLETE */
-// OBSOLETE typedef enum
-// OBSOLETE {
-// OBSOLETE dst_var_attr_read_only, /* is read-only (a program literal) */
-// OBSOLETE dst_var_attr_volatile, /* same as compiler's VOLATILE attribute */
-// OBSOLETE dst_var_attr_global, /* is a global definition or reference */
-// OBSOLETE dst_var_attr_compiler_gen, /* is compiler-generated */
-// OBSOLETE dst_var_attr_static, /* has static location */
-// OBSOLETE dst_var_attr_END_OF_ENUM
-// OBSOLETE }
-// OBSOLETE dst_var_attr_t;
-// OBSOLETE
-// OBSOLETE typedef struct
-// OBSOLETE {
-// OBSOLETE dst_rel_offset_t noffset; /* offset to name string */
-// OBSOLETE dst_rel_offset_t loffset; /* offset to loc string */
-// OBSOLETE dst_src_loc_t src_loc; /* file/line of variable definition */
-// OBSOLETE dst_type_t type_desc; /* type descriptor */
-// OBSOLETE unsigned short attributes; /* mask of dst_var_attr_t flags */
-// OBSOLETE }
-// OBSOLETE dst_rec_variable_t ALIGNED1;
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE /*----------------
-// OBSOLETE old VAR record
-// OBSOLETE -----------------
-// OBSOLETE Used by older compilers to describe a variable
-// OBSOLETE */
-// OBSOLETE
-// OBSOLETE typedef enum
-// OBSOLETE {
-// OBSOLETE dst_var_loc_unknown, /* Actually defined as "unknown" */
-// OBSOLETE dst_var_loc_abs, /* Absolute address */
-// OBSOLETE dst_var_loc_sect_off, /* Absolute address as a section offset */
-// OBSOLETE dst_var_loc_ind_sect_off, /* An indexed section offset ???? */
-// OBSOLETE dst_var_loc_reg, /* register */
-// OBSOLETE dst_var_loc_reg_rel, /* register relative - usually fp */
-// OBSOLETE dst_var_loc_ind_reg_rel, /* Indexed register relative */
-// OBSOLETE dst_var_loc_ftn_ptr_based, /* Fortran pointer based */
-// OBSOLETE dst_var_loc_pc_rel, /* PC relative. Really. */
-// OBSOLETE dst_var_loc_external, /* External */
-// OBSOLETE dst_var_loc_END_OF_ENUM
-// OBSOLETE }
-// OBSOLETE dst_var_loc_t;
-// OBSOLETE
-// OBSOLETE /* Locations come in two versions. The short, and the long. The difference
-// OBSOLETE * between the short and the long is the addition of a statement number
-// OBSOLETE * field to the start andend of the range of the long, and and unkown
-// OBSOLETE * purpose field in the middle. Also, loc_type and loc_index aren't
-// OBSOLETE * bitfields in the long version.
-// OBSOLETE */
-// OBSOLETE
-// OBSOLETE typedef struct
-// OBSOLETE {
-// OBSOLETE unsigned short loc_type:4;
-// OBSOLETE unsigned short loc_index:12;
-// OBSOLETE long location;
-// OBSOLETE short start_line; /* start_line and end_line? */
-// OBSOLETE short end_line; /* I'm guessing here. */
-// OBSOLETE }
-// OBSOLETE dst_var_loc_short_t;
-// OBSOLETE
-// OBSOLETE typedef struct
-// OBSOLETE {
-// OBSOLETE unsigned short loc_type;
-// OBSOLETE unsigned short loc_index;
-// OBSOLETE long location;
-// OBSOLETE short unknown; /* Always 0003 or 3b3c. Why? */
-// OBSOLETE short start_statement;
-// OBSOLETE short start_line;
-// OBSOLETE short end_statement;
-// OBSOLETE short end_line;
-// OBSOLETE }
-// OBSOLETE dst_var_loc_long_t;
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE typedef struct
-// OBSOLETE {
-// OBSOLETE dst_rel_offset_t noffset; /* offset to name string */
-// OBSOLETE dst_src_loc_t src_loc; /* file/line of description */
-// OBSOLETE dst_type_t type_desc; /* Type description */
-// OBSOLETE unsigned short attributes; /* mask of dst_var_attr_t flags */
-// OBSOLETE unsigned short no_of_locs:15; /* Number of locations */
-// OBSOLETE unsigned short short_locs:1; /* True if short locations. */
-// OBSOLETE union
-// OBSOLETE {
-// OBSOLETE dst_var_loc_short_t shorts[dst_dummy_array_size];
-// OBSOLETE dst_var_loc_long_t longs[dst_dummy_array_size];
-// OBSOLETE }
-// OBSOLETE locs;
-// OBSOLETE }
-// OBSOLETE dst_rec_var_t;
-// OBSOLETE
-// OBSOLETE /*----------------
-// OBSOLETE old LABEL record
-// OBSOLETE -----------------
-// OBSOLETE Used by older compilers to describe a label
-// OBSOLETE */
-// OBSOLETE
-// OBSOLETE typedef struct
-// OBSOLETE {
-// OBSOLETE dst_rel_offset_t noffset; /* offset to name string */
-// OBSOLETE dst_src_loc_t src_loc; /* file/line of description */
-// OBSOLETE char location[12]; /* location string */
-// OBSOLETE }
-// OBSOLETE dst_rec_old_label_t ALIGNED1;
-// OBSOLETE
-// OBSOLETE /*----------------
-// OBSOLETE POINTER record
-// OBSOLETE ----------------
-// OBSOLETE Describes a pointer type.
-// OBSOLETE */
-// OBSOLETE
-// OBSOLETE typedef struct
-// OBSOLETE {
-// OBSOLETE dst_rel_offset_t noffset; /* offset to the name string for this type */
-// OBSOLETE dst_src_loc_t src_loc; /* file/line of definition */
-// OBSOLETE dst_type_t type_desc; /* base type of this pointer */
-// OBSOLETE }
-// OBSOLETE dst_rec_pointer_t ALIGNED1;
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE /*-------------
-// OBSOLETE ARRAY record
-// OBSOLETE -------------
-// OBSOLETE Describes an array type.
-// OBSOLETE
-// OBSOLETE Multidimensional arrays are described with a number of dst_rec_array_t
-// OBSOLETE records, one per array dimension, each linked to the next through the
-// OBSOLETE elem_type_desc.doffset field. Each record must have its multi_dim flag
-// OBSOLETE set.
-// OBSOLETE
-// OBSOLETE If column_major is true (as with FORTRAN arrays) then the last array bound in
-// OBSOLETE the declaration is the first array index in memory, which is the opposite of
-// OBSOLETE the usual case (as with Pascal and C arrays).
-// OBSOLETE
-// OBSOLETE Variable array bounds are described by auxiliary records; if aux_var_bound
-// OBSOLETE records are present, the lo_bound and hi_bound fields of this record are
-// OBSOLETE ignored by the debugger.
-// OBSOLETE
-// OBSOLETE span_comp identifies one of the language-dependent ways in which the distance
-// OBSOLETE between successive array elements (span) is calculated.
-// OBSOLETE dst_use_span_field -- the span is the value of span field.
-// OBSOLETE dst_compute_from_prev -- the span is the size of the previous dimension.
-// OBSOLETE dst_compute_from_next -- the span is the size of the next dimension.
-// OBSOLETE In the latter two cases, the span field contains an amount of padding to add
-// OBSOLETE to the size of the appropriate dimension to calculate the span.
-// OBSOLETE */
-// OBSOLETE
-// OBSOLETE typedef enum
-// OBSOLETE {
-// OBSOLETE dst_use_span_field,
-// OBSOLETE dst_compute_from_prev,
-// OBSOLETE dst_compute_from_next,
-// OBSOLETE dst_span_comp_END_OF_ENUM
-// OBSOLETE }
-// OBSOLETE dst_span_comp_t;
-// OBSOLETE
-// OBSOLETE typedef struct
-// OBSOLETE {
-// OBSOLETE dst_rel_offset_t noffset; /* offset to name string */
-// OBSOLETE dst_src_loc_t src_loc; /* file/line of definition */
-// OBSOLETE dst_type_t elem_type_desc; /* array element type */
-// OBSOLETE dst_type_t indx_type_desc; /* array index type */
-// OBSOLETE long lo_bound; /* lower bound of index */
-// OBSOLETE long hi_bound; /* upper bound of index */
-// OBSOLETE unsigned long span; /* see above */
-// OBSOLETE unsigned long size; /* total array size (bytes) */
-// OBSOLETE boolean multi_dim:1;
-// OBSOLETE boolean is_packed:1; /* true if packed array */
-// OBSOLETE boolean is_signed:1; /* true if packed elements are signed */
-// OBSOLETE dst_span_comp_t span_comp:2; /* how to compute span */
-// OBSOLETE boolean column_major:1;
-// OBSOLETE unsigned short reserved:2; /* must be zero */
-// OBSOLETE unsigned short elem_size:8; /* element size if packed (bits) */
-// OBSOLETE }
-// OBSOLETE dst_rec_array_t ALIGNED1;
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE /*-----------------
-// OBSOLETE SUBRANGE record
-// OBSOLETE -----------------
-// OBSOLETE Describes a subrange type.
-// OBSOLETE */
-// OBSOLETE
-// OBSOLETE /* Variable subrange bounds are described by auxiliary records; if aux_var_bound
-// OBSOLETE records are present, the lo_bound and hi_bound fields of this record are
-// OBSOLETE ignored by the debugger.
-// OBSOLETE */
-// OBSOLETE
-// OBSOLETE typedef struct
-// OBSOLETE {
-// OBSOLETE dst_rel_offset_t noffset; /* offset to name string */
-// OBSOLETE dst_src_loc_t src_loc; /* file/line of subrange definition */
-// OBSOLETE dst_type_t type_desc; /* parent type */
-// OBSOLETE long lo_bound; /* lower bound of subrange */
-// OBSOLETE long hi_bound; /* upper bound of subrange */
-// OBSOLETE unsigned short size; /* storage size (bytes) */
-// OBSOLETE }
-// OBSOLETE dst_rec_subrange_t ALIGNED1;
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE /*---------------
-// OBSOLETE STRING record
-// OBSOLETE ---------------
-// OBSOLETE Describes a string type.
-// OBSOLETE */
-// OBSOLETE
-// OBSOLETE /* Variable subrange bounds are described by auxiliary records; if aux_var_bound
-// OBSOLETE records are present, the lo_bound and hi_bound fields of this record are
-// OBSOLETE ignored by the debugger.
-// OBSOLETE */
-// OBSOLETE
-// OBSOLETE typedef struct
-// OBSOLETE {
-// OBSOLETE dst_rel_offset_t noffset; /* offset to name string */
-// OBSOLETE dst_src_loc_t src_loc; /* file/line of string definition */
-// OBSOLETE dst_type_t elem_type_desc; /* element type */
-// OBSOLETE dst_type_t indx_type_desc; /* index type */
-// OBSOLETE long lo_bound; /* lower bound */
-// OBSOLETE long hi_bound; /* upper bound */
-// OBSOLETE unsigned long size; /* total string size (bytes) if fixed */
-// OBSOLETE }
-// OBSOLETE dst_rec_string_t ALIGNED1;
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE /*---------------
-// OBSOLETE SET record
-// OBSOLETE ---------------
-// OBSOLETE Describes a set type.
-// OBSOLETE */
-// OBSOLETE
-// OBSOLETE typedef struct
-// OBSOLETE {
-// OBSOLETE dst_rel_offset_t noffset; /* offset to name string */
-// OBSOLETE dst_src_loc_t src_loc; /* file/line of definition */
-// OBSOLETE dst_type_t type_desc; /* element type */
-// OBSOLETE unsigned short nbits; /* number of bits in set */
-// OBSOLETE unsigned short size; /* storage size (bytes) */
-// OBSOLETE }
-// OBSOLETE dst_rec_set_t ALIGNED1;
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE /*-----------------------------
-// OBSOLETE IMPLICIT ENUMERATION record
-// OBSOLETE -----------------------------
-// OBSOLETE Describes an enumeration type with implicit element values = 0, 1, 2, ...
-// OBSOLETE (Pascal-style).
-// OBSOLETE */
-// OBSOLETE
-// OBSOLETE typedef struct
-// OBSOLETE {
-// OBSOLETE dst_rel_offset_t noffset; /* offset to name string */
-// OBSOLETE dst_src_loc_t src_loc; /* file/line of definition */
-// OBSOLETE unsigned short nelems; /* number of elements in enumeration */
-// OBSOLETE unsigned short size; /* storage size (bytes) */
-// OBSOLETE /* offsets to name strings of elements 0, 1, 2, ... */
-// OBSOLETE dst_rel_offset_t elem_noffsets[dst_dummy_array_size];
-// OBSOLETE }
-// OBSOLETE dst_rec_implicit_enum_t ALIGNED1;
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE /*-----------------------------
-// OBSOLETE EXPLICIT ENUMERATION record
-// OBSOLETE -----------------------------
-// OBSOLETE Describes an enumeration type with explicitly assigned element values
-// OBSOLETE (C-style).
-// OBSOLETE */
-// OBSOLETE
-// OBSOLETE typedef struct
-// OBSOLETE {
-// OBSOLETE dst_rel_offset_t noffset; /* offset to element name string */
-// OBSOLETE long value; /* element value */
-// OBSOLETE }
-// OBSOLETE dst_enum_elem_t;
-// OBSOLETE
-// OBSOLETE typedef struct
-// OBSOLETE {
-// OBSOLETE dst_rel_offset_t noffset; /* offset to name string */
-// OBSOLETE dst_src_loc_t src_loc; /* file/line of definition */
-// OBSOLETE unsigned short nelems; /* number of elements in enumeration */
-// OBSOLETE unsigned short size; /* storage size (bytes) */
-// OBSOLETE /* name/value pairs, one describing each enumeration value: */
-// OBSOLETE dst_enum_elem_t elems[dst_dummy_array_size];
-// OBSOLETE }
-// OBSOLETE dst_rec_explicit_enum_t ALIGNED1;
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE /*-----------------------
-// OBSOLETE RECORD / UNION record
-// OBSOLETE -----------------------
-// OBSOLETE Describes a record (struct) or union.
-// OBSOLETE
-// OBSOLETE If the record is larger than 2**16 bytes then an attached aux record
-// OBSOLETE specifies its size. Also, if the record is stored in short form then
-// OBSOLETE attached records specify field offsets larger than 2**16 bytes.
-// OBSOLETE
-// OBSOLETE Whether the fields[] array or sfields[] array is used is selected by
-// OBSOLETE the dst_rec_type_t of the overall dst record.
-// OBSOLETE */
-// OBSOLETE
-// OBSOLETE /*
-// OBSOLETE Record field descriptor, short form. This form handles only fields which
-// OBSOLETE are an even number of bytes long, located some number of bytes from the
-// OBSOLETE start of the record.
-// OBSOLETE */
-// OBSOLETE typedef struct
-// OBSOLETE {
-// OBSOLETE dst_rel_offset_t noffset; /* offset to field name string */
-// OBSOLETE dst_type_t type_desc; /* field type */
-// OBSOLETE unsigned short foffset; /* field offset from start of record (bytes) */
-// OBSOLETE }
-// OBSOLETE dst_short_field_t ALIGNED1;
-// OBSOLETE
-// OBSOLETE typedef struct
-// OBSOLETE {
-// OBSOLETE dst_rel_offset_t noffset; /* offset to name string */
-// OBSOLETE dst_type_t type_desc; /* field type */
-// OBSOLETE unsigned short foffset; /* byte offset */
-// OBSOLETE unsigned short is_packed:1; /* True if field is packed */
-// OBSOLETE unsigned short bit_offset:6; /* Bit offset */
-// OBSOLETE unsigned short size:6; /* Size in bits */
-// OBSOLETE unsigned short sign:1; /* True if signed */
-// OBSOLETE unsigned short pad:2; /* Padding. Must be 0 */
-// OBSOLETE }
-// OBSOLETE dst_old_field_t ALIGNED1;
-// OBSOLETE
-// OBSOLETE /* Tag enumeration for long record field descriptor:
-// OBSOLETE */
-// OBSOLETE typedef enum
-// OBSOLETE {
-// OBSOLETE dst_field_byte,
-// OBSOLETE dst_field_bit,
-// OBSOLETE dst_field_loc,
-// OBSOLETE dst_field_END_OF_ENUM
-// OBSOLETE }
-// OBSOLETE dst_field_format_t;
-// OBSOLETE
-// OBSOLETE /*
-// OBSOLETE Record field descriptor, long form. The format of the field information
-// OBSOLETE is identified by the format_tag, which contains one of the above values.
-// OBSOLETE The field_byte variant is equivalent to the short form of field descriptor.
-// OBSOLETE The field_bit variant handles fields which are any number of bits long,
-// OBSOLETE located some number of bits from the start of the record. The field_loc
-// OBSOLETE variant allows the location of the field to be described by a general loc
-// OBSOLETE string.
-// OBSOLETE */
-// OBSOLETE typedef struct
-// OBSOLETE {
-// OBSOLETE dst_rel_offset_t noffset; /* offset to name of field */
-// OBSOLETE dst_type_t type_desc; /* type of field */
-// OBSOLETE union
-// OBSOLETE {
-// OBSOLETE struct
-// OBSOLETE {
-// OBSOLETE dst_field_format_t format_tag:2; /* dst_field_byte */
-// OBSOLETE unsigned long offset:30; /* offset of field in bytes */
-// OBSOLETE }
-// OBSOLETE field_byte ALIGNED1;
-// OBSOLETE struct
-// OBSOLETE {
-// OBSOLETE dst_field_format_t format_tag:2; /* dst_field_bit */
-// OBSOLETE unsigned long nbits:6; /* bit size of field */
-// OBSOLETE unsigned long is_signed:1; /* signed/unsigned attribute */
-// OBSOLETE unsigned long bit_offset:3; /* bit offset from byte boundary */
-// OBSOLETE int pad:4; /* must be zero */
-// OBSOLETE unsigned short byte_offset; /* offset of byte boundary */
-// OBSOLETE }
-// OBSOLETE field_bit ALIGNED1;
-// OBSOLETE struct
-// OBSOLETE {
-// OBSOLETE dst_field_format_t format_tag:2; /* dst_field_loc */
-// OBSOLETE int loffset:30; /* dst_rel_offset_t to loc string */
-// OBSOLETE }
-// OBSOLETE field_loc ALIGNED1;
-// OBSOLETE }
-// OBSOLETE f ALIGNED1;
-// OBSOLETE }
-// OBSOLETE dst_field_t;
-// OBSOLETE
-// OBSOLETE /* The field_loc.loffset field is a 30-bit signed value. Some versions of C do
-// OBSOLETE not support signed bit fields. The following macro will extract that field
-// OBSOLETE as a signed value:
-// OBSOLETE */
-// OBSOLETE #define dst_field_loffset(field_rec) \
-// OBSOLETE ( ((int) ((field_rec).f.field_loc.loffset << 2)) >> 2 )
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE typedef struct
-// OBSOLETE {
-// OBSOLETE dst_rel_offset_t noffset; /* offset to record name string */
-// OBSOLETE dst_src_loc_t src_loc; /* file/line where this record is defined */
-// OBSOLETE unsigned short size; /* storage size (bytes) */
-// OBSOLETE unsigned short nfields; /* number of fields in this record */
-// OBSOLETE union
-// OBSOLETE {
-// OBSOLETE dst_field_t fields[dst_dummy_array_size];
-// OBSOLETE dst_short_field_t sfields[dst_dummy_array_size];
-// OBSOLETE dst_old_field_t ofields[dst_dummy_array_size];
-// OBSOLETE }
-// OBSOLETE f; /* array of fields */
-// OBSOLETE }
-// OBSOLETE dst_rec_record_t ALIGNED1;
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE /*-------------
-// OBSOLETE FILE record
-// OBSOLETE -------------
-// OBSOLETE Describes a file type.
-// OBSOLETE */
-// OBSOLETE
-// OBSOLETE typedef struct
-// OBSOLETE {
-// OBSOLETE dst_rel_offset_t noffset; /* offset to name string */
-// OBSOLETE dst_src_loc_t src_loc; /* file/line where type was defined */
-// OBSOLETE dst_type_t type_desc; /* file element type */
-// OBSOLETE }
-// OBSOLETE dst_rec_file_t ALIGNED1;
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE /*---------------
-// OBSOLETE OFFSET record
-// OBSOLETE ---------------
-// OBSOLETE Describes a Pascal offset type.
-// OBSOLETE (This type, an undocumented Domain Pascal extension, is currently not
-// OBSOLETE supported by the debugger)
-// OBSOLETE */
-// OBSOLETE
-// OBSOLETE typedef struct
-// OBSOLETE {
-// OBSOLETE dst_rel_offset_t noffset; /* offset to the name string */
-// OBSOLETE dst_src_loc_t src_loc; /* file/line of definition */
-// OBSOLETE dst_type_t area_type_desc; /* area type */
-// OBSOLETE dst_type_t base_type_desc; /* base type */
-// OBSOLETE long lo_bound; /* low bound of the offset range */
-// OBSOLETE long hi_bound; /* high bound of the offset range */
-// OBSOLETE long bias; /* bias */
-// OBSOLETE unsigned short scale; /* scale factor */
-// OBSOLETE unsigned short size; /* storage size (bytes) */
-// OBSOLETE }
-// OBSOLETE dst_rec_offset_t ALIGNED1;
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE /*--------------
-// OBSOLETE ALIAS record
-// OBSOLETE --------------
-// OBSOLETE Describes a type alias (e.g., typedef).
-// OBSOLETE */
-// OBSOLETE
-// OBSOLETE typedef struct
-// OBSOLETE {
-// OBSOLETE dst_rel_offset_t noffset; /* offset to name string */
-// OBSOLETE dst_src_loc_t src_loc; /* file/line of definition */
-// OBSOLETE dst_type_t type_desc; /* parent type */
-// OBSOLETE }
-// OBSOLETE dst_rec_alias_t ALIGNED1;
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE /*------------------
-// OBSOLETE SIGNATURE record
-// OBSOLETE ------------------
-// OBSOLETE Describes a procedure/function type.
-// OBSOLETE */
-// OBSOLETE
-// OBSOLETE /* Enumeration of argument semantics. Note that most are mutually
-// OBSOLETE exclusive.
-// OBSOLETE */
-// OBSOLETE typedef enum
-// OBSOLETE {
-// OBSOLETE dst_arg_attr_val, /* passed by value */
-// OBSOLETE dst_arg_attr_ref, /* passed by reference */
-// OBSOLETE dst_arg_attr_name, /* passed by name */
-// OBSOLETE dst_arg_attr_in, /* readable in the callee */
-// OBSOLETE dst_arg_attr_out, /* writable in the callee */
-// OBSOLETE dst_arg_attr_hidden, /* not visible in the caller */
-// OBSOLETE dst_arg_attr_END_OF_ENUM
-// OBSOLETE }
-// OBSOLETE dst_arg_attr_t;
-// OBSOLETE
-// OBSOLETE /* Argument descriptor. Actually points to a variable record for most of the
-// OBSOLETE information.
-// OBSOLETE */
-// OBSOLETE typedef struct
-// OBSOLETE {
-// OBSOLETE dst_rel_offset_t var_offset; /* offset to variable record */
-// OBSOLETE unsigned short attributes; /* a mask of dst_arg_attr_t flags */
-// OBSOLETE }
-// OBSOLETE dst_arg_t ALIGNED1;
-// OBSOLETE
-// OBSOLETE typedef struct
-// OBSOLETE {
-// OBSOLETE dst_rel_offset_t noffset; /* offset to name string */
-// OBSOLETE dst_src_loc_t src_loc; /* file/line of function definition */
-// OBSOLETE dst_rel_offset_t result; /* offset to function result variable record */
-// OBSOLETE unsigned short nargs; /* number of arguments */
-// OBSOLETE dst_arg_t args[dst_dummy_array_size];
-// OBSOLETE }
-// OBSOLETE dst_rec_signature_t ALIGNED1;
-// OBSOLETE
-// OBSOLETE /*--------------
-// OBSOLETE SCOPE record
-// OBSOLETE --------------
-// OBSOLETE Obsolete. Use the new ENTRY type instead.
-// OBSOLETE Old compilers may put this in as the first entry in a function,
-// OBSOLETE terminated by an end of scope entry.
-// OBSOLETE */
-// OBSOLETE
-// OBSOLETE typedef struct
-// OBSOLETE {
-// OBSOLETE dst_rel_offset_t noffset; /* Name offset */
-// OBSOLETE dst_src_loc_t start_line; /* Starting line */
-// OBSOLETE dst_src_loc_t end_line; /* Ending line */
-// OBSOLETE }
-// OBSOLETE dst_rec_scope_t ALIGNED1;
-// OBSOLETE
-// OBSOLETE /*--------------
-// OBSOLETE ENTRY record
-// OBSOLETE --------------
-// OBSOLETE Describes a procedure/function entry point. An entry record is to a
-// OBSOLETE signature record roughly as a variable record is to a type descriptor record.
-// OBSOLETE
-// OBSOLETE The entry_number field is keyed to the entry numbers in .lines -- the
-// OBSOLETE debugger locates the code location of an entry by searching the line
-// OBSOLETE number table for an entry numbered with the value of entry_number. The
-// OBSOLETE main entry is numbered zero.
-// OBSOLETE */
-// OBSOLETE
-// OBSOLETE typedef struct
-// OBSOLETE {
-// OBSOLETE dst_rel_offset_t noffset; /* offset to entry name string */
-// OBSOLETE dst_rel_offset_t loffset; /* where to jump to call this entry */
-// OBSOLETE dst_src_loc_t src_loc; /* file/line of definition */
-// OBSOLETE dst_rel_offset_t sig_desc; /* offset to signature descriptor */
-// OBSOLETE unsigned int entry_number:8;
-// OBSOLETE int pad:8; /* must be zero */
-// OBSOLETE }
-// OBSOLETE dst_rec_entry_t ALIGNED1;
-// OBSOLETE
-// OBSOLETE /*-----------------------
-// OBSOLETE Old format ENTRY record
-// OBSOLETE -----------------------
-// OBSOLETE Supposedly obsolete but still used by some compilers.
-// OBSOLETE */
-// OBSOLETE
-// OBSOLETE typedef struct
-// OBSOLETE {
-// OBSOLETE dst_rel_offset_t noffset; /* Offset to entry name string */
-// OBSOLETE dst_src_loc_t src_loc; /* Location in source */
-// OBSOLETE dst_rel_offset_t sig_desc; /* Signature description */
-// OBSOLETE char unknown[36];
-// OBSOLETE }
-// OBSOLETE dst_rec_old_entry_t ALIGNED1;
-// OBSOLETE
-// OBSOLETE /*--------------
-// OBSOLETE LABEL record
-// OBSOLETE --------------
-// OBSOLETE Describes a program label.
-// OBSOLETE */
-// OBSOLETE
-// OBSOLETE typedef struct
-// OBSOLETE {
-// OBSOLETE dst_rel_offset_t noffset; /* offset to label string */
-// OBSOLETE dst_rel_offset_t loffset; /* offset to loc string */
-// OBSOLETE dst_src_loc_t src_loc; /* file/line of definition */
-// OBSOLETE }
-// OBSOLETE dst_rec_label_t ALIGNED1;
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE /*-----------------------
-// OBSOLETE AUXILIARY SIZE record
-// OBSOLETE -----------------------
-// OBSOLETE May appear in the auxiliary record list of any type or variable record to
-// OBSOLETE modify the default size of the type or variable.
-// OBSOLETE */
-// OBSOLETE
-// OBSOLETE typedef struct
-// OBSOLETE {
-// OBSOLETE unsigned long size; /* size (bytes) */
-// OBSOLETE }
-// OBSOLETE dst_rec_aux_size_t ALIGNED1;
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE /*-----------------------
-// OBSOLETE AUXILIARY ALIGN record
-// OBSOLETE -----------------------
-// OBSOLETE May appear in the auxiliary record list of any type or variable record to
-// OBSOLETE modify the default alignment of the type or variable.
-// OBSOLETE */
-// OBSOLETE
-// OBSOLETE typedef struct
-// OBSOLETE {
-// OBSOLETE unsigned short alignment; /* # of low order zero bits */
-// OBSOLETE }
-// OBSOLETE dst_rec_aux_align_t ALIGNED1;
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE /*-----------------------------
-// OBSOLETE AUXILIARY FIELD SIZE record
-// OBSOLETE -----------------------------
-// OBSOLETE May appear in the auxiliary record list of any RECORD/UNION record to
-// OBSOLETE modify the default size of a field.
-// OBSOLETE */
-// OBSOLETE
-// OBSOLETE typedef struct
-// OBSOLETE {
-// OBSOLETE unsigned short field_no; /* field number */
-// OBSOLETE unsigned long size; /* size (bits) */
-// OBSOLETE }
-// OBSOLETE dst_rec_aux_field_size_t ALIGNED1;
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE /*-----------------------------
-// OBSOLETE AUXILIARY FIELD OFFSET record
-// OBSOLETE -----------------------------
-// OBSOLETE May appear in the auxiliary record list of any RECORD/UNION record to
-// OBSOLETE specify a field offset larger than 2**16.
-// OBSOLETE */
-// OBSOLETE
-// OBSOLETE typedef struct
-// OBSOLETE {
-// OBSOLETE unsigned short field_no; /* field number */
-// OBSOLETE unsigned long foffset; /* offset */
-// OBSOLETE }
-// OBSOLETE dst_rec_aux_field_off_t ALIGNED1;
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE /*-----------------------------
-// OBSOLETE AUXILIARY FIELD ALIGN record
-// OBSOLETE -----------------------------
-// OBSOLETE May appear in the auxiliary record list of any RECORD/UNION record to
-// OBSOLETE modify the default alignment of a field.
-// OBSOLETE */
-// OBSOLETE
-// OBSOLETE typedef struct
-// OBSOLETE {
-// OBSOLETE unsigned short field_no; /* field number */
-// OBSOLETE unsigned short alignment; /* number of low order zero bits */
-// OBSOLETE }
-// OBSOLETE dst_rec_aux_field_align_t ALIGNED1;
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE /*----------------------------
-// OBSOLETE AUXILIARY VAR BOUND record
-// OBSOLETE ----------------------------
-// OBSOLETE May appear in the auxiliary record list of any ARRAY, SUBRANGE or STRING
-// OBSOLETE record to describe a variable bound for the range of the type.
-// OBSOLETE */
-// OBSOLETE
-// OBSOLETE typedef enum
-// OBSOLETE {
-// OBSOLETE dst_low_bound, /* the low bound is variable */
-// OBSOLETE dst_high_bound, /* the high bound is variable */
-// OBSOLETE dst_var_bound_END_OF_ENUM
-// OBSOLETE }
-// OBSOLETE dst_var_bound_t;
-// OBSOLETE
-// OBSOLETE typedef struct
-// OBSOLETE {
-// OBSOLETE unsigned short which; /* which bound */
-// OBSOLETE dst_rel_offset_t voffset ALIGNED1; /* variable that defines bound */
-// OBSOLETE }
-// OBSOLETE dst_rec_aux_var_bound_t ALIGNED1;
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE /*----------------------------------
-// OBSOLETE AUXILIARY TYPE DERIVATION record
-// OBSOLETE ----------------------------------
-// OBSOLETE May appear in the auxiliary record list of any RECORD/UNION record to denote
-// OBSOLETE class inheritance of that type from a parent type.
-// OBSOLETE
-// OBSOLETE Inheritance implies that it is possible to convert the inheritor type to the
-// OBSOLETE inherited type, retaining those fields which were inherited. To allow this,
-// OBSOLETE orig_field_no, a field number into the record type, is provided. If
-// OBSOLETE orig_is_pointer is false, then the start of the inherited record is located
-// OBSOLETE at the location of the field indexed by orig_field_no. If orig_is_pointer
-// OBSOLETE is true, then it is located at the address contained in the field indexed
-// OBSOLETE by orig_field_no (assumed to be a pointer).
-// OBSOLETE */
-// OBSOLETE
-// OBSOLETE typedef struct
-// OBSOLETE {
-// OBSOLETE dst_type_t parent_type; /* reference to inherited type */
-// OBSOLETE unsigned short orig_field_no;
-// OBSOLETE boolean orig_is_pointer:1;
-// OBSOLETE int unused:15; /* must be zero */
-// OBSOLETE }
-// OBSOLETE dst_rec_aux_type_deriv_t ALIGNED1;
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE /*------------------------------------
-// OBSOLETE AUXILIARY VARIABLE LIFETIME record
-// OBSOLETE ------------------------------------
-// OBSOLETE May appear in the auxiliary record list of a VARIABLE record to add location
-// OBSOLETE information for an additional variable lifetime.
-// OBSOLETE */
-// OBSOLETE
-// OBSOLETE typedef struct
-// OBSOLETE {
-// OBSOLETE dst_rel_offset_t loffset;
-// OBSOLETE }
-// OBSOLETE dst_rec_aux_lifetime_t ALIGNED1;
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE /*-------------------------------
-// OBSOLETE AUXILIARY POINTER BASE record
-// OBSOLETE -------------------------------
-// OBSOLETE May appear in the auxiliary record list of a VARIABLE record to provide a
-// OBSOLETE pointer base to substitute for references to any such bases in the location
-// OBSOLETE string of the variable. A pointer base is another VARIABLE record. When
-// OBSOLETE the variable is evaluated by the debugger, it uses the current value of the
-// OBSOLETE pointer base variable in computing its location.
-// OBSOLETE
-// OBSOLETE This is useful for representing FORTRAN pointer-based variables.
-// OBSOLETE */
-// OBSOLETE
-// OBSOLETE typedef struct
-// OBSOLETE {
-// OBSOLETE dst_rel_offset_t voffset;
-// OBSOLETE }
-// OBSOLETE dst_rec_aux_ptr_base_t ALIGNED1;
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE /*---------------------------------
-// OBSOLETE AUXILIARY REGISTER VALUE record
-// OBSOLETE ---------------------------------
-// OBSOLETE May appear in the auxiliary record list of an ENTRY record to specify
-// OBSOLETE a register that must be set to a specific value before jumping to the entry
-// OBSOLETE point in a debugger "call". The debugger must set the debuggee register,
-// OBSOLETE specified by the register code, to the value of the *address* to which the
-// OBSOLETE location string resolves. If the address is register-relative, then the
-// OBSOLETE call cannot be made unless the current stack frame is the lexical parent
-// OBSOLETE of the entry. An example of this is when a (Pascal) nested procedure
-// OBSOLETE contains references to its parent's variables, which it accesses through
-// OBSOLETE a static link register. The static link register must be set to some
-// OBSOLETE address relative to the parent's stack base register.
-// OBSOLETE */
-// OBSOLETE
-// OBSOLETE typedef struct
-// OBSOLETE {
-// OBSOLETE unsigned short reg; /* identifies register to set (isp enum) */
-// OBSOLETE dst_rel_offset_t loffset; /* references a location string */
-// OBSOLETE }
-// OBSOLETE dst_rec_aux_reg_val_t ALIGNED1;
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE /*==========================================================*/
-// OBSOLETE /*========== RECORDS USED IN .blocks AND .symbols ==========*/
-// OBSOLETE /*==========================================================*/
-// OBSOLETE
-// OBSOLETE /*---------------------
-// OBSOLETE STRING TABLE record
-// OBSOLETE ---------------------
-// OBSOLETE A string table record contains any number of null-terminated, variable length
-// OBSOLETE strings. The length field gives the size in bytes of the text field, which
-// OBSOLETE can be any size.
-// OBSOLETE
-// OBSOLETE The global name table shares this format. This record appears in the
-// OBSOLETE .blocks section. Each string in the table identifies a global defined in
-// OBSOLETE the current compilation unit.
-// OBSOLETE
-// OBSOLETE The loc pool record shares this format as well. Loc strings are described
-// OBSOLETE elsewhere.
-// OBSOLETE */
-// OBSOLETE
-// OBSOLETE typedef struct
-// OBSOLETE {
-// OBSOLETE unsigned long length;
-// OBSOLETE char text[dst_dummy_array_size];
-// OBSOLETE }
-// OBSOLETE dst_rec_string_tab_t ALIGNED1;
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE /*-----------------------
-// OBSOLETE AUXILIARY QUAL record
-// OBSOLETE -----------------------
-// OBSOLETE May appear in the auxiliary record list of any BLOCK, VARIABLE, or type record
-// OBSOLETE to provide it with a fully-qualified, language-dependent name.
-// OBSOLETE */
-// OBSOLETE
-// OBSOLETE typedef struct
-// OBSOLETE {
-// OBSOLETE dst_rel_offset_t lang_qual_name;
-// OBSOLETE }
-// OBSOLETE dst_rec_aux_qual_t ALIGNED1;
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE /*----------------
-// OBSOLETE FORWARD record
-// OBSOLETE ----------------
-// OBSOLETE Reference to a record somewhere else. This allows identical definitions in
-// OBSOLETE different scopes to share data.
-// OBSOLETE */
-// OBSOLETE
-// OBSOLETE typedef struct
-// OBSOLETE {
-// OBSOLETE dst_rel_offset_t rec_off;
-// OBSOLETE }
-// OBSOLETE dst_rec_forward_t ALIGNED1;
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE /*-------------------------------
-// OBSOLETE AUXILIARY SOURCE RANGE record
-// OBSOLETE -------------------------------
-// OBSOLETE May appear in the auxiliary record list of any BLOCK record to specify a
-// OBSOLETE range of source lines over which the block is active.
-// OBSOLETE */
-// OBSOLETE
-// OBSOLETE typedef struct
-// OBSOLETE {
-// OBSOLETE dst_src_loc_t first_line; /* first source line */
-// OBSOLETE dst_src_loc_t last_line; /* last source line */
-// OBSOLETE }
-// OBSOLETE dst_rec_aux_src_range_t ALIGNED1;
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE /*------------------
-// OBSOLETE EXTENSION record
-// OBSOLETE ------------------
-// OBSOLETE Provision for "foreign" records, such as might be generated by a non-Apollo
-// OBSOLETE compiler. Apollo software will ignore these.
-// OBSOLETE */
-// OBSOLETE
-// OBSOLETE typedef struct
-// OBSOLETE {
-// OBSOLETE unsigned short rec_size; /* record size (bytes) */
-// OBSOLETE unsigned short ext_type; /* defined by whoever generates it */
-// OBSOLETE unsigned short ext_data; /* place-holder for arbitrary amount of data */
-// OBSOLETE }
-// OBSOLETE dst_rec_extension_t ALIGNED1;
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE /*
-// OBSOLETE ** DEBUG SYMBOL record -- The wrapper for all .blocks and .symbols records.
-// OBSOLETE **
-// OBSOLETE ** This record ties together all previous .blocks and .symbols records
-// OBSOLETE ** together in a union with a common header. The rec_type field of the
-// OBSOLETE ** header identifies the record type. The rec_flags field currently only
-// OBSOLETE ** defines auxiliary record lists.
-// OBSOLETE **
-// OBSOLETE ** If a record carries with it a non-null auxiliary record list, its
-// OBSOLETE ** dst_flag_has_aux_recs flag is set, and each of the records that follow
-// OBSOLETE ** it are treated as its auxiliary records, until the end of the compilation
-// OBSOLETE ** unit or scope is reached, or until an auxiliary record with its
-// OBSOLETE ** dst_flag_last_aux_rec flag set is reached.
-// OBSOLETE */
-// OBSOLETE
-// OBSOLETE typedef enum
-// OBSOLETE {
-// OBSOLETE dst_flag_has_aux_recs,
-// OBSOLETE dst_flag_last_aux_rec,
-// OBSOLETE dst_rec_flag_END_OF_ENUM
-// OBSOLETE }
-// OBSOLETE dst_rec_flags_t;
-// OBSOLETE
-// OBSOLETE typedef struct
-// OBSOLETE {
-// OBSOLETE dst_rec_type_t rec_type:8; /* record type */
-// OBSOLETE int rec_flags:8; /* mask of dst_rec_flags_t */
-// OBSOLETE union /* switched on rec_type field above */
-// OBSOLETE {
-// OBSOLETE /* dst_typ_pad requires no additional fields */
-// OBSOLETE dst_rec_comp_unit_t comp_unit_;
-// OBSOLETE dst_rec_section_tab_t section_tab_;
-// OBSOLETE dst_rec_file_tab_t file_tab_;
-// OBSOLETE dst_rec_block_t block_;
-// OBSOLETE dst_rec_var_t var_;
-// OBSOLETE dst_rec_pointer_t pointer_;
-// OBSOLETE dst_rec_array_t array_;
-// OBSOLETE dst_rec_subrange_t subrange_;
-// OBSOLETE dst_rec_set_t set_;
-// OBSOLETE dst_rec_implicit_enum_t implicit_enum_;
-// OBSOLETE dst_rec_explicit_enum_t explicit_enum_;
-// OBSOLETE /* dst_typ_short_{rec,union} are represented by 'rec' (below) */
-// OBSOLETE dst_rec_file_t file_;
-// OBSOLETE dst_rec_offset_t offset_;
-// OBSOLETE dst_rec_alias_t alias_;
-// OBSOLETE dst_rec_signature_t signature_;
-// OBSOLETE dst_rec_old_label_t old_label_;
-// OBSOLETE dst_rec_scope_t scope_;
-// OBSOLETE /* dst_typ_end_scope requires no additional fields */
-// OBSOLETE dst_rec_string_tab_t string_tab_;
-// OBSOLETE /* dst_typ_global_name_tab is represented by 'string_tab' (above) */
-// OBSOLETE dst_rec_forward_t forward_;
-// OBSOLETE dst_rec_aux_size_t aux_size_;
-// OBSOLETE dst_rec_aux_align_t aux_align_;
-// OBSOLETE dst_rec_aux_field_size_t aux_field_size_;
-// OBSOLETE dst_rec_aux_field_off_t aux_field_off_;
-// OBSOLETE dst_rec_aux_field_align_t aux_field_align_;
-// OBSOLETE dst_rec_aux_qual_t aux_qual_;
-// OBSOLETE dst_rec_aux_var_bound_t aux_var_bound_;
-// OBSOLETE dst_rec_extension_t extension_;
-// OBSOLETE dst_rec_string_t string_;
-// OBSOLETE dst_rec_const_t const_;
-// OBSOLETE /* dst_typ_reference is represented by 'pointer' (above) */
-// OBSOLETE dst_rec_record_t record_;
-// OBSOLETE /* dst_typ_union is represented by 'record' (above) */
-// OBSOLETE dst_rec_aux_type_deriv_t aux_type_deriv_;
-// OBSOLETE /* dst_typ_locpool is represented by 'string_tab' (above) */
-// OBSOLETE dst_rec_variable_t variable_;
-// OBSOLETE dst_rec_label_t label_;
-// OBSOLETE dst_rec_entry_t entry_;
-// OBSOLETE dst_rec_aux_lifetime_t aux_lifetime_;
-// OBSOLETE dst_rec_aux_ptr_base_t aux_ptr_base_;
-// OBSOLETE dst_rec_aux_src_range_t aux_src_range_;
-// OBSOLETE dst_rec_aux_reg_val_t aux_reg_val_;
-// OBSOLETE dst_rec_name_tab_t aux_unit_names_;
-// OBSOLETE dst_rec_sect_info_tab_t aux_sect_info_;
-// OBSOLETE }
-// OBSOLETE rec_data ALIGNED1;
-// OBSOLETE }
-// OBSOLETE dst_rec_t, *dst_rec_ptr_t;
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE /*===============================================*/
-// OBSOLETE /*========== .lines SECTION DEFINITIONS =========*/
-// OBSOLETE /*===============================================*/
-// OBSOLETE /*
-// OBSOLETE The .lines section contains a sequence of line number tables. There is no
-// OBSOLETE record structure within the section. The start of the table for a routine
-// OBSOLETE is pointed to by the block record, and the end of the table is signaled by
-// OBSOLETE an escape code.
-// OBSOLETE
-// OBSOLETE A line number table is a sequence of bytes. The default entry contains a line
-// OBSOLETE number delta (-7..+7) in the high 4 bits and a pc delta (0..15) in the low 4
-// OBSOLETE bits. Special cases, including when one or both of the values is too large
-// OBSOLETE to fit in 4 bits and other special cases are handled through escape entries.
-// OBSOLETE Escape entries are identified by the value 0x8 in the high 4 bits. The low 4
-// OBSOLETE bits are occupied by a function code. Some escape entries are followed by
-// OBSOLETE additional arguments, which may be bytes, words, or longwords. This data is
-// OBSOLETE not aligned.
-// OBSOLETE
-// OBSOLETE The initial PC offset, file number and line number are zero. Normally, the
-// OBSOLETE table begins with a dst_ln_file escape which establishes the initial file
-// OBSOLETE and line number. All PC deltas are unsigned (thus the table is ordered by
-// OBSOLETE increasing PC); line number deltas are signed. The table ends with a
-// OBSOLETE dst_ln_end escape, which is followed by a final table entry whose PC delta
-// OBSOLETE gives the code size of the last statement.
-// OBSOLETE
-// OBSOLETE Escape Semantic
-// OBSOLETE --------- ------------------------------------------------------------
-// OBSOLETE file Changes file state. The current source file remains constant
-// OBSOLETE until another file escape. Though the line number state is
-// OBSOLETE also updated by a file escape, a file escape does NOT
-// OBSOLETE constitute a line table entry.
-// OBSOLETE
-// OBSOLETE statement Alters the statement number of the next table entry. By
-// OBSOLETE default, all table entries refer to the first statement on a
-// OBSOLETE line. Statement number one is the second statement, and so on.
-// OBSOLETE
-// OBSOLETE entry Identifies the next table entry as the position of an entry
-// OBSOLETE point for the current block. The PC position should follow
-// OBSOLETE any procedure prologue code. An argument specifies the entry
-// OBSOLETE number, which is keyed to the entry number of the corresponding
-// OBSOLETE .symbols ENTRY record.
-// OBSOLETE
-// OBSOLETE exit Identifies the next table entry as the last position within
-// OBSOLETE the current block before a procedure epiloge and subsequent
-// OBSOLETE procedure exit.
-// OBSOLETE
-// OBSOLETE gap By default, the executable code corresponding to a table entry
-// OBSOLETE is assumed to extend to the beginning of the next table entry.
-// OBSOLETE If this is not the case--there is a "hole" in the table--then
-// OBSOLETE a gap escape should follow the first table entry to specify
-// OBSOLETE where the code for that entry ends.
-// OBSOLETE */
-// OBSOLETE
-// OBSOLETE #define dst_ln_escape_flag -8
-// OBSOLETE
-// OBSOLETE /*
-// OBSOLETE Escape function codes:
-// OBSOLETE */
-// OBSOLETE typedef enum
-// OBSOLETE {
-// OBSOLETE dst_ln_pad, /* pad byte */
-// OBSOLETE dst_ln_file, /* file escape. Next 4 bytes are a dst_src_loc_t */
-// OBSOLETE dst_ln_dln1_dpc1, /* 1 byte line delta, 1 byte pc delta */
-// OBSOLETE dst_ln_dln2_dpc2, /* 2 bytes line delta, 2 bytes pc delta */
-// OBSOLETE dst_ln_ln4_pc4, /* 4 bytes ABSOLUTE line number, 4 bytes ABSOLUTE pc */
-// OBSOLETE dst_ln_dln1_dpc0, /* 1 byte line delta, pc delta = 0 */
-// OBSOLETE dst_ln_ln_off_1, /* statement escape, stmt # = 1 (2nd stmt on line) */
-// OBSOLETE dst_ln_ln_off, /* statement escape, stmt # = next byte */
-// OBSOLETE dst_ln_entry, /* entry escape, next byte is entry number */
-// OBSOLETE dst_ln_exit, /* exit escape */
-// OBSOLETE dst_ln_stmt_end, /* gap escape, 4 bytes pc delta */
-// OBSOLETE dst_ln_escape_11, /* reserved */
-// OBSOLETE dst_ln_escape_12, /* reserved */
-// OBSOLETE dst_ln_escape_13, /* reserved */
-// OBSOLETE dst_ln_nxt_byte, /* next byte contains the real escape code */
-// OBSOLETE dst_ln_end, /* end escape, final entry follows */
-// OBSOLETE dst_ln_escape_END_OF_ENUM
-// OBSOLETE }
-// OBSOLETE dst_ln_escape_t;
-// OBSOLETE
-// OBSOLETE /*
-// OBSOLETE Line number table entry
-// OBSOLETE */
-// OBSOLETE typedef union
-// OBSOLETE {
-// OBSOLETE struct
-// OBSOLETE {
-// OBSOLETE unsigned int ln_delta:4; /* 4 bit line number delta */
-// OBSOLETE unsigned int pc_delta:4; /* 4 bit pc delta */
-// OBSOLETE }
-// OBSOLETE delta;
-// OBSOLETE
-// OBSOLETE struct
-// OBSOLETE {
-// OBSOLETE unsigned int esc_flag:4; /* alias for ln_delta */
-// OBSOLETE dst_ln_escape_t esc_code:4; /* escape function code */
-// OBSOLETE }
-// OBSOLETE esc;
-// OBSOLETE
-// OBSOLETE char sdata; /* signed data byte */
-// OBSOLETE unsigned char udata; /* unsigned data byte */
-// OBSOLETE }
-// OBSOLETE dst_ln_entry_t,
-// OBSOLETE *dst_ln_entry_ptr_t,
-// OBSOLETE dst_ln_table_t[dst_dummy_array_size];
-// OBSOLETE
-// OBSOLETE /* The following macro will extract the ln_delta field as a signed value:
-// OBSOLETE */
-// OBSOLETE #define dst_ln_ln_delta(ln_rec) \
-// OBSOLETE ( ((short) ((ln_rec).delta.ln_delta << 12)) >> 12 )
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE typedef struct dst_sec_struct
-// OBSOLETE {
-// OBSOLETE char *buffer;
-// OBSOLETE long position;
-// OBSOLETE long size;
-// OBSOLETE long base;
-// OBSOLETE }
-// OBSOLETE dst_sec;
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE /* Macros for access to the data */
-// OBSOLETE
-// OBSOLETE #define DST_comp_unit(x) ((x)->rec_data.comp_unit_)
-// OBSOLETE #define DST_section_tab(x) ((x)->rec_data.section_tab_)
-// OBSOLETE #define DST_file_tab(x) ((x)->rec_data.file_tab_)
-// OBSOLETE #define DST_block(x) ((x)->rec_data.block_)
-// OBSOLETE #define DST_var(x) ((x)->rec_data.var_)
-// OBSOLETE #define DST_pointer(x) ((x)->rec_data.pointer_)
-// OBSOLETE #define DST_array(x) ((x)->rec_data.array_)
-// OBSOLETE #define DST_subrange(x) ((x)->rec_data.subrange_)
-// OBSOLETE #define DST_set(x) ((x)->rec_data.set_)
-// OBSOLETE #define DST_implicit_enum(x) ((x)->rec_data.implicit_enum_)
-// OBSOLETE #define DST_explicit_enum(x) ((x)->rec_data.explicit_enum_)
-// OBSOLETE #define DST_short_rec(x) ((x)->rec_data.record_)
-// OBSOLETE #define DST_short_union(x) ((x)->rec_data.record_)
-// OBSOLETE #define DST_file(x) ((x)->rec_data.file_)
-// OBSOLETE #define DST_offset(x) ((x)->rec_data.offset_)
-// OBSOLETE #define DST_alias(x) ((x)->rec_data.alias_)
-// OBSOLETE #define DST_signature(x) ((x)->rec_data.signature_)
-// OBSOLETE #define DST_old_label(x) ((x)->rec_data.old_label_)
-// OBSOLETE #define DST_scope(x) ((x)->rec_data.scope_)
-// OBSOLETE #define DST_string_tab(x) ((x)->rec_data.string_tab_)
-// OBSOLETE #define DST_global_name_tab(x) ((x)->rec_data.string_tab_)
-// OBSOLETE #define DST_forward(x) ((x)->rec_data.forward_)
-// OBSOLETE #define DST_aux_size(x) ((x)->rec_data.aux_size_)
-// OBSOLETE #define DST_aux_align(x) ((x)->rec_data.aux_align_)
-// OBSOLETE #define DST_aux_field_size(x) ((x)->rec_data.aux_field_size_)
-// OBSOLETE #define DST_aux_field_off(x) ((x)->rec_data.aux_field_off_)
-// OBSOLETE #define DST_aux_field_align(x) ((x)->rec_data.aux_field_align_)
-// OBSOLETE #define DST_aux_qual(x) ((x)->rec_data.aux_qual_)
-// OBSOLETE #define DST_aux_var_bound(x) ((x)->rec_data.aux_var_bound_)
-// OBSOLETE #define DST_extension(x) ((x)->rec_data.extension_)
-// OBSOLETE #define DST_string(x) ((x)->rec_data.string_)
-// OBSOLETE #define DST_const(x) ((x)->rec_data.const_)
-// OBSOLETE #define DST_reference(x) ((x)->rec_data.pointer_)
-// OBSOLETE #define DST_record(x) ((x)->rec_data.record_)
-// OBSOLETE #define DST_union(x) ((x)->rec_data.record_)
-// OBSOLETE #define DST_aux_type_deriv(x) ((x)->rec_data.aux_type_deriv_)
-// OBSOLETE #define DST_locpool(x) ((x)->rec_data.string_tab_)
-// OBSOLETE #define DST_variable(x) ((x)->rec_data.variable_)
-// OBSOLETE #define DST_label(x) ((x)->rec_data.label_)
-// OBSOLETE #define DST_entry(x) ((x)->rec_data.entry_)
-// OBSOLETE #define DST_aux_lifetime(x) ((x)->rec_data.aux_lifetime_)
-// OBSOLETE #define DST_aux_ptr_base(x) ((x)->rec_data.aux_ptr_base_)
-// OBSOLETE #define DST_aux_src_range(x) ((x)->rec_data.aux_src_range_)
-// OBSOLETE #define DST_aux_reg_val(x) ((x)->rec_data.aux_reg_val_)
-// OBSOLETE #define DST_aux_unit_names(x) ((x)->rec_data.aux_unit_names_)
-// OBSOLETE #define DST_aux_sect_info(x) ((x)->rec_data.aux_sect_info_)
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE /*
-// OBSOLETE * Type codes for loc strings. I'm not entirely certain about all of
-// OBSOLETE * these, but they seem to work.
-// OBSOLETE * troy@cbme.unsw.EDU.AU
-// OBSOLETE * If you find a variable whose location can't be decoded, you should
-// OBSOLETE * find out it's code using "dstdump -s filename". It will record an
-// OBSOLETE * entry for the variable, and give a text representation of what
-// OBSOLETE * the locstring means. Before that explaination there will be a
-// OBSOLETE * number. In the LOCSTRING table, that number will appear before
-// OBSOLETE * the start of the location string. Location string codes are
-// OBSOLETE * five bit codes with a 3 bit argument. Check the high 5 bits of
-// OBSOLETE * the one byte code, and figure out where it goes in here.
-// OBSOLETE * Then figure out exactly what the meaning is and code it in
-// OBSOLETE * dstread.c
-// OBSOLETE *
-// OBSOLETE * Note that ranged locs mean that the variable is in different locations
-// OBSOLETE * depending on the current PC. We ignore these because (a) gcc can't handle
-// OBSOLETE * them, and (b), If you don't use high levels of optimisation they won't
-// OBSOLETE * occur.
-// OBSOLETE */
-// OBSOLETE typedef enum
-// OBSOLETE {
-// OBSOLETE dst_lsc_end, /* End of string */
-// OBSOLETE dst_lsc_indirect, /* Indirect through previous. Arg == 6 */
-// OBSOLETE /* Or register ax (x=arg) */
-// OBSOLETE dst_lsc_dreg, /* register dx (x=arg) */
-// OBSOLETE dst_lsc_03,
-// OBSOLETE dst_lsc_section, /* Section (arg+1) */
-// OBSOLETE dst_lsc_05,
-// OBSOLETE dst_lsc_06,
-// OBSOLETE dst_lsc_add, /* Add (arg+1)*2 */
-// OBSOLETE dst_lsc_sub, /* Subtract (arg+1)*2 */
-// OBSOLETE dst_lsc_09,
-// OBSOLETE dst_lsc_0a,
-// OBSOLETE dst_lsc_sec_byte, /* Section of next byte+1 */
-// OBSOLETE dst_lsc_add_byte, /* Add next byte (arg == 5) or next word
-// OBSOLETE * (arg == 6)
-// OBSOLETE */
-// OBSOLETE dst_lsc_sub_byte, /* Subtract next byte. (arg == 1) or next
-// OBSOLETE * word (arg == 6 ?)
-// OBSOLETE */
-// OBSOLETE dst_lsc_sbreg, /* Stack base register (frame pointer). Arg==0 */
-// OBSOLETE dst_lsc_0f,
-// OBSOLETE dst_lsc_ranged, /* location is pc dependent */
-// OBSOLETE dst_lsc_11,
-// OBSOLETE dst_lsc_12,
-// OBSOLETE dst_lsc_13,
-// OBSOLETE dst_lsc_14,
-// OBSOLETE dst_lsc_15,
-// OBSOLETE dst_lsc_16,
-// OBSOLETE dst_lsc_17,
-// OBSOLETE dst_lsc_18,
-// OBSOLETE dst_lsc_19,
-// OBSOLETE dst_lsc_1a,
-// OBSOLETE dst_lsc_1b,
-// OBSOLETE dst_lsc_1c,
-// OBSOLETE dst_lsc_1d,
-// OBSOLETE dst_lsc_1e,
-// OBSOLETE dst_lsc_1f
-// OBSOLETE }
-// OBSOLETE dst_loc_string_code_t;
-// OBSOLETE
-// OBSOLETE /* If the following occurs after an addition/subtraction, that addition
-// OBSOLETE * or subtraction should be multiplied by 256. It's a complete byte, not
-// OBSOLETE * a code.
-// OBSOLETE */
-// OBSOLETE
-// OBSOLETE #define dst_multiply_256 ((char) 0x73)
-// OBSOLETE
-// OBSOLETE typedef struct
-// OBSOLETE {
-// OBSOLETE char code:5;
-// OBSOLETE char arg:3;
-// OBSOLETE }
-// OBSOLETE dst_loc_header_t ALIGNED1;
-// OBSOLETE
-// OBSOLETE typedef union
-// OBSOLETE {
-// OBSOLETE dst_loc_header_t header;
-// OBSOLETE char data;
-// OBSOLETE }
-// OBSOLETE dst_loc_entry_t ALIGNED1;
-// OBSOLETE
-// OBSOLETE #undef ALIGNED1
-// OBSOLETE #endif /* apollo_dst_h */
+++ /dev/null
-// OBSOLETE /* Read apollo DST symbol tables and convert to internal format, for GDB.
-// OBSOLETE Contributed by Troy Rollo, University of NSW (troy@cbme.unsw.edu.au).
-// OBSOLETE Copyright 1993, 1994, 1995, 1996, 1997, 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 \f
-// OBSOLETE #include "defs.h"
-// OBSOLETE #include "symtab.h"
-// OBSOLETE #include "gdbtypes.h"
-// OBSOLETE #include "breakpoint.h"
-// OBSOLETE #include "bfd.h"
-// OBSOLETE #include "symfile.h"
-// OBSOLETE #include "objfiles.h"
-// OBSOLETE #include "buildsym.h"
-// OBSOLETE #include "gdb_obstack.h"
-// OBSOLETE
-// OBSOLETE #include "gdb_string.h"
-// OBSOLETE
-// OBSOLETE #include "dst.h"
-// OBSOLETE
-// OBSOLETE CORE_ADDR cur_src_start_addr, cur_src_end_addr;
-// OBSOLETE dst_sec blocks_info, lines_info, symbols_info;
-// OBSOLETE
-// OBSOLETE /* Vector of line number information. */
-// OBSOLETE
-// OBSOLETE static struct linetable *line_vector;
-// OBSOLETE
-// OBSOLETE /* Index of next entry to go in line_vector_index. */
-// OBSOLETE
-// OBSOLETE static int line_vector_index;
-// OBSOLETE
-// OBSOLETE /* Last line number recorded in the line vector. */
-// OBSOLETE
-// OBSOLETE static int prev_line_number;
-// OBSOLETE
-// OBSOLETE /* Number of elements allocated for line_vector currently. */
-// OBSOLETE
-// OBSOLETE static int line_vector_length;
-// OBSOLETE
-// OBSOLETE static int init_dst_sections (int);
-// OBSOLETE
-// OBSOLETE static void read_dst_symtab (struct objfile *);
-// OBSOLETE
-// OBSOLETE static void find_dst_sections (bfd *, sec_ptr, PTR);
-// OBSOLETE
-// OBSOLETE static void dst_symfile_init (struct objfile *);
-// OBSOLETE
-// OBSOLETE static void dst_new_init (struct objfile *);
-// OBSOLETE
-// OBSOLETE static void dst_symfile_read (struct objfile *, int);
-// OBSOLETE
-// OBSOLETE static void dst_symfile_finish (struct objfile *);
-// OBSOLETE
-// OBSOLETE static void dst_end_symtab (struct objfile *);
-// OBSOLETE
-// OBSOLETE static void complete_symtab (char *, CORE_ADDR, unsigned int);
-// OBSOLETE
-// OBSOLETE static void dst_start_symtab (void);
-// OBSOLETE
-// OBSOLETE static void dst_record_line (int, CORE_ADDR);
-// OBSOLETE
-// OBSOLETE /* Manage the vector of line numbers. */
-// OBSOLETE /* FIXME: Use record_line instead. */
-// OBSOLETE
-// OBSOLETE static void
-// OBSOLETE dst_record_line (int line, CORE_ADDR pc)
-// OBSOLETE {
-// OBSOLETE struct linetable_entry *e;
-// OBSOLETE /* Make sure line vector is big enough. */
-// OBSOLETE
-// OBSOLETE if (line_vector_index + 2 >= line_vector_length)
-// OBSOLETE {
-// OBSOLETE line_vector_length *= 2;
-// OBSOLETE line_vector = (struct linetable *)
-// OBSOLETE xrealloc ((char *) line_vector, sizeof (struct linetable)
-// OBSOLETE + (line_vector_length
-// OBSOLETE * sizeof (struct linetable_entry)));
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE e = line_vector->item + line_vector_index++;
-// OBSOLETE e->line = line;
-// OBSOLETE e->pc = pc;
-// OBSOLETE }
-// OBSOLETE \f
-// OBSOLETE /* Start a new symtab for a new source file.
-// OBSOLETE It indicates the start of data for one original source file. */
-// OBSOLETE /* FIXME: use start_symtab, like coffread.c now does. */
-// OBSOLETE
-// OBSOLETE static void
-// OBSOLETE dst_start_symtab (void)
-// OBSOLETE {
-// OBSOLETE /* Initialize the source file line number information for this file. */
-// OBSOLETE
-// OBSOLETE if (line_vector) /* Unlikely, but maybe possible? */
-// OBSOLETE xfree (line_vector);
-// OBSOLETE line_vector_index = 0;
-// OBSOLETE line_vector_length = 1000;
-// OBSOLETE prev_line_number = -2; /* Force first line number to be explicit */
-// OBSOLETE line_vector = (struct linetable *)
-// OBSOLETE xmalloc (sizeof (struct linetable)
-// OBSOLETE + line_vector_length * sizeof (struct linetable_entry));
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Save the vital information from when starting to read a file,
-// OBSOLETE for use when closing off the current file.
-// OBSOLETE NAME is the file name the symbols came from, START_ADDR is the first
-// OBSOLETE text address for the file, and SIZE is the number of bytes of text. */
-// OBSOLETE
-// OBSOLETE static void
-// OBSOLETE complete_symtab (char *name, CORE_ADDR start_addr, unsigned int size)
-// OBSOLETE {
-// OBSOLETE last_source_file = savestring (name, strlen (name));
-// OBSOLETE cur_src_start_addr = start_addr;
-// OBSOLETE cur_src_end_addr = start_addr + size;
-// OBSOLETE
-// OBSOLETE if (current_objfile->ei.entry_point >= cur_src_start_addr &&
-// OBSOLETE current_objfile->ei.entry_point < cur_src_end_addr)
-// OBSOLETE {
-// OBSOLETE current_objfile->ei.entry_file_lowpc = cur_src_start_addr;
-// OBSOLETE current_objfile->ei.entry_file_highpc = cur_src_end_addr;
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Finish the symbol definitions for one main source file,
-// OBSOLETE close off all the lexical contexts for that file
-// OBSOLETE (creating struct block's for them), then make the
-// OBSOLETE struct symtab for that file and put it in the list of all such. */
-// OBSOLETE /* FIXME: Use end_symtab, like coffread.c now does. */
-// OBSOLETE
-// OBSOLETE static void
-// OBSOLETE dst_end_symtab (struct objfile *objfile)
-// OBSOLETE {
-// OBSOLETE register struct symtab *symtab;
-// OBSOLETE register struct blockvector *blockvector;
-// OBSOLETE register struct linetable *lv;
-// OBSOLETE
-// OBSOLETE /* Create the blockvector that points to all the file's blocks. */
-// OBSOLETE
-// OBSOLETE blockvector = make_blockvector (objfile);
-// OBSOLETE
-// OBSOLETE /* Now create the symtab object for this source file. */
-// OBSOLETE symtab = allocate_symtab (last_source_file, objfile);
-// OBSOLETE
-// OBSOLETE /* Fill in its components. */
-// OBSOLETE symtab->blockvector = blockvector;
-// OBSOLETE symtab->free_code = free_linetable;
-// OBSOLETE symtab->free_ptr = 0;
-// OBSOLETE symtab->filename = last_source_file;
-// OBSOLETE symtab->dirname = NULL;
-// OBSOLETE symtab->debugformat = obsavestring ("Apollo DST", 10,
-// OBSOLETE &objfile->symbol_obstack);
-// OBSOLETE lv = line_vector;
-// OBSOLETE lv->nitems = line_vector_index;
-// OBSOLETE symtab->linetable = (struct linetable *)
-// OBSOLETE xrealloc ((char *) lv, (sizeof (struct linetable)
-// OBSOLETE + lv->nitems * sizeof (struct linetable_entry)));
-// OBSOLETE
-// OBSOLETE free_named_symtabs (symtab->filename);
-// OBSOLETE
-// OBSOLETE /* Reinitialize for beginning of new file. */
-// OBSOLETE line_vector = 0;
-// OBSOLETE line_vector_length = -1;
-// OBSOLETE last_source_file = NULL;
-// OBSOLETE }
-// OBSOLETE \f
-// OBSOLETE /* dst_symfile_init ()
-// OBSOLETE is the dst-specific initialization routine for reading symbols.
-// OBSOLETE
-// OBSOLETE We will only be called if this is a DST or DST-like file.
-// OBSOLETE BFD handles figuring out the format of the file, and code in symtab.c
-// OBSOLETE uses BFD's determination to vector to us.
-// OBSOLETE
-// OBSOLETE The ultimate result is a new symtab (or, FIXME, eventually a psymtab). */
-// OBSOLETE
-// OBSOLETE static void
-// OBSOLETE dst_symfile_init (struct objfile *objfile)
-// OBSOLETE {
-// OBSOLETE asection *section;
-// OBSOLETE bfd *abfd = objfile->obfd;
-// OBSOLETE
-// OBSOLETE init_entry_point_info (objfile);
-// OBSOLETE
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* This function is called for every section; it finds the outer limits
-// OBSOLETE of the line table (minimum and maximum file offset) so that the
-// OBSOLETE mainline code can read the whole thing for efficiency. */
-// OBSOLETE
-// OBSOLETE /* ARGSUSED */
-// OBSOLETE static void
-// OBSOLETE find_dst_sections (bfd *abfd, sec_ptr asect, PTR vpinfo)
-// OBSOLETE {
-// OBSOLETE int size, count;
-// OBSOLETE long base;
-// OBSOLETE file_ptr offset, maxoff;
-// OBSOLETE dst_sec *section;
-// OBSOLETE
-// OBSOLETE /* WARNING WILL ROBINSON! ACCESSING BFD-PRIVATE DATA HERE! FIXME! */
-// OBSOLETE size = asect->_raw_size;
-// OBSOLETE offset = asect->filepos;
-// OBSOLETE base = asect->vma;
-// OBSOLETE /* End of warning */
-// OBSOLETE
-// OBSOLETE section = NULL;
-// OBSOLETE if (!strcmp (asect->name, ".blocks"))
-// OBSOLETE section = &blocks_info;
-// OBSOLETE else if (!strcmp (asect->name, ".lines"))
-// OBSOLETE section = &lines_info;
-// OBSOLETE else if (!strcmp (asect->name, ".symbols"))
-// OBSOLETE section = &symbols_info;
-// OBSOLETE if (!section)
-// OBSOLETE return;
-// OBSOLETE section->size = size;
-// OBSOLETE section->position = offset;
-// OBSOLETE section->base = base;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE /* The BFD for this file -- only good while we're actively reading
-// OBSOLETE symbols into a psymtab or a symtab. */
-// OBSOLETE
-// OBSOLETE static bfd *symfile_bfd;
-// OBSOLETE
-// OBSOLETE /* Read a symbol file, after initialization by dst_symfile_init. */
-// OBSOLETE /* FIXME! Addr and Mainline are not used yet -- this will not work for
-// OBSOLETE shared libraries or add_file! */
-// OBSOLETE
-// OBSOLETE /* ARGSUSED */
-// OBSOLETE static void
-// OBSOLETE dst_symfile_read (struct objfile *objfile, int mainline)
-// OBSOLETE {
-// OBSOLETE bfd *abfd = objfile->obfd;
-// OBSOLETE char *name = bfd_get_filename (abfd);
-// OBSOLETE int desc;
-// OBSOLETE register int val;
-// OBSOLETE int num_symbols;
-// OBSOLETE int symtab_offset;
-// OBSOLETE int stringtab_offset;
-// OBSOLETE
-// OBSOLETE symfile_bfd = abfd; /* Kludge for swap routines */
-// OBSOLETE
-// OBSOLETE /* WARNING WILL ROBINSON! ACCESSING BFD-PRIVATE DATA HERE! FIXME! */
-// OBSOLETE desc = fileno ((FILE *) (abfd->iostream)); /* File descriptor */
-// OBSOLETE
-// OBSOLETE /* Read the line number table, all at once. */
-// OBSOLETE bfd_map_over_sections (abfd, find_dst_sections, (PTR) NULL);
-// OBSOLETE
-// OBSOLETE val = init_dst_sections (desc);
-// OBSOLETE if (val < 0)
-// OBSOLETE error ("\"%s\": error reading debugging symbol tables\n", name);
-// OBSOLETE
-// OBSOLETE init_minimal_symbol_collection ();
-// OBSOLETE make_cleanup_discard_minimal_symbols ();
-// OBSOLETE
-// OBSOLETE /* Now that the executable file is positioned at symbol table,
-// OBSOLETE process it and define symbols accordingly. */
-// OBSOLETE
-// OBSOLETE read_dst_symtab (objfile);
-// OBSOLETE
-// OBSOLETE /* Sort symbols alphabetically within each block. */
-// OBSOLETE
-// OBSOLETE {
-// OBSOLETE struct symtab *s;
-// OBSOLETE for (s = objfile->symtabs; s != NULL; s = s->next)
-// OBSOLETE {
-// OBSOLETE sort_symtab_syms (s);
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Install any minimal symbols that have been collected as the current
-// OBSOLETE minimal symbols for this objfile. */
-// OBSOLETE
-// OBSOLETE install_minimal_symbols (objfile);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE static void
-// OBSOLETE dst_new_init (struct objfile *ignore)
-// OBSOLETE {
-// OBSOLETE /* Nothin' to do */
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Perform any local cleanups required when we are done with a particular
-// OBSOLETE objfile. I.E, we are in the process of discarding all symbol information
-// OBSOLETE for an objfile, freeing up all memory held for it, and unlinking the
-// OBSOLETE objfile struct from the global list of known objfiles. */
-// OBSOLETE
-// OBSOLETE static void
-// OBSOLETE dst_symfile_finish (struct objfile *objfile)
-// OBSOLETE {
-// OBSOLETE /* Nothing to do */
-// OBSOLETE }
-// OBSOLETE \f
-// OBSOLETE
-// OBSOLETE /* Get the next line number from the DST. Returns 0 when we hit an
-// OBSOLETE * end directive or cannot continue for any other reason.
-// OBSOLETE *
-// OBSOLETE * Note that ordinary pc deltas are multiplied by two. Apparently
-// OBSOLETE * this is what was really intended.
-// OBSOLETE */
-// OBSOLETE static int
-// OBSOLETE get_dst_line (signed char **buffer, long *pc)
-// OBSOLETE {
-// OBSOLETE static last_pc = 0;
-// OBSOLETE static long last_line = 0;
-// OBSOLETE static int last_file = 0;
-// OBSOLETE dst_ln_entry_ptr_t entry;
-// OBSOLETE int size;
-// OBSOLETE dst_src_loc_t *src_loc;
-// OBSOLETE
-// OBSOLETE if (*pc != -1)
-// OBSOLETE {
-// OBSOLETE last_pc = *pc;
-// OBSOLETE *pc = -1;
-// OBSOLETE }
-// OBSOLETE entry = (dst_ln_entry_ptr_t) * buffer;
-// OBSOLETE
-// OBSOLETE while (dst_ln_ln_delta (*entry) == dst_ln_escape_flag)
-// OBSOLETE {
-// OBSOLETE switch (entry->esc.esc_code)
-// OBSOLETE {
-// OBSOLETE case dst_ln_pad:
-// OBSOLETE size = 1; /* pad byte */
-// OBSOLETE break;
-// OBSOLETE case dst_ln_file:
-// OBSOLETE /* file escape. Next 4 bytes are a dst_src_loc_t */
-// OBSOLETE size = 5;
-// OBSOLETE src_loc = (dst_src_loc_t *) (*buffer + 1);
-// OBSOLETE last_line = src_loc->line_number;
-// OBSOLETE last_file = src_loc->file_index;
-// OBSOLETE break;
-// OBSOLETE case dst_ln_dln1_dpc1:
-// OBSOLETE /* 1 byte line delta, 1 byte pc delta */
-// OBSOLETE last_line += (*buffer)[1];
-// OBSOLETE last_pc += 2 * (unsigned char) (*buffer)[2];
-// OBSOLETE dst_record_line (last_line, last_pc);
-// OBSOLETE size = 3;
-// OBSOLETE break;
-// OBSOLETE case dst_ln_dln2_dpc2:
-// OBSOLETE /* 2 bytes line delta, 2 bytes pc delta */
-// OBSOLETE last_line += *(short *) (*buffer + 1);
-// OBSOLETE last_pc += 2 * (*(short *) (*buffer + 3));
-// OBSOLETE size = 5;
-// OBSOLETE dst_record_line (last_line, last_pc);
-// OBSOLETE break;
-// OBSOLETE case dst_ln_ln4_pc4:
-// OBSOLETE /* 4 bytes ABSOLUTE line number, 4 bytes ABSOLUTE pc */
-// OBSOLETE last_line = *(unsigned long *) (*buffer + 1);
-// OBSOLETE last_pc = *(unsigned long *) (*buffer + 5);
-// OBSOLETE size = 9;
-// OBSOLETE dst_record_line (last_line, last_pc);
-// OBSOLETE break;
-// OBSOLETE case dst_ln_dln1_dpc0:
-// OBSOLETE /* 1 byte line delta, pc delta = 0 */
-// OBSOLETE size = 2;
-// OBSOLETE last_line += (*buffer)[1];
-// OBSOLETE break;
-// OBSOLETE case dst_ln_ln_off_1:
-// OBSOLETE /* statement escape, stmt # = 1 (2nd stmt on line) */
-// OBSOLETE size = 1;
-// OBSOLETE break;
-// OBSOLETE case dst_ln_ln_off:
-// OBSOLETE /* statement escape, stmt # = next byte */
-// OBSOLETE size = 2;
-// OBSOLETE break;
-// OBSOLETE case dst_ln_entry:
-// OBSOLETE /* entry escape, next byte is entry number */
-// OBSOLETE size = 2;
-// OBSOLETE break;
-// OBSOLETE case dst_ln_exit:
-// OBSOLETE /* exit escape */
-// OBSOLETE size = 1;
-// OBSOLETE break;
-// OBSOLETE case dst_ln_stmt_end:
-// OBSOLETE /* gap escape, 4 bytes pc delta */
-// OBSOLETE size = 5;
-// OBSOLETE /* last_pc += 2 * (*(long *) (*buffer + 1)); */
-// OBSOLETE /* Apparently this isn't supposed to actually modify
-// OBSOLETE * the pc value. Totally weird.
-// OBSOLETE */
-// OBSOLETE break;
-// OBSOLETE case dst_ln_escape_11:
-// OBSOLETE case dst_ln_escape_12:
-// OBSOLETE case dst_ln_escape_13:
-// OBSOLETE size = 1;
-// OBSOLETE break;
-// OBSOLETE case dst_ln_nxt_byte:
-// OBSOLETE /* This shouldn't happen. If it does, we're SOL */
-// OBSOLETE return 0;
-// OBSOLETE break;
-// OBSOLETE case dst_ln_end:
-// OBSOLETE /* end escape, final entry follows */
-// OBSOLETE return 0;
-// OBSOLETE }
-// OBSOLETE *buffer += (size < 0) ? -size : size;
-// OBSOLETE entry = (dst_ln_entry_ptr_t) * buffer;
-// OBSOLETE }
-// OBSOLETE last_line += dst_ln_ln_delta (*entry);
-// OBSOLETE last_pc += entry->delta.pc_delta * 2;
-// OBSOLETE (*buffer)++;
-// OBSOLETE dst_record_line (last_line, last_pc);
-// OBSOLETE return 1;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE static void
-// OBSOLETE enter_all_lines (char *buffer, long address)
-// OBSOLETE {
-// OBSOLETE if (buffer)
-// OBSOLETE while (get_dst_line (&buffer, &address));
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE static int
-// OBSOLETE get_dst_entry (char *buffer, dst_rec_ptr_t *ret_entry)
-// OBSOLETE {
-// OBSOLETE int size;
-// OBSOLETE dst_rec_ptr_t entry;
-// OBSOLETE static int last_type;
-// OBSOLETE int ar_size;
-// OBSOLETE static unsigned lu3;
-// OBSOLETE
-// OBSOLETE entry = (dst_rec_ptr_t) buffer;
-// OBSOLETE switch (entry->rec_type)
-// OBSOLETE {
-// OBSOLETE case dst_typ_pad:
-// OBSOLETE size = 0;
-// OBSOLETE break;
-// OBSOLETE case dst_typ_comp_unit:
-// OBSOLETE size = sizeof (DST_comp_unit (entry));
-// OBSOLETE break;
-// OBSOLETE case dst_typ_section_tab:
-// OBSOLETE size = sizeof (DST_section_tab (entry))
-// OBSOLETE + ((int) DST_section_tab (entry).number_of_sections
-// OBSOLETE - dst_dummy_array_size) * sizeof (long);
-// OBSOLETE break;
-// OBSOLETE case dst_typ_file_tab:
-// OBSOLETE size = sizeof (DST_file_tab (entry))
-// OBSOLETE + ((int) DST_file_tab (entry).number_of_files
-// OBSOLETE - dst_dummy_array_size) * sizeof (dst_file_desc_t);
-// OBSOLETE break;
-// OBSOLETE case dst_typ_block:
-// OBSOLETE size = sizeof (DST_block (entry))
-// OBSOLETE + ((int) DST_block (entry).n_of_code_ranges
-// OBSOLETE - dst_dummy_array_size) * sizeof (dst_code_range_t);
-// OBSOLETE break;
-// OBSOLETE case dst_typ_5:
-// OBSOLETE size = -1;
-// OBSOLETE break;
-// OBSOLETE case dst_typ_var:
-// OBSOLETE size = sizeof (DST_var (entry)) -
-// OBSOLETE sizeof (dst_var_loc_long_t) * dst_dummy_array_size +
-// OBSOLETE DST_var (entry).no_of_locs *
-// OBSOLETE (DST_var (entry).short_locs ?
-// OBSOLETE sizeof (dst_var_loc_short_t) :
-// OBSOLETE sizeof (dst_var_loc_long_t));
-// OBSOLETE break;
-// OBSOLETE case dst_typ_pointer:
-// OBSOLETE size = sizeof (DST_pointer (entry));
-// OBSOLETE break;
-// OBSOLETE case dst_typ_array:
-// OBSOLETE size = sizeof (DST_array (entry));
-// OBSOLETE break;
-// OBSOLETE case dst_typ_subrange:
-// OBSOLETE size = sizeof (DST_subrange (entry));
-// OBSOLETE break;
-// OBSOLETE case dst_typ_set:
-// OBSOLETE size = sizeof (DST_set (entry));
-// OBSOLETE break;
-// OBSOLETE case dst_typ_implicit_enum:
-// OBSOLETE size = sizeof (DST_implicit_enum (entry))
-// OBSOLETE + ((int) DST_implicit_enum (entry).nelems
-// OBSOLETE - dst_dummy_array_size) * sizeof (dst_rel_offset_t);
-// OBSOLETE break;
-// OBSOLETE case dst_typ_explicit_enum:
-// OBSOLETE size = sizeof (DST_explicit_enum (entry))
-// OBSOLETE + ((int) DST_explicit_enum (entry).nelems
-// OBSOLETE - dst_dummy_array_size) * sizeof (dst_enum_elem_t);
-// OBSOLETE break;
-// OBSOLETE case dst_typ_short_rec:
-// OBSOLETE size = sizeof (DST_short_rec (entry))
-// OBSOLETE + DST_short_rec (entry).nfields * sizeof (dst_short_field_t)
-// OBSOLETE - dst_dummy_array_size * sizeof (dst_field_t);
-// OBSOLETE break;
-// OBSOLETE case dst_typ_short_union:
-// OBSOLETE size = sizeof (DST_short_union (entry))
-// OBSOLETE + DST_short_union (entry).nfields * sizeof (dst_short_field_t)
-// OBSOLETE - dst_dummy_array_size * sizeof (dst_field_t);
-// OBSOLETE break;
-// OBSOLETE case dst_typ_file:
-// OBSOLETE size = sizeof (DST_file (entry));
-// OBSOLETE break;
-// OBSOLETE case dst_typ_offset:
-// OBSOLETE size = sizeof (DST_offset (entry));
-// OBSOLETE break;
-// OBSOLETE case dst_typ_alias:
-// OBSOLETE size = sizeof (DST_alias (entry));
-// OBSOLETE break;
-// OBSOLETE case dst_typ_signature:
-// OBSOLETE size = sizeof (DST_signature (entry)) +
-// OBSOLETE ((int) DST_signature (entry).nargs -
-// OBSOLETE dst_dummy_array_size) * sizeof (dst_arg_t);
-// OBSOLETE break;
-// OBSOLETE case dst_typ_21:
-// OBSOLETE size = -1;
-// OBSOLETE break;
-// OBSOLETE case dst_typ_old_label:
-// OBSOLETE size = sizeof (DST_old_label (entry));
-// OBSOLETE break;
-// OBSOLETE case dst_typ_scope:
-// OBSOLETE size = sizeof (DST_scope (entry));
-// OBSOLETE break;
-// OBSOLETE case dst_typ_end_scope:
-// OBSOLETE size = 0;
-// OBSOLETE break;
-// OBSOLETE case dst_typ_25:
-// OBSOLETE case dst_typ_26:
-// OBSOLETE size = -1;
-// OBSOLETE break;
-// OBSOLETE case dst_typ_string_tab:
-// OBSOLETE case dst_typ_global_name_tab:
-// OBSOLETE size = sizeof (DST_string_tab (entry))
-// OBSOLETE + DST_string_tab (entry).length
-// OBSOLETE - dst_dummy_array_size;
-// OBSOLETE break;
-// OBSOLETE case dst_typ_forward:
-// OBSOLETE size = sizeof (DST_forward (entry));
-// OBSOLETE get_dst_entry ((char *) entry + DST_forward (entry).rec_off, &entry);
-// OBSOLETE break;
-// OBSOLETE case dst_typ_aux_size:
-// OBSOLETE size = sizeof (DST_aux_size (entry));
-// OBSOLETE break;
-// OBSOLETE case dst_typ_aux_align:
-// OBSOLETE size = sizeof (DST_aux_align (entry));
-// OBSOLETE break;
-// OBSOLETE case dst_typ_aux_field_size:
-// OBSOLETE size = sizeof (DST_aux_field_size (entry));
-// OBSOLETE break;
-// OBSOLETE case dst_typ_aux_field_off:
-// OBSOLETE size = sizeof (DST_aux_field_off (entry));
-// OBSOLETE break;
-// OBSOLETE case dst_typ_aux_field_align:
-// OBSOLETE size = sizeof (DST_aux_field_align (entry));
-// OBSOLETE break;
-// OBSOLETE case dst_typ_aux_qual:
-// OBSOLETE size = sizeof (DST_aux_qual (entry));
-// OBSOLETE break;
-// OBSOLETE case dst_typ_aux_var_bound:
-// OBSOLETE size = sizeof (DST_aux_var_bound (entry));
-// OBSOLETE break;
-// OBSOLETE case dst_typ_extension:
-// OBSOLETE size = DST_extension (entry).rec_size;
-// OBSOLETE break;
-// OBSOLETE case dst_typ_string:
-// OBSOLETE size = sizeof (DST_string (entry));
-// OBSOLETE break;
-// OBSOLETE case dst_typ_old_entry:
-// OBSOLETE size = 48; /* Obsolete entry type */
-// OBSOLETE break;
-// OBSOLETE case dst_typ_const:
-// OBSOLETE size = sizeof (DST_const (entry))
-// OBSOLETE + DST_const (entry).value.length
-// OBSOLETE - sizeof (DST_const (entry).value.val);
-// OBSOLETE break;
-// OBSOLETE case dst_typ_reference:
-// OBSOLETE size = sizeof (DST_reference (entry));
-// OBSOLETE break;
-// OBSOLETE case dst_typ_old_record:
-// OBSOLETE case dst_typ_old_union:
-// OBSOLETE case dst_typ_record:
-// OBSOLETE case dst_typ_union:
-// OBSOLETE size = sizeof (DST_record (entry))
-// OBSOLETE + ((int) DST_record (entry).nfields
-// OBSOLETE - dst_dummy_array_size) * sizeof (dst_field_t);
-// OBSOLETE break;
-// OBSOLETE case dst_typ_aux_type_deriv:
-// OBSOLETE size = sizeof (DST_aux_type_deriv (entry));
-// OBSOLETE break;
-// OBSOLETE case dst_typ_locpool:
-// OBSOLETE size = sizeof (DST_locpool (entry))
-// OBSOLETE + ((int) DST_locpool (entry).length -
-// OBSOLETE dst_dummy_array_size);
-// OBSOLETE break;
-// OBSOLETE case dst_typ_variable:
-// OBSOLETE size = sizeof (DST_variable (entry));
-// OBSOLETE break;
-// OBSOLETE case dst_typ_label:
-// OBSOLETE size = sizeof (DST_label (entry));
-// OBSOLETE break;
-// OBSOLETE case dst_typ_entry:
-// OBSOLETE size = sizeof (DST_entry (entry));
-// OBSOLETE break;
-// OBSOLETE case dst_typ_aux_lifetime:
-// OBSOLETE size = sizeof (DST_aux_lifetime (entry));
-// OBSOLETE break;
-// OBSOLETE case dst_typ_aux_ptr_base:
-// OBSOLETE size = sizeof (DST_aux_ptr_base (entry));
-// OBSOLETE break;
-// OBSOLETE case dst_typ_aux_src_range:
-// OBSOLETE size = sizeof (DST_aux_src_range (entry));
-// OBSOLETE break;
-// OBSOLETE case dst_typ_aux_reg_val:
-// OBSOLETE size = sizeof (DST_aux_reg_val (entry));
-// OBSOLETE break;
-// OBSOLETE case dst_typ_aux_unit_names:
-// OBSOLETE size = sizeof (DST_aux_unit_names (entry))
-// OBSOLETE + ((int) DST_aux_unit_names (entry).number_of_names
-// OBSOLETE - dst_dummy_array_size) * sizeof (dst_rel_offset_t);
-// OBSOLETE break;
-// OBSOLETE case dst_typ_aux_sect_info:
-// OBSOLETE size = sizeof (DST_aux_sect_info (entry))
-// OBSOLETE + ((int) DST_aux_sect_info (entry).number_of_refs
-// OBSOLETE - dst_dummy_array_size) * sizeof (dst_sect_ref_t);
-// OBSOLETE break;
-// OBSOLETE default:
-// OBSOLETE size = -1;
-// OBSOLETE break;
-// OBSOLETE }
-// OBSOLETE if (size == -1)
-// OBSOLETE {
-// OBSOLETE fprintf_unfiltered (gdb_stderr, "Warning: unexpected DST entry type (%d) found\nLast valid entry was of type: %d\n",
-// OBSOLETE (int) entry->rec_type,
-// OBSOLETE last_type);
-// OBSOLETE fprintf_unfiltered (gdb_stderr, "Last unknown_3 value: %d\n", lu3);
-// OBSOLETE size = 0;
-// OBSOLETE }
-// OBSOLETE else
-// OBSOLETE last_type = entry->rec_type;
-// OBSOLETE if (size & 1) /* Align on a word boundary */
-// OBSOLETE size++;
-// OBSOLETE size += 2;
-// OBSOLETE *ret_entry = entry;
-// OBSOLETE return size;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE static int
-// OBSOLETE next_dst_entry (char **buffer, dst_rec_ptr_t *entry, dst_sec *table)
-// OBSOLETE {
-// OBSOLETE if (*buffer - table->buffer >= table->size)
-// OBSOLETE {
-// OBSOLETE *entry = NULL;
-// OBSOLETE return 0;
-// OBSOLETE }
-// OBSOLETE *buffer += get_dst_entry (*buffer, entry);
-// OBSOLETE return 1;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE #define NEXT_BLK(a, b) next_dst_entry(a, b, &blocks_info)
-// OBSOLETE #define NEXT_SYM(a, b) next_dst_entry(a, b, &symbols_info)
-// OBSOLETE #define DST_OFFSET(a, b) ((char *) (a) + (b))
-// OBSOLETE
-// OBSOLETE static dst_rec_ptr_t section_table = NULL;
-// OBSOLETE
-// OBSOLETE char *
-// OBSOLETE get_sec_ref (dst_sect_ref_t *ref)
-// OBSOLETE {
-// OBSOLETE dst_sec *section = NULL;
-// OBSOLETE long offset;
-// OBSOLETE
-// OBSOLETE if (!section_table || !ref->sect_index)
-// OBSOLETE return NULL;
-// OBSOLETE offset = DST_section_tab (section_table).section_base[ref->sect_index - 1]
-// OBSOLETE + ref->sect_offset;
-// OBSOLETE if (offset >= blocks_info.base &&
-// OBSOLETE offset < blocks_info.base + blocks_info.size)
-// OBSOLETE section = &blocks_info;
-// OBSOLETE else if (offset >= symbols_info.base &&
-// OBSOLETE offset < symbols_info.base + symbols_info.size)
-// OBSOLETE section = &symbols_info;
-// OBSOLETE else if (offset >= lines_info.base &&
-// OBSOLETE offset < lines_info.base + lines_info.size)
-// OBSOLETE section = &lines_info;
-// OBSOLETE if (!section)
-// OBSOLETE return NULL;
-// OBSOLETE return section->buffer + (offset - section->base);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE CORE_ADDR
-// OBSOLETE dst_get_addr (int section, long offset)
-// OBSOLETE {
-// OBSOLETE if (!section_table || !section)
-// OBSOLETE return 0;
-// OBSOLETE return DST_section_tab (section_table).section_base[section - 1] + offset;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE CORE_ADDR
-// OBSOLETE dst_sym_addr (dst_sect_ref_t *ref)
-// OBSOLETE {
-// OBSOLETE if (!section_table || !ref->sect_index)
-// OBSOLETE return 0;
-// OBSOLETE return DST_section_tab (section_table).section_base[ref->sect_index - 1]
-// OBSOLETE + ref->sect_offset;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE static struct symbol *
-// OBSOLETE create_new_symbol (struct objfile *objfile, char *name)
-// OBSOLETE {
-// OBSOLETE struct symbol *sym = (struct symbol *)
-// OBSOLETE obstack_alloc (&objfile->symbol_obstack, sizeof (struct symbol));
-// OBSOLETE memset (sym, 0, sizeof (struct symbol));
-// OBSOLETE SYMBOL_NAME (sym) = obsavestring (name, strlen (name),
-// OBSOLETE &objfile->symbol_obstack);
-// OBSOLETE SYMBOL_VALUE (sym) = 0;
-// OBSOLETE SYMBOL_NAMESPACE (sym) = VAR_NAMESPACE;
-// OBSOLETE
-// OBSOLETE SYMBOL_CLASS (sym) = LOC_BLOCK;
-// OBSOLETE return sym;
-// OBSOLETE };
-// OBSOLETE
-// OBSOLETE static struct type *decode_dst_type (struct objfile *, dst_rec_ptr_t);
-// OBSOLETE
-// OBSOLETE static struct type *
-// OBSOLETE decode_type_desc (struct objfile *objfile, dst_type_t *type_desc,
-// OBSOLETE dst_rec_ptr_t base)
-// OBSOLETE {
-// OBSOLETE struct type *type;
-// OBSOLETE dst_rec_ptr_t entry;
-// OBSOLETE if (type_desc->std_type.user_defined_type)
-// OBSOLETE {
-// OBSOLETE entry = (dst_rec_ptr_t) DST_OFFSET (base,
-// OBSOLETE dst_user_type_offset (*type_desc));
-// OBSOLETE type = decode_dst_type (objfile, entry);
-// OBSOLETE }
-// OBSOLETE else
-// OBSOLETE {
-// OBSOLETE switch (type_desc->std_type.dtc)
-// OBSOLETE {
-// OBSOLETE case dst_int8_type:
-// OBSOLETE type = builtin_type_signed_char;
-// OBSOLETE break;
-// OBSOLETE case dst_int16_type:
-// OBSOLETE type = builtin_type_short;
-// OBSOLETE break;
-// OBSOLETE case dst_int32_type:
-// OBSOLETE type = builtin_type_long;
-// OBSOLETE break;
-// OBSOLETE case dst_uint8_type:
-// OBSOLETE type = builtin_type_unsigned_char;
-// OBSOLETE break;
-// OBSOLETE case dst_uint16_type:
-// OBSOLETE type = builtin_type_unsigned_short;
-// OBSOLETE break;
-// OBSOLETE case dst_uint32_type:
-// OBSOLETE type = builtin_type_unsigned_long;
-// OBSOLETE break;
-// OBSOLETE case dst_real32_type:
-// OBSOLETE type = builtin_type_float;
-// OBSOLETE break;
-// OBSOLETE case dst_real64_type:
-// OBSOLETE type = builtin_type_double;
-// OBSOLETE break;
-// OBSOLETE case dst_complex_type:
-// OBSOLETE type = builtin_type_complex;
-// OBSOLETE break;
-// OBSOLETE case dst_dcomplex_type:
-// OBSOLETE type = builtin_type_double_complex;
-// OBSOLETE break;
-// OBSOLETE case dst_bool8_type:
-// OBSOLETE type = builtin_type_char;
-// OBSOLETE break;
-// OBSOLETE case dst_bool16_type:
-// OBSOLETE type = builtin_type_short;
-// OBSOLETE break;
-// OBSOLETE case dst_bool32_type:
-// OBSOLETE type = builtin_type_long;
-// OBSOLETE break;
-// OBSOLETE case dst_char_type:
-// OBSOLETE type = builtin_type_char;
-// OBSOLETE break;
-// OBSOLETE /* The next few are more complex. I will take care
-// OBSOLETE * of them properly at a later point.
-// OBSOLETE */
-// OBSOLETE case dst_string_type:
-// OBSOLETE type = builtin_type_void;
-// OBSOLETE break;
-// OBSOLETE case dst_ptr_type:
-// OBSOLETE type = builtin_type_void;
-// OBSOLETE break;
-// OBSOLETE case dst_set_type:
-// OBSOLETE type = builtin_type_void;
-// OBSOLETE break;
-// OBSOLETE case dst_proc_type:
-// OBSOLETE type = builtin_type_void;
-// OBSOLETE break;
-// OBSOLETE case dst_func_type:
-// OBSOLETE type = builtin_type_void;
-// OBSOLETE break;
-// OBSOLETE /* Back tto some ordinary ones */
-// OBSOLETE case dst_void_type:
-// OBSOLETE type = builtin_type_void;
-// OBSOLETE break;
-// OBSOLETE case dst_uchar_type:
-// OBSOLETE type = builtin_type_unsigned_char;
-// OBSOLETE break;
-// OBSOLETE default:
-// OBSOLETE type = builtin_type_void;
-// OBSOLETE break;
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE return type;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE struct structure_list
-// OBSOLETE {
-// OBSOLETE struct structure_list *next;
-// OBSOLETE struct type *type;
-// OBSOLETE };
-// OBSOLETE
-// OBSOLETE static struct structure_list *struct_list = NULL;
-// OBSOLETE
-// OBSOLETE static struct type *
-// OBSOLETE find_dst_structure (char *name)
-// OBSOLETE {
-// OBSOLETE struct structure_list *element;
-// OBSOLETE
-// OBSOLETE for (element = struct_list; element; element = element->next)
-// OBSOLETE if (!strcmp (name, TYPE_NAME (element->type)))
-// OBSOLETE return element->type;
-// OBSOLETE return NULL;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE static struct type *
-// OBSOLETE decode_dst_structure (struct objfile *objfile, dst_rec_ptr_t entry, int code,
-// OBSOLETE int version)
-// OBSOLETE {
-// OBSOLETE struct type *type, *child_type;
-// OBSOLETE char *struct_name;
-// OBSOLETE char *name, *field_name;
-// OBSOLETE int i;
-// OBSOLETE int fieldoffset, fieldsize;
-// OBSOLETE dst_type_t type_desc;
-// OBSOLETE struct structure_list *element;
-// OBSOLETE
-// OBSOLETE struct_name = DST_OFFSET (entry, DST_record (entry).noffset);
-// OBSOLETE name = concat ((code == TYPE_CODE_UNION) ? "union " : "struct ",
-// OBSOLETE struct_name, NULL);
-// OBSOLETE type = find_dst_structure (name);
-// OBSOLETE if (type)
-// OBSOLETE {
-// OBSOLETE xfree (name);
-// OBSOLETE return type;
-// OBSOLETE }
-// OBSOLETE type = alloc_type (objfile);
-// OBSOLETE TYPE_NAME (type) = obstack_copy0 (&objfile->symbol_obstack,
-// OBSOLETE name, strlen (name));
-// OBSOLETE xfree (name);
-// OBSOLETE TYPE_CODE (type) = code;
-// OBSOLETE TYPE_LENGTH (type) = DST_record (entry).size;
-// OBSOLETE TYPE_NFIELDS (type) = DST_record (entry).nfields;
-// OBSOLETE TYPE_FIELDS (type) = (struct field *)
-// OBSOLETE obstack_alloc (&objfile->symbol_obstack, sizeof (struct field) *
-// OBSOLETE DST_record (entry).nfields);
-// OBSOLETE fieldoffset = fieldsize = 0;
-// OBSOLETE INIT_CPLUS_SPECIFIC (type);
-// OBSOLETE element = (struct structure_list *)
-// OBSOLETE xmalloc (sizeof (struct structure_list));
-// OBSOLETE element->type = type;
-// OBSOLETE element->next = struct_list;
-// OBSOLETE struct_list = element;
-// OBSOLETE for (i = 0; i < DST_record (entry).nfields; i++)
-// OBSOLETE {
-// OBSOLETE switch (version)
-// OBSOLETE {
-// OBSOLETE case 2:
-// OBSOLETE field_name = DST_OFFSET (entry,
-// OBSOLETE DST_record (entry).f.ofields[i].noffset);
-// OBSOLETE fieldoffset = DST_record (entry).f.ofields[i].foffset * 8 +
-// OBSOLETE DST_record (entry).f.ofields[i].bit_offset;
-// OBSOLETE fieldsize = DST_record (entry).f.ofields[i].size;
-// OBSOLETE type_desc = DST_record (entry).f.ofields[i].type_desc;
-// OBSOLETE break;
-// OBSOLETE case 1:
-// OBSOLETE field_name = DST_OFFSET (entry,
-// OBSOLETE DST_record (entry).f.fields[i].noffset);
-// OBSOLETE type_desc = DST_record (entry).f.fields[i].type_desc;
-// OBSOLETE switch (DST_record (entry).f.fields[i].f.field_loc.format_tag)
-// OBSOLETE {
-// OBSOLETE case dst_field_byte:
-// OBSOLETE fieldoffset = DST_record (entry).f.
-// OBSOLETE fields[i].f.field_byte.offset * 8;
-// OBSOLETE fieldsize = -1;
-// OBSOLETE break;
-// OBSOLETE case dst_field_bit:
-// OBSOLETE fieldoffset = DST_record (entry).f.
-// OBSOLETE fields[i].f.field_bit.byte_offset * 8 +
-// OBSOLETE DST_record (entry).f.
-// OBSOLETE fields[i].f.field_bit.bit_offset;
-// OBSOLETE fieldsize = DST_record (entry).f.
-// OBSOLETE fields[i].f.field_bit.nbits;
-// OBSOLETE break;
-// OBSOLETE case dst_field_loc:
-// OBSOLETE fieldoffset += fieldsize;
-// OBSOLETE fieldsize = -1;
-// OBSOLETE break;
-// OBSOLETE }
-// OBSOLETE break;
-// OBSOLETE case 0:
-// OBSOLETE field_name = DST_OFFSET (entry,
-// OBSOLETE DST_record (entry).f.sfields[i].noffset);
-// OBSOLETE fieldoffset = DST_record (entry).f.sfields[i].foffset;
-// OBSOLETE type_desc = DST_record (entry).f.sfields[i].type_desc;
-// OBSOLETE if (i < DST_record (entry).nfields - 1)
-// OBSOLETE fieldsize = DST_record (entry).f.sfields[i + 1].foffset;
-// OBSOLETE else
-// OBSOLETE fieldsize = DST_record (entry).size;
-// OBSOLETE fieldsize -= fieldoffset;
-// OBSOLETE fieldoffset *= 8;
-// OBSOLETE fieldsize *= 8;
-// OBSOLETE }
-// OBSOLETE TYPE_FIELDS (type)[i].name =
-// OBSOLETE obstack_copy0 (&objfile->symbol_obstack,
-// OBSOLETE field_name, strlen (field_name));
-// OBSOLETE TYPE_FIELDS (type)[i].type = decode_type_desc (objfile,
-// OBSOLETE &type_desc,
-// OBSOLETE entry);
-// OBSOLETE if (fieldsize == -1)
-// OBSOLETE fieldsize = TYPE_LENGTH (TYPE_FIELDS (type)[i].type) *
-// OBSOLETE 8;
-// OBSOLETE TYPE_FIELDS (type)[i].bitsize = fieldsize;
-// OBSOLETE TYPE_FIELDS (type)[i].bitpos = fieldoffset;
-// OBSOLETE }
-// OBSOLETE return type;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE static struct type *
-// OBSOLETE decode_dst_type (struct objfile *objfile, dst_rec_ptr_t entry)
-// OBSOLETE {
-// OBSOLETE struct type *child_type, *type, *range_type, *index_type;
-// OBSOLETE
-// OBSOLETE switch (entry->rec_type)
-// OBSOLETE {
-// OBSOLETE case dst_typ_var:
-// OBSOLETE return decode_type_desc (objfile,
-// OBSOLETE &DST_var (entry).type_desc,
-// OBSOLETE entry);
-// OBSOLETE break;
-// OBSOLETE case dst_typ_variable:
-// OBSOLETE return decode_type_desc (objfile,
-// OBSOLETE &DST_variable (entry).type_desc,
-// OBSOLETE entry);
-// OBSOLETE break;
-// OBSOLETE case dst_typ_short_rec:
-// OBSOLETE return decode_dst_structure (objfile, entry, TYPE_CODE_STRUCT, 0);
-// OBSOLETE case dst_typ_short_union:
-// OBSOLETE return decode_dst_structure (objfile, entry, TYPE_CODE_UNION, 0);
-// OBSOLETE case dst_typ_union:
-// OBSOLETE return decode_dst_structure (objfile, entry, TYPE_CODE_UNION, 1);
-// OBSOLETE case dst_typ_record:
-// OBSOLETE return decode_dst_structure (objfile, entry, TYPE_CODE_STRUCT, 1);
-// OBSOLETE case dst_typ_old_union:
-// OBSOLETE return decode_dst_structure (objfile, entry, TYPE_CODE_UNION, 2);
-// OBSOLETE case dst_typ_old_record:
-// OBSOLETE return decode_dst_structure (objfile, entry, TYPE_CODE_STRUCT, 2);
-// OBSOLETE case dst_typ_pointer:
-// OBSOLETE return make_pointer_type (
-// OBSOLETE decode_type_desc (objfile,
-// OBSOLETE &DST_pointer (entry).type_desc,
-// OBSOLETE entry),
-// OBSOLETE NULL);
-// OBSOLETE case dst_typ_array:
-// OBSOLETE child_type = decode_type_desc (objfile,
-// OBSOLETE &DST_pointer (entry).type_desc,
-// OBSOLETE entry);
-// OBSOLETE index_type = lookup_fundamental_type (objfile,
-// OBSOLETE FT_INTEGER);
-// OBSOLETE range_type = create_range_type ((struct type *) NULL,
-// OBSOLETE index_type, DST_array (entry).lo_bound,
-// OBSOLETE DST_array (entry).hi_bound);
-// OBSOLETE return create_array_type ((struct type *) NULL, child_type,
-// OBSOLETE range_type);
-// OBSOLETE case dst_typ_alias:
-// OBSOLETE return decode_type_desc (objfile,
-// OBSOLETE &DST_alias (entry).type_desc,
-// OBSOLETE entry);
-// OBSOLETE default:
-// OBSOLETE return builtin_type_int;
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE struct symbol_list
-// OBSOLETE {
-// OBSOLETE struct symbol_list *next;
-// OBSOLETE struct symbol *symbol;
-// OBSOLETE };
-// OBSOLETE
-// OBSOLETE static struct symbol_list *dst_global_symbols = NULL;
-// OBSOLETE static int total_globals = 0;
-// OBSOLETE
-// OBSOLETE static void
-// OBSOLETE decode_dst_locstring (char *locstr, struct symbol *sym)
-// OBSOLETE {
-// OBSOLETE dst_loc_entry_t *entry, *next_entry;
-// OBSOLETE CORE_ADDR temp;
-// OBSOLETE int count = 0;
-// OBSOLETE
-// OBSOLETE while (1)
-// OBSOLETE {
-// OBSOLETE if (count++ == 100)
-// OBSOLETE {
-// OBSOLETE fprintf_unfiltered (gdb_stderr, "Error reading locstring\n");
-// OBSOLETE break;
-// OBSOLETE }
-// OBSOLETE entry = (dst_loc_entry_t *) locstr;
-// OBSOLETE next_entry = (dst_loc_entry_t *) (locstr + 1);
-// OBSOLETE switch (entry->header.code)
-// OBSOLETE {
-// OBSOLETE case dst_lsc_end: /* End of string */
-// OBSOLETE return;
-// OBSOLETE case dst_lsc_indirect: /* Indirect through previous. Arg == 6 */
-// OBSOLETE /* Or register ax x == arg */
-// OBSOLETE if (entry->header.arg < 6)
-// OBSOLETE {
-// OBSOLETE SYMBOL_CLASS (sym) = LOC_REGISTER;
-// OBSOLETE SYMBOL_VALUE (sym) = entry->header.arg + 8;
-// OBSOLETE }
-// OBSOLETE /* We predict indirects */
-// OBSOLETE locstr++;
-// OBSOLETE break;
-// OBSOLETE case dst_lsc_dreg:
-// OBSOLETE SYMBOL_CLASS (sym) = LOC_REGISTER;
-// OBSOLETE SYMBOL_VALUE (sym) = entry->header.arg;
-// OBSOLETE locstr++;
-// OBSOLETE break;
-// OBSOLETE case dst_lsc_section: /* Section (arg+1) */
-// OBSOLETE SYMBOL_VALUE (sym) = dst_get_addr (entry->header.arg + 1, 0);
-// OBSOLETE locstr++;
-// OBSOLETE break;
-// OBSOLETE case dst_lsc_sec_byte: /* Section (next_byte+1) */
-// OBSOLETE SYMBOL_VALUE (sym) = dst_get_addr (locstr[1] + 1, 0);
-// OBSOLETE locstr += 2;
-// OBSOLETE break;
-// OBSOLETE case dst_lsc_add: /* Add (arg+1)*2 */
-// OBSOLETE case dst_lsc_sub: /* Subtract (arg+1)*2 */
-// OBSOLETE temp = (entry->header.arg + 1) * 2;
-// OBSOLETE locstr++;
-// OBSOLETE if (*locstr == dst_multiply_256)
-// OBSOLETE {
-// OBSOLETE temp <<= 8;
-// OBSOLETE locstr++;
-// OBSOLETE }
-// OBSOLETE switch (entry->header.code)
-// OBSOLETE {
-// OBSOLETE case dst_lsc_add:
-// OBSOLETE if (SYMBOL_CLASS (sym) == LOC_LOCAL)
-// OBSOLETE SYMBOL_CLASS (sym) = LOC_ARG;
-// OBSOLETE SYMBOL_VALUE (sym) += temp;
-// OBSOLETE break;
-// OBSOLETE case dst_lsc_sub:
-// OBSOLETE SYMBOL_VALUE (sym) -= temp;
-// OBSOLETE break;
-// OBSOLETE }
-// OBSOLETE break;
-// OBSOLETE case dst_lsc_add_byte:
-// OBSOLETE case dst_lsc_sub_byte:
-// OBSOLETE switch (entry->header.arg & 0x03)
-// OBSOLETE {
-// OBSOLETE case 1:
-// OBSOLETE temp = (unsigned char) locstr[1];
-// OBSOLETE locstr += 2;
-// OBSOLETE break;
-// OBSOLETE case 2:
-// OBSOLETE temp = *(unsigned short *) (locstr + 1);
-// OBSOLETE locstr += 3;
-// OBSOLETE break;
-// OBSOLETE case 3:
-// OBSOLETE temp = *(unsigned long *) (locstr + 1);
-// OBSOLETE locstr += 5;
-// OBSOLETE break;
-// OBSOLETE }
-// OBSOLETE if (*locstr == dst_multiply_256)
-// OBSOLETE {
-// OBSOLETE temp <<= 8;
-// OBSOLETE locstr++;
-// OBSOLETE }
-// OBSOLETE switch (entry->header.code)
-// OBSOLETE {
-// OBSOLETE case dst_lsc_add_byte:
-// OBSOLETE if (SYMBOL_CLASS (sym) == LOC_LOCAL)
-// OBSOLETE SYMBOL_CLASS (sym) = LOC_ARG;
-// OBSOLETE SYMBOL_VALUE (sym) += temp;
-// OBSOLETE break;
-// OBSOLETE case dst_lsc_sub_byte:
-// OBSOLETE SYMBOL_VALUE (sym) -= temp;
-// OBSOLETE break;
-// OBSOLETE }
-// OBSOLETE break;
-// OBSOLETE case dst_lsc_sbreg: /* Stack base register (frame pointer). Arg==0 */
-// OBSOLETE if (next_entry->header.code != dst_lsc_indirect)
-// OBSOLETE {
-// OBSOLETE SYMBOL_VALUE (sym) = 0;
-// OBSOLETE SYMBOL_CLASS (sym) = LOC_STATIC;
-// OBSOLETE return;
-// OBSOLETE }
-// OBSOLETE SYMBOL_VALUE (sym) = 0;
-// OBSOLETE SYMBOL_CLASS (sym) = LOC_LOCAL;
-// OBSOLETE locstr++;
-// OBSOLETE break;
-// OBSOLETE default:
-// OBSOLETE SYMBOL_VALUE (sym) = 0;
-// OBSOLETE SYMBOL_CLASS (sym) = LOC_STATIC;
-// OBSOLETE return;
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE static struct symbol_list *
-// OBSOLETE process_dst_symbols (struct objfile *objfile, dst_rec_ptr_t entry, char *name,
-// OBSOLETE int *nsyms_ret)
-// OBSOLETE {
-// OBSOLETE struct symbol_list *list = NULL, *element;
-// OBSOLETE struct symbol *sym;
-// OBSOLETE char *symname;
-// OBSOLETE int nsyms = 0;
-// OBSOLETE char *location;
-// OBSOLETE long line;
-// OBSOLETE dst_type_t symtype;
-// OBSOLETE struct type *type;
-// OBSOLETE dst_var_attr_t attr;
-// OBSOLETE dst_var_loc_t loc_type;
-// OBSOLETE unsigned loc_index;
-// OBSOLETE long loc_value;
-// OBSOLETE
-// OBSOLETE if (!entry)
-// OBSOLETE {
-// OBSOLETE *nsyms_ret = 0;
-// OBSOLETE return NULL;
-// OBSOLETE }
-// OBSOLETE location = (char *) entry;
-// OBSOLETE while (NEXT_SYM (&location, &entry) &&
-// OBSOLETE entry->rec_type != dst_typ_end_scope)
-// OBSOLETE {
-// OBSOLETE if (entry->rec_type == dst_typ_var)
-// OBSOLETE {
-// OBSOLETE if (DST_var (entry).short_locs)
-// OBSOLETE {
-// OBSOLETE loc_type = DST_var (entry).locs.shorts[0].loc_type;
-// OBSOLETE loc_index = DST_var (entry).locs.shorts[0].loc_index;
-// OBSOLETE loc_value = DST_var (entry).locs.shorts[0].location;
-// OBSOLETE }
-// OBSOLETE else
-// OBSOLETE {
-// OBSOLETE loc_type = DST_var (entry).locs.longs[0].loc_type;
-// OBSOLETE loc_index = DST_var (entry).locs.longs[0].loc_index;
-// OBSOLETE loc_value = DST_var (entry).locs.longs[0].location;
-// OBSOLETE }
-// OBSOLETE if (loc_type == dst_var_loc_external)
-// OBSOLETE continue;
-// OBSOLETE symname = DST_OFFSET (entry, DST_var (entry).noffset);
-// OBSOLETE line = DST_var (entry).src_loc.line_number;
-// OBSOLETE symtype = DST_var (entry).type_desc;
-// OBSOLETE attr = DST_var (entry).attributes;
-// OBSOLETE }
-// OBSOLETE else if (entry->rec_type == dst_typ_variable)
-// OBSOLETE {
-// OBSOLETE symname = DST_OFFSET (entry,
-// OBSOLETE DST_variable (entry).noffset);
-// OBSOLETE line = DST_variable (entry).src_loc.line_number;
-// OBSOLETE symtype = DST_variable (entry).type_desc;
-// OBSOLETE attr = DST_variable (entry).attributes;
-// OBSOLETE }
-// OBSOLETE else
-// OBSOLETE {
-// OBSOLETE continue;
-// OBSOLETE }
-// OBSOLETE if (symname && name && !strcmp (symname, name))
-// OBSOLETE /* It's the function return value */
-// OBSOLETE continue;
-// OBSOLETE sym = create_new_symbol (objfile, symname);
-// OBSOLETE
-// OBSOLETE if ((attr & (1 << dst_var_attr_global)) ||
-// OBSOLETE (attr & (1 << dst_var_attr_static)))
-// OBSOLETE SYMBOL_CLASS (sym) = LOC_STATIC;
-// OBSOLETE else
-// OBSOLETE SYMBOL_CLASS (sym) = LOC_LOCAL;
-// OBSOLETE SYMBOL_LINE (sym) = line;
-// OBSOLETE SYMBOL_TYPE (sym) = decode_type_desc (objfile, &symtype,
-// OBSOLETE entry);
-// OBSOLETE SYMBOL_VALUE (sym) = 0;
-// OBSOLETE switch (entry->rec_type)
-// OBSOLETE {
-// OBSOLETE case dst_typ_var:
-// OBSOLETE switch (loc_type)
-// OBSOLETE {
-// OBSOLETE case dst_var_loc_abs:
-// OBSOLETE SYMBOL_VALUE_ADDRESS (sym) = loc_value;
-// OBSOLETE break;
-// OBSOLETE case dst_var_loc_sect_off:
-// OBSOLETE case dst_var_loc_ind_sect_off: /* What is this? */
-// OBSOLETE SYMBOL_VALUE_ADDRESS (sym) = dst_get_addr (
-// OBSOLETE loc_index,
-// OBSOLETE loc_value);
-// OBSOLETE break;
-// OBSOLETE case dst_var_loc_ind_reg_rel: /* What is this? */
-// OBSOLETE case dst_var_loc_reg_rel:
-// OBSOLETE /* If it isn't fp relative, specify the
-// OBSOLETE * register it's relative to.
-// OBSOLETE */
-// OBSOLETE if (loc_index)
-// OBSOLETE {
-// OBSOLETE sym->aux_value.basereg = loc_index;
-// OBSOLETE }
-// OBSOLETE SYMBOL_VALUE (sym) = loc_value;
-// OBSOLETE if (loc_value > 0 &&
-// OBSOLETE SYMBOL_CLASS (sym) == LOC_BASEREG)
-// OBSOLETE SYMBOL_CLASS (sym) = LOC_BASEREG_ARG;
-// OBSOLETE break;
-// OBSOLETE case dst_var_loc_reg:
-// OBSOLETE SYMBOL_VALUE (sym) = loc_index;
-// OBSOLETE SYMBOL_CLASS (sym) = LOC_REGISTER;
-// OBSOLETE break;
-// OBSOLETE }
-// OBSOLETE break;
-// OBSOLETE case dst_typ_variable:
-// OBSOLETE /* External variable..... don't try to interpret
-// OBSOLETE * its nonexistant locstring.
-// OBSOLETE */
-// OBSOLETE if (DST_variable (entry).loffset == -1)
-// OBSOLETE continue;
-// OBSOLETE decode_dst_locstring (DST_OFFSET (entry,
-// OBSOLETE DST_variable (entry).loffset),
-// OBSOLETE sym);
-// OBSOLETE }
-// OBSOLETE element = (struct symbol_list *)
-// OBSOLETE xmalloc (sizeof (struct symbol_list));
-// OBSOLETE
-// OBSOLETE if (attr & (1 << dst_var_attr_global))
-// OBSOLETE {
-// OBSOLETE element->next = dst_global_symbols;
-// OBSOLETE dst_global_symbols = element;
-// OBSOLETE total_globals++;
-// OBSOLETE }
-// OBSOLETE else
-// OBSOLETE {
-// OBSOLETE element->next = list;
-// OBSOLETE list = element;
-// OBSOLETE nsyms++;
-// OBSOLETE }
-// OBSOLETE element->symbol = sym;
-// OBSOLETE }
-// OBSOLETE *nsyms_ret = nsyms;
-// OBSOLETE return list;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE static struct symbol *
-// OBSOLETE process_dst_function (struct objfile *objfile, dst_rec_ptr_t entry, char *name,
-// OBSOLETE CORE_ADDR address)
-// OBSOLETE {
-// OBSOLETE struct symbol *sym;
-// OBSOLETE struct type *type, *ftype;
-// OBSOLETE dst_rec_ptr_t sym_entry, typ_entry;
-// OBSOLETE char *location;
-// OBSOLETE struct symbol_list *element;
-// OBSOLETE
-// OBSOLETE type = builtin_type_int;
-// OBSOLETE sym = create_new_symbol (objfile, name);
-// OBSOLETE SYMBOL_CLASS (sym) = LOC_BLOCK;
-// OBSOLETE
-// OBSOLETE if (entry)
-// OBSOLETE {
-// OBSOLETE location = (char *) entry;
-// OBSOLETE do
-// OBSOLETE {
-// OBSOLETE NEXT_SYM (&location, &sym_entry);
-// OBSOLETE }
-// OBSOLETE while (sym_entry && sym_entry->rec_type != dst_typ_signature);
-// OBSOLETE
-// OBSOLETE if (sym_entry)
-// OBSOLETE {
-// OBSOLETE SYMBOL_LINE (sym) =
-// OBSOLETE DST_signature (sym_entry).src_loc.line_number;
-// OBSOLETE if (DST_signature (sym_entry).result)
-// OBSOLETE {
-// OBSOLETE typ_entry = (dst_rec_ptr_t)
-// OBSOLETE DST_OFFSET (sym_entry,
-// OBSOLETE DST_signature (sym_entry).result);
-// OBSOLETE type = decode_dst_type (objfile, typ_entry);
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE if (!type->function_type)
-// OBSOLETE {
-// OBSOLETE ftype = alloc_type (objfile);
-// OBSOLETE type->function_type = ftype;
-// OBSOLETE TYPE_TARGET_TYPE (ftype) = type;
-// OBSOLETE TYPE_CODE (ftype) = TYPE_CODE_FUNC;
-// OBSOLETE }
-// OBSOLETE SYMBOL_TYPE (sym) = type->function_type;
-// OBSOLETE
-// OBSOLETE /* Now add ourselves to the global symbols list */
-// OBSOLETE element = (struct symbol_list *)
-// OBSOLETE xmalloc (sizeof (struct symbol_list));
-// OBSOLETE
-// OBSOLETE element->next = dst_global_symbols;
-// OBSOLETE dst_global_symbols = element;
-// OBSOLETE total_globals++;
-// OBSOLETE element->symbol = sym;
-// OBSOLETE
-// OBSOLETE return sym;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE static struct block *
-// OBSOLETE process_dst_block (struct objfile *objfile, dst_rec_ptr_t entry)
-// OBSOLETE {
-// OBSOLETE struct block *block;
-// OBSOLETE struct symbol *function = NULL;
-// OBSOLETE CORE_ADDR address;
-// OBSOLETE long size;
-// OBSOLETE char *name;
-// OBSOLETE dst_rec_ptr_t child_entry, symbol_entry;
-// OBSOLETE struct block *child_block;
-// OBSOLETE int total_symbols = 0;
-// OBSOLETE char fake_name[20];
-// OBSOLETE static long fake_seq = 0;
-// OBSOLETE struct symbol_list *symlist, *nextsym;
-// OBSOLETE int symnum;
-// OBSOLETE
-// OBSOLETE if (DST_block (entry).noffset)
-// OBSOLETE name = DST_OFFSET (entry, DST_block (entry).noffset);
-// OBSOLETE else
-// OBSOLETE name = NULL;
-// OBSOLETE if (DST_block (entry).n_of_code_ranges)
-// OBSOLETE {
-// OBSOLETE address = dst_sym_addr (
-// OBSOLETE &DST_block (entry).code_ranges[0].code_start);
-// OBSOLETE size = DST_block (entry).code_ranges[0].code_size;
-// OBSOLETE }
-// OBSOLETE else
-// OBSOLETE {
-// OBSOLETE address = -1;
-// OBSOLETE size = 0;
-// OBSOLETE }
-// OBSOLETE symbol_entry = (dst_rec_ptr_t) get_sec_ref (&DST_block (entry).symbols_start);
-// OBSOLETE switch (DST_block (entry).block_type)
-// OBSOLETE {
-// OBSOLETE /* These are all really functions. Even the "program" type.
-// OBSOLETE * This is because the Apollo OS was written in Pascal, and
-// OBSOLETE * in Pascal, the main procedure is described as the Program.
-// OBSOLETE * Cute, huh?
-// OBSOLETE */
-// OBSOLETE case dst_block_procedure:
-// OBSOLETE case dst_block_function:
-// OBSOLETE case dst_block_subroutine:
-// OBSOLETE case dst_block_program:
-// OBSOLETE prim_record_minimal_symbol (name, address, mst_text, objfile);
-// OBSOLETE function = process_dst_function (
-// OBSOLETE objfile,
-// OBSOLETE symbol_entry,
-// OBSOLETE name,
-// OBSOLETE address);
-// OBSOLETE enter_all_lines (get_sec_ref (&DST_block (entry).code_ranges[0].lines_start), address);
-// OBSOLETE break;
-// OBSOLETE case dst_block_block_data:
-// OBSOLETE break;
-// OBSOLETE
-// OBSOLETE default:
-// OBSOLETE /* GDB has to call it something, and the module name
-// OBSOLETE * won't cut it
-// OBSOLETE */
-// OBSOLETE sprintf (fake_name, "block_%08lx", fake_seq++);
-// OBSOLETE function = process_dst_function (
-// OBSOLETE objfile, NULL, fake_name, address);
-// OBSOLETE break;
-// OBSOLETE }
-// OBSOLETE symlist = process_dst_symbols (objfile, symbol_entry,
-// OBSOLETE name, &total_symbols);
-// OBSOLETE block = (struct block *)
-// OBSOLETE obstack_alloc (&objfile->symbol_obstack,
-// OBSOLETE sizeof (struct block) +
-// OBSOLETE (total_symbols - 1) * sizeof (struct symbol *));
-// OBSOLETE
-// OBSOLETE symnum = 0;
-// OBSOLETE while (symlist)
-// OBSOLETE {
-// OBSOLETE nextsym = symlist->next;
-// OBSOLETE
-// OBSOLETE block->sym[symnum] = symlist->symbol;
-// OBSOLETE
-// OBSOLETE xfree (symlist);
-// OBSOLETE symlist = nextsym;
-// OBSOLETE symnum++;
-// OBSOLETE }
-// OBSOLETE BLOCK_NSYMS (block) = total_symbols;
-// OBSOLETE BLOCK_HASHTABLE (block) = 0;
-// OBSOLETE BLOCK_START (block) = address;
-// OBSOLETE BLOCK_END (block) = address + size;
-// OBSOLETE BLOCK_SUPERBLOCK (block) = 0;
-// OBSOLETE if (function)
-// OBSOLETE {
-// OBSOLETE SYMBOL_BLOCK_VALUE (function) = block;
-// OBSOLETE BLOCK_FUNCTION (block) = function;
-// OBSOLETE }
-// OBSOLETE else
-// OBSOLETE BLOCK_FUNCTION (block) = 0;
-// OBSOLETE
-// OBSOLETE if (DST_block (entry).child_block_off)
-// OBSOLETE {
-// OBSOLETE child_entry = (dst_rec_ptr_t) DST_OFFSET (entry,
-// OBSOLETE DST_block (entry).child_block_off);
-// OBSOLETE while (child_entry)
-// OBSOLETE {
-// OBSOLETE child_block = process_dst_block (objfile, child_entry);
-// OBSOLETE if (child_block)
-// OBSOLETE {
-// OBSOLETE if (BLOCK_START (child_block) <
-// OBSOLETE BLOCK_START (block) ||
-// OBSOLETE BLOCK_START (block) == -1)
-// OBSOLETE BLOCK_START (block) =
-// OBSOLETE BLOCK_START (child_block);
-// OBSOLETE if (BLOCK_END (child_block) >
-// OBSOLETE BLOCK_END (block) ||
-// OBSOLETE BLOCK_END (block) == -1)
-// OBSOLETE BLOCK_END (block) =
-// OBSOLETE BLOCK_END (child_block);
-// OBSOLETE BLOCK_SUPERBLOCK (child_block) = block;
-// OBSOLETE }
-// OBSOLETE if (DST_block (child_entry).sibling_block_off)
-// OBSOLETE child_entry = (dst_rec_ptr_t) DST_OFFSET (
-// OBSOLETE child_entry,
-// OBSOLETE DST_block (child_entry).sibling_block_off);
-// OBSOLETE else
-// OBSOLETE child_entry = NULL;
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE record_pending_block (objfile, block, NULL);
-// OBSOLETE return block;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE static void
-// OBSOLETE read_dst_symtab (struct objfile *objfile)
-// OBSOLETE {
-// OBSOLETE char *buffer;
-// OBSOLETE dst_rec_ptr_t entry, file_table, root_block;
-// OBSOLETE char *source_file;
-// OBSOLETE struct block *block, *global_block;
-// OBSOLETE int symnum;
-// OBSOLETE struct symbol_list *nextsym;
-// OBSOLETE int module_num = 0;
-// OBSOLETE struct structure_list *element;
-// OBSOLETE
-// OBSOLETE current_objfile = objfile;
-// OBSOLETE buffer = blocks_info.buffer;
-// OBSOLETE while (NEXT_BLK (&buffer, &entry))
-// OBSOLETE {
-// OBSOLETE if (entry->rec_type == dst_typ_comp_unit)
-// OBSOLETE {
-// OBSOLETE file_table = (dst_rec_ptr_t) DST_OFFSET (entry,
-// OBSOLETE DST_comp_unit (entry).file_table);
-// OBSOLETE section_table = (dst_rec_ptr_t) DST_OFFSET (entry,
-// OBSOLETE DST_comp_unit (entry).section_table);
-// OBSOLETE root_block = (dst_rec_ptr_t) DST_OFFSET (entry,
-// OBSOLETE DST_comp_unit (entry).root_block_offset);
-// OBSOLETE source_file = DST_OFFSET (file_table,
-// OBSOLETE DST_file_tab (file_table).files[0].noffset);
-// OBSOLETE /* Point buffer to the start of the next comp_unit */
-// OBSOLETE buffer = DST_OFFSET (entry,
-// OBSOLETE DST_comp_unit (entry).data_size);
-// OBSOLETE dst_start_symtab ();
-// OBSOLETE
-// OBSOLETE block = process_dst_block (objfile, root_block);
-// OBSOLETE
-// OBSOLETE global_block = (struct block *)
-// OBSOLETE obstack_alloc (&objfile->symbol_obstack,
-// OBSOLETE sizeof (struct block) +
-// OBSOLETE (total_globals - 1) *
-// OBSOLETE sizeof (struct symbol *));
-// OBSOLETE BLOCK_NSYMS (global_block) = total_globals;
-// OBSOLETE BLOCK_HASHTABLE (global_block) = 0;
-// OBSOLETE for (symnum = 0; symnum < total_globals; symnum++)
-// OBSOLETE {
-// OBSOLETE nextsym = dst_global_symbols->next;
-// OBSOLETE
-// OBSOLETE global_block->sym[symnum] =
-// OBSOLETE dst_global_symbols->symbol;
-// OBSOLETE
-// OBSOLETE xfree (dst_global_symbols);
-// OBSOLETE dst_global_symbols = nextsym;
-// OBSOLETE }
-// OBSOLETE dst_global_symbols = NULL;
-// OBSOLETE total_globals = 0;
-// OBSOLETE BLOCK_FUNCTION (global_block) = 0;
-// OBSOLETE BLOCK_START (global_block) = BLOCK_START (block);
-// OBSOLETE BLOCK_END (global_block) = BLOCK_END (block);
-// OBSOLETE BLOCK_SUPERBLOCK (global_block) = 0;
-// OBSOLETE BLOCK_SUPERBLOCK (block) = global_block;
-// OBSOLETE record_pending_block (objfile, global_block, NULL);
-// OBSOLETE
-// OBSOLETE complete_symtab (source_file,
-// OBSOLETE BLOCK_START (block),
-// OBSOLETE BLOCK_END (block) - BLOCK_START (block));
-// OBSOLETE module_num++;
-// OBSOLETE dst_end_symtab (objfile);
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE if (module_num)
-// OBSOLETE prim_record_minimal_symbol ("<end_of_program>",
-// OBSOLETE BLOCK_END (block), mst_text, objfile);
-// OBSOLETE /* One more faked symbol to make sure nothing can ever run off the
-// OBSOLETE * end of the symbol table. This one represents the end of the
-// OBSOLETE * text space. It used to be (CORE_ADDR) -1 (effectively the highest
-// OBSOLETE * int possible), but some parts of gdb treated it as a signed
-// OBSOLETE * number and failed comparisons. We could equally use 7fffffff,
-// OBSOLETE * but no functions are ever mapped to an address higher than
-// OBSOLETE * 40000000
-// OBSOLETE */
-// OBSOLETE prim_record_minimal_symbol ("<end_of_text>",
-// OBSOLETE (CORE_ADDR) 0x40000000,
-// OBSOLETE mst_text, objfile);
-// OBSOLETE while (struct_list)
-// OBSOLETE {
-// OBSOLETE element = struct_list;
-// OBSOLETE struct_list = element->next;
-// OBSOLETE xfree (element);
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE \f
-// OBSOLETE
-// OBSOLETE /* Support for line number handling */
-// OBSOLETE static char *linetab = NULL;
-// OBSOLETE static long linetab_offset;
-// OBSOLETE static unsigned long linetab_size;
-// OBSOLETE
-// OBSOLETE /* Read in all the line numbers for fast lookups later. Leave them in
-// OBSOLETE external (unswapped) format in memory; we'll swap them as we enter
-// OBSOLETE them into GDB's data structures. */
-// OBSOLETE static int
-// OBSOLETE init_one_section (int chan, dst_sec *secinfo)
-// OBSOLETE {
-// OBSOLETE if (secinfo->size == 0
-// OBSOLETE || lseek (chan, secinfo->position, 0) == -1
-// OBSOLETE || (secinfo->buffer = xmalloc (secinfo->size)) == NULL
-// OBSOLETE || myread (chan, secinfo->buffer, secinfo->size) == -1)
-// OBSOLETE return 0;
-// OBSOLETE else
-// OBSOLETE return 1;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE static int
-// OBSOLETE init_dst_sections (int chan)
-// OBSOLETE {
-// OBSOLETE
-// OBSOLETE if (!init_one_section (chan, &blocks_info) ||
-// OBSOLETE !init_one_section (chan, &lines_info) ||
-// OBSOLETE !init_one_section (chan, &symbols_info))
-// OBSOLETE return -1;
-// OBSOLETE else
-// OBSOLETE return 0;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Fake up support for relocating symbol addresses. FIXME. */
-// OBSOLETE
-// OBSOLETE struct section_offsets dst_symfile_faker =
-// OBSOLETE {0};
-// OBSOLETE
-// OBSOLETE void
-// OBSOLETE dst_symfile_offsets (struct objfile *objfile, struct section_addr_info *addrs)
-// OBSOLETE {
-// OBSOLETE objfile->num_sections = 1;
-// OBSOLETE objfile->section_offsets = &dst_symfile_faker;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Register our ability to parse symbols for DST BFD files */
-// OBSOLETE
-// OBSOLETE static struct sym_fns dst_sym_fns =
-// OBSOLETE {
-// OBSOLETE /* FIXME: Can this be integrated with coffread.c? If not, should it be
-// OBSOLETE a separate flavour like ecoff? */
-// OBSOLETE (enum bfd_flavour) -2,
-// OBSOLETE
-// OBSOLETE dst_new_init, /* sym_new_init: init anything gbl to entire symtab */
-// OBSOLETE dst_symfile_init, /* sym_init: read initial info, setup for sym_read() */
-// OBSOLETE dst_symfile_read, /* sym_read: read a symbol file into symtab */
-// OBSOLETE dst_symfile_finish, /* sym_finish: finished with file, cleanup */
-// OBSOLETE dst_symfile_offsets, /* sym_offsets: xlate external to internal form */
-// OBSOLETE NULL /* next: pointer to next struct sym_fns */
-// OBSOLETE };
-// OBSOLETE
-// OBSOLETE void
-// OBSOLETE _initialize_dstread (void)
-// OBSOLETE {
-// OBSOLETE add_symtab_fns (&dst_sym_fns);
-// OBSOLETE }
+++ /dev/null
-// 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 }
+++ /dev/null
-// 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 \f
-// 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 *) ®isters[REGISTER_BYTE (regno)], 0);
-// OBSOLETE else
-// OBSOLETE ptrace (PT_WRITE_FPR, PIDGET (inferior_ptid),
-// OBSOLETE ®isters[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 *) ®isters[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 \f
-// 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 }
+++ /dev/null
-// 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 \f
-// 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 (®isters[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 ®isters[REGISTER_BYTE (regnum)], \
-// OBSOLETE count*REGISTER_SIZE)
-// OBSOLETE \f
-// 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 \f
-// 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 \f
-// 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 }
+++ /dev/null
-// 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 (®isters[REGISTER_BYTE (FP0_REGNUM)],
-// OBSOLETE inferior_fp_registers.f_st,
-// OBSOLETE sizeof inferior_fp_registers.f_st);
-// OBSOLETE memcpy (®isters[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, ®isters[REGISTER_BYTE (FP0_REGNUM)],
-// OBSOLETE sizeof inferior_fp_registers.f_st);
-// OBSOLETE memcpy (&inferior_fp_registers.f_ctrl,
-// OBSOLETE ®isters[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 (®isters[REGISTER_BYTE (FP0_REGNUM)],
-// OBSOLETE core_reg_sect,
-// OBSOLETE core_reg_size); /* FIXME, probably bogus */
-// OBSOLETE #ifdef FPC_REGNUM
-// OBSOLETE memcpy (®isters[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 \f
-// 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 }
+++ /dev/null
-// OBSOLETE /* Target-machine dependent code for the Intel 960
-// OBSOLETE
-// OBSOLETE Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000,
-// OBSOLETE 2001, 2002 Free Software Foundation, Inc.
-// OBSOLETE
-// OBSOLETE Contributed by Intel Corporation.
-// OBSOLETE examine_prologue and other parts 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 "defs.h"
-// OBSOLETE #include "symtab.h"
-// OBSOLETE #include "value.h"
-// OBSOLETE #include "frame.h"
-// OBSOLETE #include "floatformat.h"
-// OBSOLETE #include "target.h"
-// OBSOLETE #include "gdbcore.h"
-// OBSOLETE #include "inferior.h"
-// OBSOLETE #include "regcache.h"
-// OBSOLETE #include "gdb_string.h"
-// OBSOLETE
-// OBSOLETE static CORE_ADDR next_insn (CORE_ADDR memaddr,
-// OBSOLETE unsigned int *pword1, unsigned int *pword2);
-// OBSOLETE
-// OBSOLETE struct type *
-// OBSOLETE i960_register_type (int regnum)
-// OBSOLETE {
-// OBSOLETE if (regnum < FP0_REGNUM)
-// OBSOLETE return builtin_type_int32;
-// OBSOLETE else
-// OBSOLETE return builtin_type_i960_ext;
-// OBSOLETE }
-// OBSOLETE
-// 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 int
-// OBSOLETE i960_use_struct_convention (int gcc_p, struct type *type)
-// OBSOLETE {
-// OBSOLETE return (TYPE_LENGTH (type) > 16);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* gdb960 is always running on a non-960 host. Check its characteristics.
-// OBSOLETE This routine must be called as part of gdb initialization. */
-// OBSOLETE
-// OBSOLETE static void
-// OBSOLETE check_host (void)
-// OBSOLETE {
-// OBSOLETE int i;
-// OBSOLETE
-// OBSOLETE static struct typestruct
-// OBSOLETE {
-// OBSOLETE int hostsize; /* Size of type on host */
-// OBSOLETE int i960size; /* Size of type on i960 */
-// OBSOLETE char *typename; /* Name of type, for error msg */
-// OBSOLETE }
-// OBSOLETE types[] =
-// OBSOLETE {
-// OBSOLETE {
-// OBSOLETE sizeof (short), 2, "short"
-// OBSOLETE }
-// OBSOLETE ,
-// OBSOLETE {
-// OBSOLETE sizeof (int), 4, "int"
-// OBSOLETE }
-// OBSOLETE ,
-// OBSOLETE {
-// OBSOLETE sizeof (long), 4, "long"
-// OBSOLETE }
-// OBSOLETE ,
-// OBSOLETE {
-// OBSOLETE sizeof (float), 4, "float"
-// OBSOLETE }
-// OBSOLETE ,
-// OBSOLETE {
-// OBSOLETE sizeof (double), 8, "double"
-// OBSOLETE }
-// OBSOLETE ,
-// OBSOLETE {
-// OBSOLETE sizeof (char *), 4, "pointer"
-// OBSOLETE }
-// OBSOLETE ,
-// OBSOLETE };
-// OBSOLETE #define TYPELEN (sizeof(types) / sizeof(struct typestruct))
-// OBSOLETE
-// OBSOLETE /* Make sure that host type sizes are same as i960
-// OBSOLETE */
-// OBSOLETE for (i = 0; i < TYPELEN; i++)
-// OBSOLETE {
-// OBSOLETE if (types[i].hostsize != types[i].i960size)
-// OBSOLETE {
-// OBSOLETE printf_unfiltered ("sizeof(%s) != %d: PROCEED AT YOUR OWN RISK!\n",
-// OBSOLETE types[i].typename, types[i].i960size);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE \f
-// OBSOLETE /* Is this register part of the register window system? A yes answer
-// OBSOLETE implies that 1) The name of this register will not be the same in
-// OBSOLETE other frames, and 2) This register is automatically "saved" upon
-// OBSOLETE subroutine calls and thus there is no need to search more than one
-// OBSOLETE stack frame for it.
-// OBSOLETE
-// OBSOLETE On the i960, in fact, the name of this register in another frame is
-// OBSOLETE "mud" -- there is no overlap between the windows. Each window is
-// OBSOLETE simply saved into the stack (true for our purposes, after having been
-// OBSOLETE flushed; normally they reside on-chip and are restored from on-chip
-// OBSOLETE without ever going to memory). */
-// OBSOLETE
-// OBSOLETE static int
-// OBSOLETE register_in_window_p (int regnum)
-// OBSOLETE {
-// OBSOLETE return regnum <= R15_REGNUM;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* i960_find_saved_register ()
-// OBSOLETE
-// OBSOLETE Return the address in which frame FRAME's value of register REGNUM
-// OBSOLETE has been saved in memory. Or return zero if it has not been saved.
-// OBSOLETE If REGNUM specifies the SP, the value we return is actually the SP
-// OBSOLETE value, not an address where it was saved. */
-// OBSOLETE
-// OBSOLETE static CORE_ADDR
-// OBSOLETE i960_find_saved_register (struct frame_info *frame, int regnum)
-// OBSOLETE {
-// OBSOLETE register struct frame_info *frame1 = NULL;
-// OBSOLETE register CORE_ADDR addr = 0;
-// OBSOLETE
-// OBSOLETE if (frame == NULL) /* No regs saved if want current frame */
-// OBSOLETE return 0;
-// OBSOLETE
-// OBSOLETE /* We assume that a register in a register window will only be saved
-// OBSOLETE in one place (since the name changes and/or disappears as you go
-// OBSOLETE towards inner frames), so we only call get_frame_saved_regs on
-// OBSOLETE the current frame. This is directly in contradiction to the
-// OBSOLETE usage below, which assumes that registers used in a frame must be
-// OBSOLETE saved in a lower (more interior) frame. This change is a result
-// OBSOLETE of working on a register window machine; get_frame_saved_regs
-// OBSOLETE always returns the registers saved within a frame, within the
-// OBSOLETE context (register namespace) of that frame. */
-// OBSOLETE
-// OBSOLETE /* However, note that we don't want this to return anything if
-// OBSOLETE nothing is saved (if there's a frame inside of this one). Also,
-// OBSOLETE callers to this routine asking for the stack pointer want the
-// OBSOLETE stack pointer saved for *this* frame; this is returned from the
-// OBSOLETE next frame. */
-// OBSOLETE
-// OBSOLETE if (register_in_window_p (regnum))
-// OBSOLETE {
-// OBSOLETE frame1 = get_next_frame (frame);
-// OBSOLETE if (!frame1)
-// OBSOLETE return 0; /* Registers of this frame are active. */
-// OBSOLETE
-// OBSOLETE /* Get the SP from the next frame in; it will be this
-// OBSOLETE current frame. */
-// OBSOLETE if (regnum != SP_REGNUM)
-// OBSOLETE frame1 = frame;
-// OBSOLETE
-// OBSOLETE FRAME_INIT_SAVED_REGS (frame1);
-// OBSOLETE return frame1->saved_regs[regnum]; /* ... which might be zero */
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Note that this next routine assumes that registers used in
-// OBSOLETE frame x will be saved only in the frame that x calls and
-// OBSOLETE frames interior to it. This is not true on the sparc, but the
-// OBSOLETE above macro takes care of it, so we should be all right. */
-// OBSOLETE while (1)
-// OBSOLETE {
-// OBSOLETE QUIT;
-// OBSOLETE frame1 = get_next_frame (frame);
-// OBSOLETE if (frame1 == 0)
-// OBSOLETE break;
-// OBSOLETE frame = frame1;
-// OBSOLETE FRAME_INIT_SAVED_REGS (frame1);
-// OBSOLETE if (frame1->saved_regs[regnum])
-// OBSOLETE addr = frame1->saved_regs[regnum];
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE return addr;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* i960_get_saved_register ()
-// OBSOLETE
-// OBSOLETE Find register number REGNUM relative to FRAME and put its (raw,
-// OBSOLETE target format) contents in *RAW_BUFFER. Set *OPTIMIZED if the
-// OBSOLETE variable was optimized out (and thus can't be fetched). Set *LVAL
-// OBSOLETE to lval_memory, lval_register, or not_lval, depending on whether
-// OBSOLETE the value was fetched from memory, from a register, or in a strange
-// OBSOLETE and non-modifiable way (e.g. a frame pointer which was calculated
-// OBSOLETE rather than fetched). Set *ADDRP to the address, either in memory
-// OBSOLETE on as a REGISTER_BYTE offset into the registers array.
-// OBSOLETE
-// OBSOLETE Note that this implementation never sets *LVAL to not_lval. But it
-// OBSOLETE can be replaced by defining GET_SAVED_REGISTER and supplying your
-// OBSOLETE own.
-// OBSOLETE
-// OBSOLETE The argument RAW_BUFFER must point to aligned memory. */
-// OBSOLETE
-// OBSOLETE void
-// OBSOLETE 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 CORE_ADDR addr;
-// OBSOLETE
-// OBSOLETE if (!target_has_registers)
-// OBSOLETE error ("No registers.");
-// OBSOLETE
-// OBSOLETE /* Normal systems don't optimize out things with register numbers. */
-// OBSOLETE if (optimized != NULL)
-// OBSOLETE *optimized = 0;
-// OBSOLETE addr = i960_find_saved_register (frame, regnum);
-// OBSOLETE if (addr != 0)
-// OBSOLETE {
-// OBSOLETE if (lval != NULL)
-// OBSOLETE *lval = lval_memory;
-// OBSOLETE if (regnum == SP_REGNUM)
-// OBSOLETE {
-// OBSOLETE if (raw_buffer != NULL)
-// OBSOLETE {
-// OBSOLETE /* Put it back in target format. */
-// OBSOLETE store_address (raw_buffer, REGISTER_RAW_SIZE (regnum),
-// OBSOLETE (LONGEST) addr);
-// OBSOLETE }
-// OBSOLETE if (addrp != NULL)
-// OBSOLETE *addrp = 0;
-// OBSOLETE return;
-// OBSOLETE }
-// OBSOLETE if (raw_buffer != NULL)
-// OBSOLETE target_read_memory (addr, raw_buffer, REGISTER_RAW_SIZE (regnum));
-// OBSOLETE }
-// OBSOLETE else
-// OBSOLETE {
-// OBSOLETE if (lval != NULL)
-// OBSOLETE *lval = lval_register;
-// OBSOLETE addr = REGISTER_BYTE (regnum);
-// OBSOLETE if (raw_buffer != NULL)
-// OBSOLETE read_register_gen (regnum, raw_buffer);
-// OBSOLETE }
-// OBSOLETE if (addrp != NULL)
-// OBSOLETE *addrp = addr;
-// OBSOLETE }
-// OBSOLETE \f
-// OBSOLETE /* Examine an i960 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 gcc960 1.21, particularly
-// OBSOLETE the routine i960_function_prologue (). A "regular expression" for
-// OBSOLETE the function prologue is given below:
-// OBSOLETE
-// OBSOLETE (lda LRn, g14
-// OBSOLETE mov g14, g[0-7]
-// OBSOLETE (mov 0, g14) | (lda 0, g14))?
-// OBSOLETE
-// OBSOLETE (mov[qtl]? g[0-15], r[4-15])*
-// OBSOLETE ((addo [1-31], sp, sp) | (lda n(sp), sp))?
-// OBSOLETE (st[qtl]? g[0-15], n(fp))*
-// OBSOLETE
-// OBSOLETE (cmpobne 0, g14, LFn
-// OBSOLETE mov sp, g14
-// OBSOLETE lda 0x30(sp), sp
-// OBSOLETE LFn: stq g0, (g14)
-// OBSOLETE stq g4, 0x10(g14)
-// OBSOLETE stq g8, 0x20(g14))?
-// OBSOLETE
-// OBSOLETE (st g14, n(fp))?
-// OBSOLETE (mov g13,r[4-15])?
-// OBSOLETE */
-// OBSOLETE
-// OBSOLETE /* Macros for extracting fields from i960 instructions. */
-// OBSOLETE
-// OBSOLETE #define BITMASK(pos, width) (((0x1 << (width)) - 1) << (pos))
-// OBSOLETE #define EXTRACT_FIELD(val, pos, width) ((val) >> (pos) & BITMASK (0, width))
-// OBSOLETE
-// OBSOLETE #define REG_SRC1(insn) EXTRACT_FIELD (insn, 0, 5)
-// OBSOLETE #define REG_SRC2(insn) EXTRACT_FIELD (insn, 14, 5)
-// OBSOLETE #define REG_SRCDST(insn) EXTRACT_FIELD (insn, 19, 5)
-// OBSOLETE #define MEM_SRCDST(insn) EXTRACT_FIELD (insn, 19, 5)
-// OBSOLETE #define MEMA_OFFSET(insn) EXTRACT_FIELD (insn, 0, 12)
-// 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, and (for two-word instructions), *PWORD2 receives
-// OBSOLETE the second. */
-// OBSOLETE
-// OBSOLETE #define NEXT_PROLOGUE_INSN(addr, lim, pword1, pword2) \
-// OBSOLETE (((addr) < (lim)) ? next_insn (addr, pword1, pword2) : 0)
-// OBSOLETE
-// OBSOLETE static CORE_ADDR
-// OBSOLETE examine_prologue (register CORE_ADDR ip, register CORE_ADDR limit,
-// OBSOLETE CORE_ADDR frame_addr, struct frame_saved_regs *fsr)
-// OBSOLETE {
-// OBSOLETE register CORE_ADDR next_ip;
-// OBSOLETE register int src, dst;
-// OBSOLETE register unsigned int *pcode;
-// OBSOLETE unsigned int insn1, insn2;
-// OBSOLETE int size;
-// OBSOLETE int within_leaf_prologue;
-// OBSOLETE CORE_ADDR save_addr;
-// OBSOLETE static unsigned int varargs_prologue_code[] =
-// OBSOLETE {
-// OBSOLETE 0x3507a00c, /* cmpobne 0x0, g14, LFn */
-// OBSOLETE 0x5cf01601, /* mov sp, g14 */
-// OBSOLETE 0x8c086030, /* lda 0x30(sp), sp */
-// OBSOLETE 0xb2879000, /* LFn: stq g0, (g14) */
-// OBSOLETE 0xb2a7a010, /* stq g4, 0x10(g14) */
-// OBSOLETE 0xb2c7a020 /* stq g8, 0x20(g14) */
-// OBSOLETE };
-// OBSOLETE
-// OBSOLETE /* Accept a leaf procedure prologue code fragment if present.
-// OBSOLETE Note that ip might point to either the leaf or non-leaf
-// OBSOLETE entry point; we look for the non-leaf entry point first: */
-// OBSOLETE
-// OBSOLETE within_leaf_prologue = 0;
-// OBSOLETE if ((next_ip = NEXT_PROLOGUE_INSN (ip, limit, &insn1, &insn2))
-// OBSOLETE && ((insn1 & 0xfffff000) == 0x8cf00000 /* lda LRx, g14 (MEMA) */
-// OBSOLETE || (insn1 & 0xfffffc60) == 0x8cf03000)) /* lda LRx, g14 (MEMB) */
-// OBSOLETE {
-// OBSOLETE within_leaf_prologue = 1;
-// OBSOLETE next_ip = NEXT_PROLOGUE_INSN (next_ip, limit, &insn1, &insn2);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Now look for the prologue code at a leaf entry point: */
-// OBSOLETE
-// OBSOLETE if (next_ip
-// OBSOLETE && (insn1 & 0xff87ffff) == 0x5c80161e /* mov g14, gx */
-// OBSOLETE && REG_SRCDST (insn1) <= G0_REGNUM + 7)
-// OBSOLETE {
-// OBSOLETE within_leaf_prologue = 1;
-// OBSOLETE if ((next_ip = NEXT_PROLOGUE_INSN (next_ip, limit, &insn1, &insn2))
-// OBSOLETE && (insn1 == 0x8cf00000 /* lda 0, g14 */
-// OBSOLETE || insn1 == 0x5cf01e00)) /* mov 0, g14 */
-// OBSOLETE {
-// OBSOLETE ip = next_ip;
-// OBSOLETE next_ip = NEXT_PROLOGUE_INSN (ip, limit, &insn1, &insn2);
-// OBSOLETE within_leaf_prologue = 0;
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* If something that looks like the beginning of a leaf prologue
-// OBSOLETE has been seen, but the remainder of the prologue is missing, bail.
-// OBSOLETE We don't know what we've got. */
-// OBSOLETE
-// OBSOLETE if (within_leaf_prologue)
-// OBSOLETE return (ip);
-// OBSOLETE
-// OBSOLETE /* Accept zero or more instances of "mov[qtl]? gx, ry", where y >= 4.
-// OBSOLETE This may cause us to mistake the moving of a register
-// OBSOLETE parameter to a local register for the saving of a callee-saved
-// OBSOLETE register, but that can't be helped, since with the
-// OBSOLETE "-fcall-saved" flag, any register can be made callee-saved. */
-// OBSOLETE
-// OBSOLETE while (next_ip
-// OBSOLETE && (insn1 & 0xfc802fb0) == 0x5c000610
-// OBSOLETE && (dst = REG_SRCDST (insn1)) >= (R0_REGNUM + 4))
-// OBSOLETE {
-// OBSOLETE src = REG_SRC1 (insn1);
-// OBSOLETE size = EXTRACT_FIELD (insn1, 24, 2) + 1;
-// OBSOLETE save_addr = frame_addr + ((dst - R0_REGNUM) * 4);
-// OBSOLETE while (size--)
-// OBSOLETE {
-// OBSOLETE fsr->regs[src++] = save_addr;
-// OBSOLETE save_addr += 4;
-// OBSOLETE }
-// OBSOLETE ip = next_ip;
-// OBSOLETE next_ip = NEXT_PROLOGUE_INSN (ip, limit, &insn1, &insn2);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Accept an optional "addo n, sp, sp" or "lda n(sp), sp". */
-// OBSOLETE
-// OBSOLETE if (next_ip &&
-// OBSOLETE ((insn1 & 0xffffffe0) == 0x59084800 /* addo n, sp, sp */
-// OBSOLETE || (insn1 & 0xfffff000) == 0x8c086000 /* lda n(sp), sp (MEMA) */
-// OBSOLETE || (insn1 & 0xfffffc60) == 0x8c087400)) /* lda n(sp), sp (MEMB) */
-// OBSOLETE {
-// OBSOLETE ip = next_ip;
-// OBSOLETE next_ip = NEXT_PROLOGUE_INSN (ip, limit, &insn1, &insn2);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Accept zero or more instances of "st[qtl]? gx, n(fp)".
-// OBSOLETE This may cause us to mistake the copying of a register
-// OBSOLETE parameter to the frame for the saving of a callee-saved
-// OBSOLETE register, but that can't be helped, since with the
-// OBSOLETE "-fcall-saved" flag, any register can be made callee-saved.
-// OBSOLETE We can, however, refuse to accept a save of register g14,
-// OBSOLETE since that is matched explicitly below. */
-// OBSOLETE
-// OBSOLETE while (next_ip &&
-// OBSOLETE ((insn1 & 0xf787f000) == 0x9287e000 /* stl? gx, n(fp) (MEMA) */
-// OBSOLETE || (insn1 & 0xf787fc60) == 0x9287f400 /* stl? gx, n(fp) (MEMB) */
-// OBSOLETE || (insn1 & 0xef87f000) == 0xa287e000 /* st[tq] gx, n(fp) (MEMA) */
-// OBSOLETE || (insn1 & 0xef87fc60) == 0xa287f400) /* st[tq] gx, n(fp) (MEMB) */
-// OBSOLETE && ((src = MEM_SRCDST (insn1)) != G14_REGNUM))
-// OBSOLETE {
-// OBSOLETE save_addr = frame_addr + ((insn1 & BITMASK (12, 1))
-// OBSOLETE ? insn2 : MEMA_OFFSET (insn1));
-// OBSOLETE size = (insn1 & BITMASK (29, 1)) ? ((insn1 & BITMASK (28, 1)) ? 4 : 3)
-// OBSOLETE : ((insn1 & BITMASK (27, 1)) ? 2 : 1);
-// OBSOLETE while (size--)
-// OBSOLETE {
-// OBSOLETE fsr->regs[src++] = save_addr;
-// OBSOLETE save_addr += 4;
-// OBSOLETE }
-// OBSOLETE ip = next_ip;
-// OBSOLETE next_ip = NEXT_PROLOGUE_INSN (ip, limit, &insn1, &insn2);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Accept the varargs prologue code if present. */
-// OBSOLETE
-// OBSOLETE size = sizeof (varargs_prologue_code) / sizeof (int);
-// OBSOLETE pcode = varargs_prologue_code;
-// OBSOLETE while (size-- && next_ip && *pcode++ == insn1)
-// OBSOLETE {
-// OBSOLETE ip = next_ip;
-// OBSOLETE next_ip = NEXT_PROLOGUE_INSN (ip, limit, &insn1, &insn2);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Accept an optional "st g14, n(fp)". */
-// OBSOLETE
-// OBSOLETE if (next_ip &&
-// OBSOLETE ((insn1 & 0xfffff000) == 0x92f7e000 /* st g14, n(fp) (MEMA) */
-// OBSOLETE || (insn1 & 0xfffffc60) == 0x92f7f400)) /* st g14, n(fp) (MEMB) */
-// OBSOLETE {
-// OBSOLETE fsr->regs[G14_REGNUM] = frame_addr + ((insn1 & BITMASK (12, 1))
-// OBSOLETE ? insn2 : MEMA_OFFSET (insn1));
-// OBSOLETE ip = next_ip;
-// OBSOLETE next_ip = NEXT_PROLOGUE_INSN (ip, limit, &insn1, &insn2);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Accept zero or one instance of "mov g13, ry", where y >= 4.
-// OBSOLETE This is saving the address where a struct should be returned. */
-// OBSOLETE
-// OBSOLETE if (next_ip
-// OBSOLETE && (insn1 & 0xff802fbf) == 0x5c00061d
-// OBSOLETE && (dst = REG_SRCDST (insn1)) >= (R0_REGNUM + 4))
-// OBSOLETE {
-// OBSOLETE save_addr = frame_addr + ((dst - R0_REGNUM) * 4);
-// OBSOLETE fsr->regs[G0_REGNUM + 13] = save_addr;
-// OBSOLETE ip = next_ip;
-// OBSOLETE #if 0 /* We'll need this once there is a subsequent instruction examined. */
-// OBSOLETE next_ip = NEXT_PROLOGUE_INSN (ip, limit, &insn1, &insn2);
-// OBSOLETE #endif
-// OBSOLETE }
-// 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 i960_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 }
-// 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 CORE_ADDR next_addr;
-// OBSOLETE register CORE_ADDR *saved_regs;
-// OBSOLETE register int regnum;
-// 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. */
-// 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 : fi->pc;
-// OBSOLETE
-// OBSOLETE examine_prologue (ip, limit, fi->frame, cache_fsr);
-// OBSOLETE
-// OBSOLETE /* Record the addresses at which the local registers are saved.
-// OBSOLETE Strictly speaking, we should only do this for non-leaf procedures,
-// OBSOLETE but no one will ever look at these values if it is a leaf procedure,
-// OBSOLETE since local registers are always caller-saved. */
-// OBSOLETE
-// OBSOLETE next_addr = (CORE_ADDR) fi->frame;
-// OBSOLETE saved_regs = cache_fsr->regs;
-// OBSOLETE for (regnum = R0_REGNUM; regnum <= R15_REGNUM; regnum++)
-// OBSOLETE {
-// OBSOLETE *saved_regs++ = next_addr;
-// OBSOLETE next_addr += 4;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE cache_fsr->regs[FP_REGNUM] = cache_fsr->regs[PFP_REGNUM];
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE *fsr = *fi->fsr;
-// OBSOLETE
-// OBSOLETE /* Fetch the value of the sp from memory every time, since it
-// OBSOLETE is conceivable that it has changed since the cache was flushed.
-// OBSOLETE This unfortunately undoes much of the savings from caching the
-// OBSOLETE saved register values. I suggest adding an argument to
-// OBSOLETE get_frame_saved_regs () specifying the register number we're
-// OBSOLETE interested in (or -1 for all registers). This would be passed
-// OBSOLETE through to FRAME_FIND_SAVED_REGS (), permitting more efficient
-// OBSOLETE computation of saved register addresses (e.g., on the i960,
-// OBSOLETE we don't have to examine the prologue to find local registers).
-// OBSOLETE -- markf@wrs.com
-// OBSOLETE FIXME, we don't need to refetch this, since the cache is cleared
-// OBSOLETE every time the child process is restarted. If GDB itself
-// OBSOLETE modifies SP, it has to clear the cache by hand (does it?). -gnu */
-// OBSOLETE
-// OBSOLETE fsr->regs[SP_REGNUM] = read_memory_integer (fsr->regs[SP_REGNUM], 4);
-// 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, int must_be_correct)
-// OBSOLETE {
-// OBSOLETE struct frame_saved_regs fsr;
-// OBSOLETE CORE_ADDR ap;
-// OBSOLETE
-// OBSOLETE /* If g14 was saved in the frame by the function prologue code, return
-// OBSOLETE the saved value. If the frame is current and we are being sloppy,
-// OBSOLETE return the value of g14. Otherwise, return zero. */
-// OBSOLETE
-// OBSOLETE get_frame_saved_regs (fi, &fsr);
-// OBSOLETE if (fsr.regs[G14_REGNUM])
-// OBSOLETE ap = read_memory_integer (fsr.regs[G14_REGNUM], 4);
-// OBSOLETE else
-// OBSOLETE {
-// OBSOLETE if (must_be_correct)
-// OBSOLETE return 0; /* Don't cache this result */
-// OBSOLETE if (get_next_frame (fi))
-// OBSOLETE ap = 0;
-// OBSOLETE else
-// OBSOLETE ap = read_register (G14_REGNUM);
-// OBSOLETE if (ap == 0)
-// OBSOLETE ap = fi->frame;
-// OBSOLETE }
-// OBSOLETE fi->arg_pointer = ap; /* Cache it for next time */
-// OBSOLETE return ap;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Return the address of the return struct for the frame
-// OBSOLETE described by FI. Returns 0 if the address is unknown. */
-// OBSOLETE
-// OBSOLETE CORE_ADDR
-// OBSOLETE frame_struct_result_address (struct frame_info *fi)
-// OBSOLETE {
-// OBSOLETE struct frame_saved_regs fsr;
-// OBSOLETE CORE_ADDR ap;
-// OBSOLETE
-// OBSOLETE /* If the frame is non-current, check to see if g14 was saved in the
-// OBSOLETE frame by the function prologue code; return the saved value if so,
-// OBSOLETE zero otherwise. If the frame is current, return the value of g14.
-// OBSOLETE
-// OBSOLETE FIXME, shouldn't this use the saved value as long as we are past
-// OBSOLETE the function prologue, and only use the current value if we have
-// OBSOLETE no saved value and are at TOS? -- gnu@cygnus.com */
-// OBSOLETE
-// OBSOLETE if (get_next_frame (fi))
-// OBSOLETE {
-// OBSOLETE get_frame_saved_regs (fi, &fsr);
-// OBSOLETE if (fsr.regs[G13_REGNUM])
-// OBSOLETE ap = read_memory_integer (fsr.regs[G13_REGNUM], 4);
-// OBSOLETE else
-// OBSOLETE ap = 0;
-// OBSOLETE }
-// OBSOLETE else
-// OBSOLETE ap = read_register (G13_REGNUM);
-// OBSOLETE
-// OBSOLETE return ap;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Return address to which the currently executing leafproc will return,
-// OBSOLETE or 0 if IP, the value of the instruction pointer from the currently
-// OBSOLETE executing function, is not in a leafproc (or if we can't tell if it
-// OBSOLETE is).
-// OBSOLETE
-// OBSOLETE Do this by finding the starting address of the routine in which IP lies.
-// OBSOLETE If the instruction there is "mov g14, gx" (where x is in [0,7]), this
-// OBSOLETE is a leafproc and the return address is in register gx. Well, this is
-// OBSOLETE true unless the return address points at a RET instruction in the current
-// OBSOLETE procedure, which indicates that we have a 'dual entry' routine that
-// OBSOLETE has been entered through the CALL entry point. */
-// OBSOLETE
-// OBSOLETE CORE_ADDR
-// OBSOLETE leafproc_return (CORE_ADDR ip)
-// OBSOLETE {
-// OBSOLETE register struct minimal_symbol *msymbol;
-// OBSOLETE char *p;
-// OBSOLETE int dst;
-// OBSOLETE unsigned int insn1, insn2;
-// OBSOLETE CORE_ADDR return_addr;
-// OBSOLETE
-// OBSOLETE if ((msymbol = lookup_minimal_symbol_by_pc (ip)) != NULL)
-// OBSOLETE {
-// OBSOLETE if ((p = strchr (SYMBOL_NAME (msymbol), '.')) && STREQ (p, ".lf"))
-// OBSOLETE {
-// OBSOLETE if (next_insn (SYMBOL_VALUE_ADDRESS (msymbol), &insn1, &insn2)
-// OBSOLETE && (insn1 & 0xff87ffff) == 0x5c80161e /* mov g14, gx */
-// OBSOLETE && (dst = REG_SRCDST (insn1)) <= G0_REGNUM + 7)
-// OBSOLETE {
-// OBSOLETE /* Get the return address. If the "mov g14, gx"
-// OBSOLETE instruction hasn't been executed yet, read
-// OBSOLETE the return address from g14; otherwise, read it
-// OBSOLETE from the register into which g14 was moved. */
-// OBSOLETE
-// OBSOLETE return_addr =
-// OBSOLETE read_register ((ip == SYMBOL_VALUE_ADDRESS (msymbol))
-// OBSOLETE ? G14_REGNUM : dst);
-// OBSOLETE
-// OBSOLETE /* We know we are in a leaf procedure, but we don't know
-// OBSOLETE whether the caller actually did a "bal" to the ".lf"
-// OBSOLETE entry point, or a normal "call" to the non-leaf entry
-// OBSOLETE point one instruction before. In the latter case, the
-// OBSOLETE return address will be the address of a "ret"
-// OBSOLETE instruction within the procedure itself. We test for
-// OBSOLETE this below. */
-// OBSOLETE
-// OBSOLETE if (!next_insn (return_addr, &insn1, &insn2)
-// OBSOLETE || (insn1 & 0xff000000) != 0xa000000 /* ret */
-// OBSOLETE || lookup_minimal_symbol_by_pc (return_addr) != msymbol)
-// OBSOLETE return (return_addr);
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE return (0);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Immediately after a function call, return the saved pc.
-// OBSOLETE Can't 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 On the i960, the frame *is* set up immediately after the call,
-// OBSOLETE unless the function is a leaf procedure. */
-// OBSOLETE
-// OBSOLETE CORE_ADDR
-// OBSOLETE saved_pc_after_call (struct frame_info *frame)
-// OBSOLETE {
-// OBSOLETE CORE_ADDR saved_pc;
-// OBSOLETE
-// OBSOLETE saved_pc = leafproc_return (get_frame_pc (frame));
-// OBSOLETE if (!saved_pc)
-// OBSOLETE saved_pc = FRAME_SAVED_PC (frame);
-// OBSOLETE
-// OBSOLETE return saved_pc;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Discard from the stack the innermost frame,
-// OBSOLETE restoring all saved registers. */
-// OBSOLETE
-// OBSOLETE void
-// OBSOLETE i960_pop_frame (void)
-// OBSOLETE {
-// OBSOLETE register struct frame_info *current_fi, *prev_fi;
-// OBSOLETE register int i;
-// OBSOLETE CORE_ADDR save_addr;
-// OBSOLETE CORE_ADDR leaf_return_addr;
-// OBSOLETE struct frame_saved_regs fsr;
-// OBSOLETE char local_regs_buf[16 * 4];
-// OBSOLETE
-// OBSOLETE current_fi = get_current_frame ();
-// OBSOLETE
-// OBSOLETE /* First, undo what the hardware does when we return.
-// OBSOLETE If this is a non-leaf procedure, restore local registers from
-// OBSOLETE the save area in the calling frame. Otherwise, load the return
-// OBSOLETE address obtained from leafproc_return () into the rip. */
-// OBSOLETE
-// OBSOLETE leaf_return_addr = leafproc_return (current_fi->pc);
-// OBSOLETE if (!leaf_return_addr)
-// OBSOLETE {
-// OBSOLETE /* Non-leaf procedure. Restore local registers, incl IP. */
-// OBSOLETE prev_fi = get_prev_frame (current_fi);
-// OBSOLETE read_memory (prev_fi->frame, local_regs_buf, sizeof (local_regs_buf));
-// OBSOLETE write_register_bytes (REGISTER_BYTE (R0_REGNUM), local_regs_buf,
-// OBSOLETE sizeof (local_regs_buf));
-// OBSOLETE
-// OBSOLETE /* Restore frame pointer. */
-// OBSOLETE write_register (FP_REGNUM, prev_fi->frame);
-// OBSOLETE }
-// OBSOLETE else
-// OBSOLETE {
-// OBSOLETE /* Leaf procedure. Just restore the return address into the IP. */
-// OBSOLETE write_register (RIP_REGNUM, leaf_return_addr);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Now restore any global regs that the current function had saved. */
-// OBSOLETE get_frame_saved_regs (current_fi, &fsr);
-// OBSOLETE for (i = G0_REGNUM; i < G14_REGNUM; i++)
-// OBSOLETE {
-// OBSOLETE save_addr = fsr.regs[i];
-// OBSOLETE if (save_addr != 0)
-// OBSOLETE write_register (i, read_memory_integer (save_addr, 4));
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Flush the frame cache, create a frame for the new innermost frame,
-// OBSOLETE and make it the current frame. */
-// OBSOLETE
-// OBSOLETE flush_cached_frames ();
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Given a 960 stop code (fault or trace), return the signal which
-// OBSOLETE corresponds. */
-// OBSOLETE
-// OBSOLETE enum target_signal
-// OBSOLETE i960_fault_to_signal (int fault)
-// OBSOLETE {
-// OBSOLETE switch (fault)
-// OBSOLETE {
-// OBSOLETE case 0:
-// OBSOLETE return TARGET_SIGNAL_BUS; /* parallel fault */
-// OBSOLETE case 1:
-// OBSOLETE return TARGET_SIGNAL_UNKNOWN;
-// OBSOLETE case 2:
-// OBSOLETE return TARGET_SIGNAL_ILL; /* operation fault */
-// OBSOLETE case 3:
-// OBSOLETE return TARGET_SIGNAL_FPE; /* arithmetic fault */
-// OBSOLETE case 4:
-// OBSOLETE return TARGET_SIGNAL_FPE; /* floating point fault */
-// OBSOLETE
-// OBSOLETE /* constraint fault. This appears not to distinguish between
-// OBSOLETE a range constraint fault (which should be SIGFPE) and a privileged
-// OBSOLETE fault (which should be SIGILL). */
-// OBSOLETE case 5:
-// OBSOLETE return TARGET_SIGNAL_ILL;
-// OBSOLETE
-// OBSOLETE case 6:
-// OBSOLETE return TARGET_SIGNAL_SEGV; /* virtual memory fault */
-// OBSOLETE
-// OBSOLETE /* protection fault. This is for an out-of-range argument to
-// OBSOLETE "calls". I guess it also could be SIGILL. */
-// OBSOLETE case 7:
-// OBSOLETE return TARGET_SIGNAL_SEGV;
-// OBSOLETE
-// OBSOLETE case 8:
-// OBSOLETE return TARGET_SIGNAL_BUS; /* machine fault */
-// OBSOLETE case 9:
-// OBSOLETE return TARGET_SIGNAL_BUS; /* structural fault */
-// OBSOLETE case 0xa:
-// OBSOLETE return TARGET_SIGNAL_ILL; /* type fault */
-// OBSOLETE case 0xb:
-// OBSOLETE return TARGET_SIGNAL_UNKNOWN; /* reserved fault */
-// OBSOLETE case 0xc:
-// OBSOLETE return TARGET_SIGNAL_BUS; /* process fault */
-// OBSOLETE case 0xd:
-// OBSOLETE return TARGET_SIGNAL_SEGV; /* descriptor fault */
-// OBSOLETE case 0xe:
-// OBSOLETE return TARGET_SIGNAL_BUS; /* event fault */
-// OBSOLETE case 0xf:
-// OBSOLETE return TARGET_SIGNAL_UNKNOWN; /* reserved fault */
-// OBSOLETE case 0x10:
-// OBSOLETE return TARGET_SIGNAL_TRAP; /* single-step trace */
-// OBSOLETE case 0x11:
-// OBSOLETE return TARGET_SIGNAL_TRAP; /* branch trace */
-// OBSOLETE case 0x12:
-// OBSOLETE return TARGET_SIGNAL_TRAP; /* call trace */
-// OBSOLETE case 0x13:
-// OBSOLETE return TARGET_SIGNAL_TRAP; /* return trace */
-// OBSOLETE case 0x14:
-// OBSOLETE return TARGET_SIGNAL_TRAP; /* pre-return trace */
-// OBSOLETE case 0x15:
-// OBSOLETE return TARGET_SIGNAL_TRAP; /* supervisor call trace */
-// OBSOLETE case 0x16:
-// OBSOLETE return TARGET_SIGNAL_TRAP; /* breakpoint trace */
-// OBSOLETE default:
-// OBSOLETE return TARGET_SIGNAL_UNKNOWN;
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /****************************************/
-// OBSOLETE /* MEM format */
-// OBSOLETE /****************************************/
-// OBSOLETE
-// OBSOLETE struct tabent
-// OBSOLETE {
-// OBSOLETE char *name;
-// OBSOLETE char numops;
-// OBSOLETE };
-// OBSOLETE
-// OBSOLETE /* Return instruction length, either 4 or 8. When NOPRINT is non-zero
-// OBSOLETE (TRUE), don't output any text. (Actually, as implemented, if NOPRINT
-// OBSOLETE is 0, abort() is called.) */
-// OBSOLETE
-// OBSOLETE static int
-// OBSOLETE mem (unsigned long memaddr, unsigned long word1, unsigned long word2,
-// OBSOLETE int noprint)
-// OBSOLETE {
-// OBSOLETE int i, j;
-// OBSOLETE int len;
-// OBSOLETE int mode;
-// OBSOLETE int offset;
-// OBSOLETE const char *reg1, *reg2, *reg3;
-// OBSOLETE
-// OBSOLETE /* This lookup table is too sparse to make it worth typing in, but not
-// OBSOLETE * so large as to make a sparse array necessary. We allocate the
-// OBSOLETE * table at runtime, initialize all entries to empty, and copy the
-// OBSOLETE * real ones in from an initialization table.
-// OBSOLETE *
-// OBSOLETE * NOTE: In this table, the meaning of 'numops' is:
-// OBSOLETE * 1: single operand
-// OBSOLETE * 2: 2 operands, load instruction
-// OBSOLETE * -2: 2 operands, store instruction
-// OBSOLETE */
-// OBSOLETE static struct tabent *mem_tab = NULL;
-// OBSOLETE /* Opcodes of 0x8X, 9X, aX, bX, and cX must be in the table. */
-// OBSOLETE #define MEM_MIN 0x80
-// OBSOLETE #define MEM_MAX 0xcf
-// OBSOLETE #define MEM_SIZ ((MEM_MAX-MEM_MIN+1) * sizeof(struct tabent))
-// OBSOLETE
-// OBSOLETE static struct
-// OBSOLETE {
-// OBSOLETE int opcode;
-// OBSOLETE char *name;
-// OBSOLETE char numops;
-// OBSOLETE }
-// OBSOLETE mem_init[] =
-// OBSOLETE {
-// OBSOLETE 0x80, "ldob", 2,
-// OBSOLETE 0x82, "stob", -2,
-// OBSOLETE 0x84, "bx", 1,
-// OBSOLETE 0x85, "balx", 2,
-// OBSOLETE 0x86, "callx", 1,
-// OBSOLETE 0x88, "ldos", 2,
-// OBSOLETE 0x8a, "stos", -2,
-// OBSOLETE 0x8c, "lda", 2,
-// OBSOLETE 0x90, "ld", 2,
-// OBSOLETE 0x92, "st", -2,
-// OBSOLETE 0x98, "ldl", 2,
-// OBSOLETE 0x9a, "stl", -2,
-// OBSOLETE 0xa0, "ldt", 2,
-// OBSOLETE 0xa2, "stt", -2,
-// OBSOLETE 0xb0, "ldq", 2,
-// OBSOLETE 0xb2, "stq", -2,
-// OBSOLETE 0xc0, "ldib", 2,
-// OBSOLETE 0xc2, "stib", -2,
-// OBSOLETE 0xc8, "ldis", 2,
-// OBSOLETE 0xca, "stis", -2,
-// OBSOLETE 0, NULL, 0
-// OBSOLETE };
-// OBSOLETE
-// OBSOLETE if (mem_tab == NULL)
-// OBSOLETE {
-// OBSOLETE mem_tab = (struct tabent *) xmalloc (MEM_SIZ);
-// OBSOLETE memset (mem_tab, '\0', MEM_SIZ);
-// OBSOLETE for (i = 0; mem_init[i].opcode != 0; i++)
-// OBSOLETE {
-// OBSOLETE j = mem_init[i].opcode - MEM_MIN;
-// OBSOLETE mem_tab[j].name = mem_init[i].name;
-// OBSOLETE mem_tab[j].numops = mem_init[i].numops;
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE i = ((word1 >> 24) & 0xff) - MEM_MIN;
-// OBSOLETE mode = (word1 >> 10) & 0xf;
-// OBSOLETE
-// OBSOLETE if ((mem_tab[i].name != NULL) /* Valid instruction */
-// OBSOLETE && ((mode == 5) || (mode >= 12)))
-// OBSOLETE { /* With 32-bit displacement */
-// OBSOLETE len = 8;
-// OBSOLETE }
-// OBSOLETE else
-// OBSOLETE {
-// OBSOLETE len = 4;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE if (noprint)
-// OBSOLETE {
-// OBSOLETE return len;
-// OBSOLETE }
-// OBSOLETE internal_error (__FILE__, __LINE__, "failed internal consistency check");
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Read the i960 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 first word of the instruction
-// OBSOLETE is stored at 'pword1', and the second word, if any, is stored at
-// OBSOLETE 'pword2'. */
-// OBSOLETE
-// OBSOLETE static CORE_ADDR
-// OBSOLETE next_insn (CORE_ADDR memaddr, unsigned int *pword1, unsigned int *pword2)
-// OBSOLETE {
-// OBSOLETE int len;
-// OBSOLETE char buf[8];
-// OBSOLETE
-// OBSOLETE /* Read the two (potential) words of the instruction at once,
-// OBSOLETE to eliminate the overhead of two calls to read_memory ().
-// OBSOLETE FIXME: Loses if the first one is readable but the second is not
-// OBSOLETE (e.g. last word of the segment). */
-// OBSOLETE
-// OBSOLETE read_memory (memaddr, buf, 8);
-// OBSOLETE *pword1 = extract_unsigned_integer (buf, 4);
-// OBSOLETE *pword2 = extract_unsigned_integer (buf + 4, 4);
-// OBSOLETE
-// OBSOLETE /* Divide instruction set into classes based on high 4 bits of opcode */
-// OBSOLETE
-// OBSOLETE switch ((*pword1 >> 28) & 0xf)
-// OBSOLETE {
-// OBSOLETE case 0x0:
-// OBSOLETE case 0x1: /* ctrl */
-// OBSOLETE
-// OBSOLETE case 0x2:
-// OBSOLETE case 0x3: /* cobr */
-// OBSOLETE
-// OBSOLETE case 0x5:
-// OBSOLETE case 0x6:
-// OBSOLETE case 0x7: /* reg */
-// OBSOLETE len = 4;
-// OBSOLETE break;
-// OBSOLETE
-// OBSOLETE case 0x8:
-// OBSOLETE case 0x9:
-// OBSOLETE case 0xa:
-// OBSOLETE case 0xb:
-// OBSOLETE case 0xc:
-// OBSOLETE len = mem (memaddr, *pword1, *pword2, 1);
-// OBSOLETE break;
-// OBSOLETE
-// OBSOLETE default: /* invalid instruction */
-// OBSOLETE len = 0;
-// OBSOLETE break;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE if (len)
-// OBSOLETE return memaddr + len;
-// OBSOLETE else
-// OBSOLETE return 0;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* 'start_frame' is a variable in the MON960 runtime startup routine
-// OBSOLETE that contains the frame pointer of the 'start' routine (the routine
-// OBSOLETE that calls 'main'). By reading its contents out of remote memory,
-// OBSOLETE we can tell where the frame chain ends: backtraces should halt before
-// OBSOLETE they display this frame. */
-// OBSOLETE
-// OBSOLETE int
-// OBSOLETE mon960_frame_chain_valid (CORE_ADDR chain, struct frame_info *curframe)
-// OBSOLETE {
-// OBSOLETE struct symbol *sym;
-// OBSOLETE struct minimal_symbol *msymbol;
-// OBSOLETE
-// OBSOLETE /* crtmon960.o is an assembler module that is assumed to be linked
-// OBSOLETE * first in an i80960 executable. It contains the true entry point;
-// OBSOLETE * it performs startup up initialization and then calls 'main'.
-// OBSOLETE *
-// OBSOLETE * 'sf' is the name of a variable in crtmon960.o that is set
-// OBSOLETE * during startup to the address of the first frame.
-// OBSOLETE *
-// OBSOLETE * 'a' is the address of that variable in 80960 memory.
-// OBSOLETE */
-// OBSOLETE static char sf[] = "start_frame";
-// OBSOLETE CORE_ADDR a;
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE chain &= ~0x3f; /* Zero low 6 bits because previous frame pointers
-// OBSOLETE contain return status info in them. */
-// OBSOLETE if (chain == 0)
-// OBSOLETE {
-// OBSOLETE return 0;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE sym = lookup_symbol (sf, 0, VAR_NAMESPACE, (int *) NULL,
-// OBSOLETE (struct symtab **) NULL);
-// OBSOLETE if (sym != 0)
-// OBSOLETE {
-// OBSOLETE a = SYMBOL_VALUE (sym);
-// OBSOLETE }
-// OBSOLETE else
-// OBSOLETE {
-// OBSOLETE msymbol = lookup_minimal_symbol (sf, NULL, NULL);
-// OBSOLETE if (msymbol == NULL)
-// OBSOLETE return 0;
-// OBSOLETE a = SYMBOL_VALUE_ADDRESS (msymbol);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE return (chain != read_memory_integer (a, 4));
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE void
-// OBSOLETE _initialize_i960_tdep (void)
-// OBSOLETE {
-// OBSOLETE check_host ();
-// OBSOLETE
-// OBSOLETE tm_print_insn = print_insn_i960;
-// OBSOLETE }
+++ /dev/null
-// 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 *) ®isters[REGISTER_BYTE (regi)];
-// OBSOLETE
-// OBSOLETE if ((regno == -1) || (regno == SXIP_REGNUM))
-// OBSOLETE *(regp + R_XIP) = *(int *) ®isters[REGISTER_BYTE (SXIP_REGNUM)];
-// OBSOLETE if ((regno == -1) || (regno == SNIP_REGNUM))
-// OBSOLETE *(regp + R_NIP) = *(int *) ®isters[REGISTER_BYTE (SNIP_REGNUM)];
-// OBSOLETE if ((regno == -1) || (regno == SFIP_REGNUM))
-// OBSOLETE *(regp + R_FIP) = *(int *) ®isters[REGISTER_BYTE (SFIP_REGNUM)];
-// OBSOLETE if ((regno == -1) || (regno == PSR_REGNUM))
-// OBSOLETE *(regp + R_PSR) = *(int *) ®isters[REGISTER_BYTE (PSR_REGNUM)];
-// OBSOLETE if ((regno == -1) || (regno == FPSR_REGNUM))
-// OBSOLETE *(regp + R_FPSR) = *(int *) ®isters[REGISTER_BYTE (FPSR_REGNUM)];
-// OBSOLETE if ((regno == -1) || (regno == FPCR_REGNUM))
-// OBSOLETE *(regp + R_FPCR) = *(int *) ®isters[REGISTER_BYTE (FPCR_REGNUM)];
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE #endif /* USE_PROC_FS */
+++ /dev/null
-// 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 \f
-// 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 }
+++ /dev/null
-// OBSOLETE /* Read os9/os9k symbol tables and convert to internal format, for GDB.
-// OBSOLETE Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995,
-// OBSOLETE 1996, 1997, 1998, 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 /* This module provides three functions: os9k_symfile_init,
-// OBSOLETE which initializes to read a symbol file; os9k_new_init, which
-// OBSOLETE discards existing cached information when all symbols are being
-// OBSOLETE discarded; and os9k_symfile_read, which reads a symbol table
-// OBSOLETE from a file.
-// OBSOLETE
-// OBSOLETE os9k_symfile_read only does the minimum work necessary for letting the
-// OBSOLETE user "name" things symbolically; it does not read the entire symtab.
-// OBSOLETE Instead, it reads the external and static symbols and puts them in partial
-// OBSOLETE symbol tables. When more extensive information is requested of a
-// OBSOLETE file, the corresponding partial symbol table is mutated into a full
-// OBSOLETE fledged symbol table by going back and reading the symbols
-// OBSOLETE for real. os9k_psymtab_to_symtab() is the function that does this */
-// OBSOLETE
-// OBSOLETE #include "defs.h"
-// OBSOLETE #include "gdb_string.h"
-// OBSOLETE #include "gdb_assert.h"
-// OBSOLETE #include <stdio.h>
-// OBSOLETE
-// OBSOLETE #if defined(USG) || defined(__CYGNUSCLIB__)
-// OBSOLETE #include <sys/types.h>
-// OBSOLETE #include <fcntl.h>
-// OBSOLETE #endif
-// OBSOLETE
-// OBSOLETE #include "obstack.h"
-// OBSOLETE #include "gdb_stat.h"
-// OBSOLETE #include "symtab.h"
-// OBSOLETE #include "breakpoint.h"
-// OBSOLETE #include "command.h"
-// OBSOLETE #include "target.h"
-// OBSOLETE #include "gdbcore.h" /* for bfd stuff */
-// OBSOLETE #include "libaout.h" /* FIXME Secret internal BFD stuff for a.out */
-// OBSOLETE #include "symfile.h"
-// OBSOLETE #include "objfiles.h"
-// OBSOLETE #include "buildsym.h"
-// OBSOLETE #include "gdb-stabs.h"
-// OBSOLETE #include "demangle.h"
-// OBSOLETE #include "language.h" /* Needed inside partial-stab.h */
-// OBSOLETE #include "complaints.h"
-// OBSOLETE #include "os9k.h"
-// OBSOLETE #include "stabsread.h"
-// OBSOLETE
-// OBSOLETE extern void _initialize_os9kread (void);
-// OBSOLETE
-// OBSOLETE /* Each partial symbol table entry contains a pointer to private data for the
-// OBSOLETE read_symtab() function to use when expanding a partial symbol table entry
-// OBSOLETE to a full symbol table entry.
-// OBSOLETE
-// OBSOLETE For dbxread this structure contains the offset within the file symbol table
-// OBSOLETE of first local symbol for this file, and count of the section
-// OBSOLETE of the symbol table devoted to this file's symbols (actually, the section
-// OBSOLETE bracketed may contain more than just this file's symbols). It also contains
-// OBSOLETE further information needed to locate the symbols if they are in an ELF file.
-// OBSOLETE
-// OBSOLETE If ldsymcnt is 0, the only reason for this thing's existence is the
-// OBSOLETE dependency list. Nothing else will happen when it is read in. */
-// OBSOLETE
-// OBSOLETE #define LDSYMOFF(p) (((struct symloc *)((p)->read_symtab_private))->ldsymoff)
-// OBSOLETE #define LDSYMCNT(p) (((struct symloc *)((p)->read_symtab_private))->ldsymnum)
-// OBSOLETE
-// OBSOLETE struct symloc
-// OBSOLETE {
-// OBSOLETE int ldsymoff;
-// OBSOLETE int ldsymnum;
-// OBSOLETE };
-// OBSOLETE
-// OBSOLETE /* Remember what we deduced to be the source language of this psymtab. */
-// OBSOLETE static enum language psymtab_language = language_unknown;
-// OBSOLETE
-// OBSOLETE /* keep partial symbol table file nested depth */
-// OBSOLETE static int psymfile_depth = 0;
-// OBSOLETE
-// OBSOLETE /* keep symbol table file nested depth */
-// OBSOLETE static int symfile_depth = 0;
-// OBSOLETE
-// OBSOLETE extern int previous_stab_code;
-// OBSOLETE
-// OBSOLETE /* Name of last function encountered. Used in Solaris to approximate
-// OBSOLETE object file boundaries. */
-// OBSOLETE static char *last_function_name;
-// OBSOLETE
-// OBSOLETE /* Complaints about the symbols we have encountered. */
-// OBSOLETE extern struct complaint lbrac_complaint;
-// OBSOLETE
-// OBSOLETE extern struct complaint unknown_symtype_complaint;
-// OBSOLETE
-// OBSOLETE extern struct complaint unknown_symchar_complaint;
-// OBSOLETE
-// OBSOLETE extern struct complaint lbrac_rbrac_complaint;
-// OBSOLETE
-// OBSOLETE extern struct complaint repeated_header_complaint;
-// OBSOLETE
-// OBSOLETE extern struct complaint repeated_header_name_complaint;
-// OBSOLETE
-// OBSOLETE #if 0
-// OBSOLETE static struct complaint lbrac_unmatched_complaint =
-// OBSOLETE {"unmatched Increment Block Entry before symtab pos %d", 0, 0};
-// OBSOLETE
-// OBSOLETE static struct complaint lbrac_mismatch_complaint =
-// OBSOLETE {"IBE/IDE symbol mismatch at symtab pos %d", 0, 0};
-// OBSOLETE #endif
-// OBSOLETE \f
-// OBSOLETE /* Local function prototypes */
-// OBSOLETE
-// OBSOLETE static void read_minimal_symbols (struct objfile *);
-// OBSOLETE
-// OBSOLETE static void os9k_read_ofile_symtab (struct partial_symtab *);
-// OBSOLETE
-// OBSOLETE static void os9k_psymtab_to_symtab (struct partial_symtab *);
-// OBSOLETE
-// OBSOLETE static void os9k_psymtab_to_symtab_1 (struct partial_symtab *);
-// OBSOLETE
-// OBSOLETE static void read_os9k_psymtab (struct objfile *, CORE_ADDR, int);
-// OBSOLETE
-// OBSOLETE static int fill_sym (FILE *, bfd *);
-// OBSOLETE
-// OBSOLETE static void os9k_symfile_init (struct objfile *);
-// OBSOLETE
-// OBSOLETE static void os9k_new_init (struct objfile *);
-// OBSOLETE
-// OBSOLETE static void os9k_symfile_read (struct objfile *, int);
-// OBSOLETE
-// OBSOLETE static void os9k_symfile_finish (struct objfile *);
-// OBSOLETE
-// OBSOLETE static void os9k_process_one_symbol (int, int, CORE_ADDR, char *,
-// OBSOLETE struct section_offsets *,
-// OBSOLETE struct objfile *);
-// OBSOLETE
-// OBSOLETE static struct partial_symtab *os9k_start_psymtab (struct objfile *, char *,
-// OBSOLETE CORE_ADDR, int, int,
-// OBSOLETE struct partial_symbol **,
-// OBSOLETE struct partial_symbol **);
-// OBSOLETE
-// OBSOLETE static struct partial_symtab *os9k_end_psymtab (struct partial_symtab *,
-// OBSOLETE char **, int, int, CORE_ADDR,
-// OBSOLETE struct partial_symtab **,
-// OBSOLETE int);
-// OBSOLETE
-// OBSOLETE static void record_minimal_symbol (char *, CORE_ADDR, int, struct objfile *);
-// OBSOLETE \f
-// OBSOLETE #define HANDLE_RBRAC(val) \
-// OBSOLETE if ((val) > pst->texthigh) pst->texthigh = (val);
-// OBSOLETE
-// OBSOLETE #define SWAP_STBHDR(hdrp, abfd) \
-// OBSOLETE { \
-// OBSOLETE (hdrp)->fmtno = bfd_get_16(abfd, (unsigned char *)&(hdrp)->fmtno); \
-// OBSOLETE (hdrp)->crc = bfd_get_32(abfd, (unsigned char *)&(hdrp)->crc); \
-// OBSOLETE (hdrp)->offset = bfd_get_32(abfd, (unsigned char *)&(hdrp)->offset); \
-// OBSOLETE (hdrp)->nsym = bfd_get_32(abfd, (unsigned char *)&(hdrp)->nsym); \
-// OBSOLETE }
-// OBSOLETE #define SWAP_STBSYM(symp, abfd) \
-// OBSOLETE { \
-// OBSOLETE (symp)->value = bfd_get_32(abfd, (unsigned char *)&(symp)->value); \
-// OBSOLETE (symp)->type = bfd_get_16(abfd, (unsigned char *)&(symp)->type); \
-// OBSOLETE (symp)->stroff = bfd_get_32(abfd, (unsigned char *)&(symp)->stroff); \
-// OBSOLETE }
-// OBSOLETE #define N_DATA 0
-// OBSOLETE #define N_BSS 1
-// OBSOLETE #define N_RDATA 2
-// OBSOLETE #define N_IDATA 3
-// OBSOLETE #define N_TEXT 4
-// OBSOLETE #define N_ABS 6
-// OBSOLETE
-// OBSOLETE static void
-// OBSOLETE record_minimal_symbol (char *name, CORE_ADDR address, int type,
-// OBSOLETE struct objfile *objfile)
-// OBSOLETE {
-// OBSOLETE enum minimal_symbol_type ms_type;
-// OBSOLETE
-// OBSOLETE switch (type)
-// OBSOLETE {
-// OBSOLETE case N_TEXT:
-// OBSOLETE ms_type = mst_text;
-// OBSOLETE address += ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));
-// OBSOLETE break;
-// OBSOLETE case N_DATA:
-// OBSOLETE ms_type = mst_data;
-// OBSOLETE break;
-// OBSOLETE case N_BSS:
-// OBSOLETE ms_type = mst_bss;
-// OBSOLETE break;
-// OBSOLETE case N_RDATA:
-// OBSOLETE ms_type = mst_bss;
-// OBSOLETE break;
-// OBSOLETE case N_IDATA:
-// OBSOLETE ms_type = mst_data;
-// OBSOLETE break;
-// OBSOLETE case N_ABS:
-// OBSOLETE ms_type = mst_abs;
-// OBSOLETE break;
-// OBSOLETE default:
-// OBSOLETE ms_type = mst_unknown;
-// OBSOLETE break;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE prim_record_minimal_symbol (name, address, ms_type, objfile);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* read and process .stb file and store in minimal symbol table */
-// OBSOLETE typedef char mhhdr[80];
-// OBSOLETE struct stbhdr
-// OBSOLETE {
-// OBSOLETE mhhdr comhdr;
-// OBSOLETE char *name;
-// OBSOLETE short fmtno;
-// OBSOLETE int crc;
-// OBSOLETE int offset;
-// OBSOLETE int nsym;
-// OBSOLETE char *pad;
-// OBSOLETE };
-// OBSOLETE struct stbsymbol
-// OBSOLETE {
-// OBSOLETE int value;
-// OBSOLETE short type;
-// OBSOLETE int stroff;
-// OBSOLETE };
-// OBSOLETE #define STBSYMSIZE 10
-// OBSOLETE
-// OBSOLETE static void
-// OBSOLETE read_minimal_symbols (struct objfile *objfile)
-// OBSOLETE {
-// OBSOLETE FILE *fp;
-// OBSOLETE bfd *abfd;
-// OBSOLETE struct stbhdr hdr;
-// OBSOLETE struct stbsymbol sym;
-// OBSOLETE int ch, i, j, off;
-// OBSOLETE char buf[64], buf1[128];
-// OBSOLETE
-// OBSOLETE fp = objfile->auxf1;
-// OBSOLETE if (fp == NULL)
-// OBSOLETE return;
-// OBSOLETE abfd = objfile->obfd;
-// OBSOLETE fread (&hdr.comhdr[0], sizeof (mhhdr), 1, fp);
-// OBSOLETE i = 0;
-// OBSOLETE ch = getc (fp);
-// OBSOLETE while (ch != -1)
-// OBSOLETE {
-// OBSOLETE buf[i] = (char) ch;
-// OBSOLETE i++;
-// OBSOLETE if (ch == 0)
-// OBSOLETE break;
-// OBSOLETE ch = getc (fp);
-// OBSOLETE };
-// OBSOLETE if (i % 2)
-// OBSOLETE ch = getc (fp);
-// OBSOLETE hdr.name = &buf[0];
-// OBSOLETE
-// OBSOLETE fread (&hdr.fmtno, sizeof (hdr.fmtno), 1, fp);
-// OBSOLETE fread (&hdr.crc, sizeof (hdr.crc), 1, fp);
-// OBSOLETE fread (&hdr.offset, sizeof (hdr.offset), 1, fp);
-// OBSOLETE fread (&hdr.nsym, sizeof (hdr.nsym), 1, fp);
-// OBSOLETE SWAP_STBHDR (&hdr, abfd);
-// OBSOLETE
-// OBSOLETE /* read symbols */
-// OBSOLETE init_minimal_symbol_collection ();
-// OBSOLETE off = hdr.offset;
-// OBSOLETE for (i = hdr.nsym; i > 0; i--)
-// OBSOLETE {
-// OBSOLETE fseek (fp, (long) off, 0);
-// OBSOLETE fread (&sym.value, sizeof (sym.value), 1, fp);
-// OBSOLETE fread (&sym.type, sizeof (sym.type), 1, fp);
-// OBSOLETE fread (&sym.stroff, sizeof (sym.stroff), 1, fp);
-// OBSOLETE SWAP_STBSYM (&sym, abfd);
-// OBSOLETE fseek (fp, (long) sym.stroff, 0);
-// OBSOLETE j = 0;
-// OBSOLETE ch = getc (fp);
-// OBSOLETE while (ch != -1)
-// OBSOLETE {
-// OBSOLETE buf1[j] = (char) ch;
-// OBSOLETE j++;
-// OBSOLETE if (ch == 0)
-// OBSOLETE break;
-// OBSOLETE ch = getc (fp);
-// OBSOLETE };
-// OBSOLETE record_minimal_symbol (buf1, sym.value, sym.type & 7, objfile);
-// OBSOLETE off += STBSYMSIZE;
-// OBSOLETE };
-// OBSOLETE install_minimal_symbols (objfile);
-// OBSOLETE return;
-// OBSOLETE }
-// OBSOLETE \f
-// OBSOLETE /* Scan and build partial symbols for a symbol file.
-// OBSOLETE We have been initialized by a call to os9k_symfile_init, which
-// OBSOLETE put all the relevant info into a "struct os9k_symfile_info",
-// OBSOLETE hung off the objfile structure.
-// OBSOLETE
-// OBSOLETE MAINLINE is true if we are reading the main symbol
-// OBSOLETE table (as opposed to a shared lib or dynamically loaded file). */
-// OBSOLETE
-// OBSOLETE static void
-// OBSOLETE os9k_symfile_read (struct objfile *objfile, int mainline)
-// OBSOLETE {
-// OBSOLETE bfd *sym_bfd;
-// OBSOLETE struct cleanup *back_to;
-// OBSOLETE
-// OBSOLETE sym_bfd = objfile->obfd;
-// OBSOLETE /* If we are reinitializing, or if we have never loaded syms yet, init */
-// OBSOLETE if (mainline
-// OBSOLETE || (objfile->global_psymbols.size == 0
-// OBSOLETE && objfile->static_psymbols.size == 0))
-// OBSOLETE init_psymbol_list (objfile, DBX_SYMCOUNT (objfile));
-// OBSOLETE
-// OBSOLETE free_pending_blocks ();
-// OBSOLETE back_to = make_cleanup (really_free_pendings, 0);
-// OBSOLETE
-// OBSOLETE make_cleanup_discard_minimal_symbols ();
-// OBSOLETE read_minimal_symbols (objfile);
-// OBSOLETE
-// OBSOLETE /* Now that the symbol table data of the executable file are all in core,
-// OBSOLETE process them and define symbols accordingly. */
-// OBSOLETE read_os9k_psymtab (objfile,
-// OBSOLETE DBX_TEXT_ADDR (objfile),
-// OBSOLETE DBX_TEXT_SIZE (objfile));
-// OBSOLETE
-// OBSOLETE do_cleanups (back_to);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Initialize anything that needs initializing when a completely new
-// OBSOLETE symbol file is specified (not just adding some symbols from another
-// OBSOLETE file, e.g. a shared library). */
-// OBSOLETE
-// OBSOLETE static void
-// OBSOLETE os9k_new_init (struct objfile *ignore)
-// OBSOLETE {
-// OBSOLETE stabsread_new_init ();
-// OBSOLETE buildsym_new_init ();
-// OBSOLETE psymfile_depth = 0;
-// OBSOLETE /*
-// OBSOLETE init_header_files ();
-// OBSOLETE */
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* os9k_symfile_init ()
-// OBSOLETE It is passed a struct objfile which contains, among other things,
-// OBSOLETE the BFD for the file whose symbols are being read, and a slot for a pointer
-// OBSOLETE to "private data" which we fill with goodies.
-// OBSOLETE
-// OBSOLETE Since BFD doesn't know how to read debug symbols in a format-independent
-// OBSOLETE way (and may never do so...), we have to do it ourselves. We will never
-// OBSOLETE be called unless this is an a.out (or very similar) file.
-// OBSOLETE FIXME, there should be a cleaner peephole into the BFD environment here. */
-// OBSOLETE
-// OBSOLETE static void
-// OBSOLETE os9k_symfile_init (struct objfile *objfile)
-// OBSOLETE {
-// OBSOLETE bfd *sym_bfd = objfile->obfd;
-// OBSOLETE char *name = bfd_get_filename (sym_bfd);
-// OBSOLETE char dbgname[512], stbname[512];
-// OBSOLETE FILE *symfile = 0;
-// OBSOLETE FILE *minfile = 0;
-// OBSOLETE asection *text_sect;
-// OBSOLETE
-// OBSOLETE strcpy (dbgname, name);
-// OBSOLETE strcat (dbgname, ".dbg");
-// OBSOLETE strcpy (stbname, name);
-// OBSOLETE strcat (stbname, ".stb");
-// OBSOLETE
-// OBSOLETE if ((symfile = fopen (dbgname, "r")) == NULL)
-// OBSOLETE {
-// OBSOLETE warning ("Symbol file %s not found", dbgname);
-// OBSOLETE }
-// OBSOLETE objfile->auxf2 = symfile;
-// OBSOLETE
-// OBSOLETE if ((minfile = fopen (stbname, "r")) == NULL)
-// OBSOLETE {
-// OBSOLETE warning ("Symbol file %s not found", stbname);
-// OBSOLETE }
-// OBSOLETE objfile->auxf1 = minfile;
-// OBSOLETE
-// OBSOLETE /* Allocate struct to keep track of the symfile */
-// OBSOLETE objfile->sym_stab_info = (struct dbx_symfile_info *)
-// OBSOLETE xmmalloc (objfile->md, sizeof (struct dbx_symfile_info));
-// OBSOLETE DBX_SYMFILE_INFO (objfile)->stab_section_info = NULL;
-// OBSOLETE
-// OBSOLETE text_sect = bfd_get_section_by_name (sym_bfd, ".text");
-// OBSOLETE if (!text_sect)
-// OBSOLETE error ("Can't find .text section in file");
-// OBSOLETE DBX_TEXT_ADDR (objfile) = bfd_section_vma (sym_bfd, text_sect);
-// OBSOLETE DBX_TEXT_SIZE (objfile) = bfd_section_size (sym_bfd, text_sect);
-// OBSOLETE
-// OBSOLETE DBX_SYMBOL_SIZE (objfile) = 0; /* variable size symbol */
-// OBSOLETE DBX_SYMCOUNT (objfile) = 0; /* used to be bfd_get_symcount(sym_bfd) */
-// OBSOLETE DBX_SYMTAB_OFFSET (objfile) = 0; /* used to be SYMBOL_TABLE_OFFSET */
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Perform any local cleanups required when we are done with a particular
-// OBSOLETE objfile. I.E, we are in the process of discarding all symbol information
-// OBSOLETE for an objfile, freeing up all memory held for it, and unlinking the
-// OBSOLETE objfile struct from the global list of known objfiles. */
-// OBSOLETE
-// OBSOLETE static void
-// OBSOLETE os9k_symfile_finish (struct objfile *objfile)
-// OBSOLETE {
-// OBSOLETE if (objfile->sym_stab_info != NULL)
-// OBSOLETE {
-// OBSOLETE xmfree (objfile->md, objfile->sym_stab_info);
-// OBSOLETE }
-// OBSOLETE /*
-// OBSOLETE free_header_files ();
-// OBSOLETE */
-// OBSOLETE }
-// OBSOLETE \f
-// OBSOLETE
-// OBSOLETE struct st_dbghdr
-// OBSOLETE {
-// OBSOLETE int sync;
-// OBSOLETE short rev;
-// OBSOLETE int crc;
-// OBSOLETE short os;
-// OBSOLETE short cpu;
-// OBSOLETE };
-// OBSOLETE #define SYNC (int)0xefbefeca
-// OBSOLETE
-// OBSOLETE #define SWAP_DBGHDR(hdrp, abfd) \
-// OBSOLETE { \
-// OBSOLETE (hdrp)->sync = bfd_get_32(abfd, (unsigned char *)&(hdrp)->sync); \
-// OBSOLETE (hdrp)->rev = bfd_get_16(abfd, (unsigned char *)&(hdrp)->rev); \
-// OBSOLETE (hdrp)->crc = bfd_get_32(abfd, (unsigned char *)&(hdrp)->crc); \
-// OBSOLETE (hdrp)->os = bfd_get_16(abfd, (unsigned char *)&(hdrp)->os); \
-// OBSOLETE (hdrp)->cpu = bfd_get_16(abfd, (unsigned char *)&(hdrp)->cpu); \
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE #define N_SYM_CMPLR 0
-// OBSOLETE #define N_SYM_SLINE 1
-// OBSOLETE #define N_SYM_SYM 2
-// OBSOLETE #define N_SYM_LBRAC 3
-// OBSOLETE #define N_SYM_RBRAC 4
-// OBSOLETE #define N_SYM_SE 5
-// OBSOLETE
-// OBSOLETE struct internal_symstruct
-// OBSOLETE {
-// OBSOLETE short n_type;
-// OBSOLETE short n_desc;
-// OBSOLETE long n_value;
-// OBSOLETE char *n_strx;
-// OBSOLETE };
-// OBSOLETE static struct internal_symstruct symbol;
-// OBSOLETE static struct internal_symstruct *symbuf = &symbol;
-// OBSOLETE static char strbuf[4096];
-// OBSOLETE static struct st_dbghdr dbghdr;
-// OBSOLETE static short cmplrid;
-// OBSOLETE
-// OBSOLETE #define VER_PRE_ULTRAC ((short)4)
-// OBSOLETE #define VER_ULTRAC ((short)5)
-// OBSOLETE
-// OBSOLETE static int
-// OBSOLETE fill_sym (FILE *dbg_file, bfd *abfd)
-// OBSOLETE {
-// OBSOLETE short si, nmask;
-// OBSOLETE long li;
-// OBSOLETE int ii;
-// OBSOLETE char *p;
-// OBSOLETE
-// OBSOLETE int nbytes = fread (&si, sizeof (si), 1, dbg_file);
-// OBSOLETE if (nbytes == 0)
-// OBSOLETE return 0;
-// OBSOLETE if (nbytes < 0)
-// OBSOLETE perror_with_name ("reading .dbg file.");
-// OBSOLETE symbuf->n_desc = 0;
-// OBSOLETE symbuf->n_value = 0;
-// OBSOLETE symbuf->n_strx = NULL;
-// OBSOLETE symbuf->n_type = bfd_get_16 (abfd, (unsigned char *) &si);
-// OBSOLETE symbuf->n_type = 0xf & symbuf->n_type;
-// OBSOLETE switch (symbuf->n_type)
-// OBSOLETE {
-// OBSOLETE case N_SYM_CMPLR:
-// OBSOLETE fread (&si, sizeof (si), 1, dbg_file);
-// OBSOLETE symbuf->n_desc = bfd_get_16 (abfd, (unsigned char *) &si);
-// OBSOLETE cmplrid = symbuf->n_desc & 0xff;
-// OBSOLETE break;
-// OBSOLETE case N_SYM_SLINE:
-// OBSOLETE fread (&li, sizeof (li), 1, dbg_file);
-// OBSOLETE symbuf->n_value = bfd_get_32 (abfd, (unsigned char *) &li);
-// OBSOLETE fread (&li, sizeof (li), 1, dbg_file);
-// OBSOLETE li = bfd_get_32 (abfd, (unsigned char *) &li);
-// OBSOLETE symbuf->n_strx = (char *) (li >> 12);
-// OBSOLETE symbuf->n_desc = li & 0xfff;
-// OBSOLETE break;
-// OBSOLETE case N_SYM_SYM:
-// OBSOLETE fread (&li, sizeof (li), 1, dbg_file);
-// OBSOLETE symbuf->n_value = bfd_get_32 (abfd, (unsigned char *) &li);
-// OBSOLETE si = 0;
-// OBSOLETE do
-// OBSOLETE {
-// OBSOLETE ii = getc (dbg_file);
-// OBSOLETE strbuf[si++] = (char) ii;
-// OBSOLETE }
-// OBSOLETE while (ii != 0 || si % 2 != 0);
-// OBSOLETE symbuf->n_strx = strbuf;
-// OBSOLETE p = (char *) strchr (strbuf, ':');
-// OBSOLETE if (!p)
-// OBSOLETE break;
-// OBSOLETE if ((p[1] == 'F' || p[1] == 'f') && cmplrid == VER_PRE_ULTRAC)
-// OBSOLETE {
-// OBSOLETE fread (&si, sizeof (si), 1, dbg_file);
-// OBSOLETE nmask = bfd_get_16 (abfd, (unsigned char *) &si);
-// OBSOLETE for (ii = 0; ii < nmask; ii++)
-// OBSOLETE fread (&si, sizeof (si), 1, dbg_file);
-// OBSOLETE }
-// OBSOLETE break;
-// OBSOLETE case N_SYM_LBRAC:
-// OBSOLETE fread (&li, sizeof (li), 1, dbg_file);
-// OBSOLETE symbuf->n_value = bfd_get_32 (abfd, (unsigned char *) &li);
-// OBSOLETE break;
-// OBSOLETE case N_SYM_RBRAC:
-// OBSOLETE fread (&li, sizeof (li), 1, dbg_file);
-// OBSOLETE symbuf->n_value = bfd_get_32 (abfd, (unsigned char *) &li);
-// OBSOLETE break;
-// OBSOLETE case N_SYM_SE:
-// OBSOLETE break;
-// OBSOLETE }
-// OBSOLETE return 1;
-// OBSOLETE }
-// OBSOLETE \f
-// OBSOLETE /* Given pointers to an a.out symbol table in core containing dbx
-// OBSOLETE style data, setup partial_symtab's describing each source file for
-// OBSOLETE which debugging information is available.
-// OBSOLETE SYMFILE_NAME is the name of the file we are reading from. */
-// OBSOLETE
-// OBSOLETE static void
-// OBSOLETE read_os9k_psymtab (struct objfile *objfile, CORE_ADDR text_addr, int text_size)
-// OBSOLETE {
-// OBSOLETE register struct internal_symstruct *bufp = 0; /* =0 avoids gcc -Wall glitch */
-// OBSOLETE register char *namestring;
-// OBSOLETE int past_first_source_file = 0;
-// OBSOLETE CORE_ADDR last_o_file_start = 0;
-// OBSOLETE #if 0
-// OBSOLETE struct cleanup *back_to;
-// OBSOLETE #endif
-// OBSOLETE bfd *abfd;
-// OBSOLETE FILE *fp;
-// OBSOLETE
-// OBSOLETE /* End of the text segment of the executable file. */
-// OBSOLETE static CORE_ADDR end_of_text_addr;
-// OBSOLETE
-// OBSOLETE /* Current partial symtab */
-// OBSOLETE static struct partial_symtab *pst = 0;
-// OBSOLETE
-// OBSOLETE /* List of current psymtab's include files */
-// OBSOLETE char **psymtab_include_list;
-// OBSOLETE int includes_allocated;
-// OBSOLETE int includes_used;
-// OBSOLETE
-// OBSOLETE /* Index within current psymtab dependency list */
-// OBSOLETE struct partial_symtab **dependency_list;
-// OBSOLETE int dependencies_used, dependencies_allocated;
-// OBSOLETE
-// OBSOLETE includes_allocated = 30;
-// OBSOLETE includes_used = 0;
-// OBSOLETE psymtab_include_list = (char **) alloca (includes_allocated *
-// OBSOLETE sizeof (char *));
-// OBSOLETE
-// OBSOLETE dependencies_allocated = 30;
-// OBSOLETE dependencies_used = 0;
-// OBSOLETE dependency_list =
-// OBSOLETE (struct partial_symtab **) alloca (dependencies_allocated *
-// OBSOLETE sizeof (struct partial_symtab *));
-// OBSOLETE
-// OBSOLETE last_source_file = NULL;
-// OBSOLETE
-// OBSOLETE #ifdef END_OF_TEXT_DEFAULT
-// OBSOLETE end_of_text_addr = END_OF_TEXT_DEFAULT;
-// OBSOLETE #else
-// OBSOLETE end_of_text_addr = text_addr + ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile))
-// OBSOLETE + text_size; /* Relocate */
-// OBSOLETE #endif
-// OBSOLETE
-// OBSOLETE abfd = objfile->obfd;
-// OBSOLETE fp = objfile->auxf2;
-// OBSOLETE if (!fp)
-// OBSOLETE return;
-// OBSOLETE
-// OBSOLETE fread (&dbghdr.sync, sizeof (dbghdr.sync), 1, fp);
-// OBSOLETE fread (&dbghdr.rev, sizeof (dbghdr.rev), 1, fp);
-// OBSOLETE fread (&dbghdr.crc, sizeof (dbghdr.crc), 1, fp);
-// OBSOLETE fread (&dbghdr.os, sizeof (dbghdr.os), 1, fp);
-// OBSOLETE fread (&dbghdr.cpu, sizeof (dbghdr.cpu), 1, fp);
-// OBSOLETE SWAP_DBGHDR (&dbghdr, abfd);
-// OBSOLETE
-// OBSOLETE symnum = 0;
-// OBSOLETE while (1)
-// OBSOLETE {
-// OBSOLETE int ret;
-// OBSOLETE long cursymoffset;
-// OBSOLETE
-// OBSOLETE /* Get the symbol for this run and pull out some info */
-// OBSOLETE QUIT; /* allow this to be interruptable */
-// OBSOLETE cursymoffset = ftell (objfile->auxf2);
-// OBSOLETE ret = fill_sym (objfile->auxf2, abfd);
-// OBSOLETE if (ret <= 0)
-// OBSOLETE break;
-// OBSOLETE else
-// OBSOLETE symnum++;
-// OBSOLETE bufp = symbuf;
-// OBSOLETE
-// OBSOLETE /* Special case to speed up readin. */
-// OBSOLETE if (bufp->n_type == (short) N_SYM_SLINE)
-// OBSOLETE continue;
-// OBSOLETE
-// OBSOLETE #define CUR_SYMBOL_VALUE bufp->n_value
-// OBSOLETE /* partial-stab.h */
-// OBSOLETE
-// OBSOLETE switch (bufp->n_type)
-// OBSOLETE {
-// OBSOLETE char *p;
-// OBSOLETE
-// OBSOLETE case N_SYM_CMPLR:
-// OBSOLETE continue;
-// OBSOLETE
-// OBSOLETE case N_SYM_SE:
-// OBSOLETE CUR_SYMBOL_VALUE += ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));
-// OBSOLETE if (psymfile_depth == 1 && pst)
-// OBSOLETE {
-// OBSOLETE os9k_end_psymtab (pst, psymtab_include_list, includes_used,
-// OBSOLETE symnum, CUR_SYMBOL_VALUE,
-// OBSOLETE dependency_list, dependencies_used);
-// OBSOLETE pst = (struct partial_symtab *) 0;
-// OBSOLETE includes_used = 0;
-// OBSOLETE dependencies_used = 0;
-// OBSOLETE }
-// OBSOLETE psymfile_depth--;
-// OBSOLETE continue;
-// OBSOLETE
-// OBSOLETE case N_SYM_SYM: /* Typedef or automatic variable. */
-// OBSOLETE namestring = bufp->n_strx;
-// OBSOLETE p = (char *) strchr (namestring, ':');
-// OBSOLETE if (!p)
-// OBSOLETE continue; /* Not a debugging symbol. */
-// OBSOLETE
-// OBSOLETE /* Main processing section for debugging symbols which
-// OBSOLETE the initial read through the symbol tables needs to worry
-// OBSOLETE about. If we reach this point, the symbol which we are
-// OBSOLETE considering is definitely one we are interested in.
-// OBSOLETE p must also contain the (valid) index into the namestring
-// OBSOLETE which indicates the debugging type symbol. */
-// OBSOLETE
-// OBSOLETE switch (p[1])
-// OBSOLETE {
-// OBSOLETE case 'S':
-// OBSOLETE {
-// OBSOLETE unsigned long valu;
-// OBSOLETE enum language tmp_language;
-// OBSOLETE char *str, *p;
-// OBSOLETE int n;
-// OBSOLETE
-// OBSOLETE valu = CUR_SYMBOL_VALUE;
-// OBSOLETE if (valu)
-// OBSOLETE valu += ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));
-// OBSOLETE past_first_source_file = 1;
-// OBSOLETE
-// OBSOLETE p = strchr (namestring, ':');
-// OBSOLETE if (p)
-// OBSOLETE n = p - namestring;
-// OBSOLETE else
-// OBSOLETE n = strlen (namestring);
-// OBSOLETE str = alloca (n + 1);
-// OBSOLETE strncpy (str, namestring, n);
-// OBSOLETE str[n] = '\0';
-// OBSOLETE
-// OBSOLETE if (psymfile_depth == 0)
-// OBSOLETE {
-// OBSOLETE if (!pst)
-// OBSOLETE pst = os9k_start_psymtab (objfile,
-// OBSOLETE str, valu,
-// OBSOLETE cursymoffset,
-// OBSOLETE symnum - 1,
-// OBSOLETE objfile->global_psymbols.next,
-// OBSOLETE objfile->static_psymbols.next);
-// OBSOLETE }
-// OBSOLETE else
-// OBSOLETE { /* this is a include file */
-// OBSOLETE tmp_language = deduce_language_from_filename (str);
-// OBSOLETE if (tmp_language != language_unknown
-// OBSOLETE && (tmp_language != language_c
-// OBSOLETE || psymtab_language != language_cplus))
-// OBSOLETE psymtab_language = tmp_language;
-// OBSOLETE
-// OBSOLETE /*
-// OBSOLETE if (pst && STREQ (str, pst->filename))
-// OBSOLETE continue;
-// OBSOLETE {
-// OBSOLETE register int i;
-// OBSOLETE for (i = 0; i < includes_used; i++)
-// OBSOLETE if (STREQ (str, psymtab_include_list[i]))
-// OBSOLETE {
-// OBSOLETE i = -1;
-// OBSOLETE break;
-// OBSOLETE }
-// OBSOLETE if (i == -1)
-// OBSOLETE continue;
-// OBSOLETE }
-// OBSOLETE */
-// OBSOLETE
-// OBSOLETE psymtab_include_list[includes_used++] = str;
-// OBSOLETE if (includes_used >= includes_allocated)
-// OBSOLETE {
-// OBSOLETE char **orig = psymtab_include_list;
-// OBSOLETE
-// OBSOLETE psymtab_include_list = (char **)
-// OBSOLETE alloca ((includes_allocated *= 2) * sizeof (char *));
-// OBSOLETE memcpy ((PTR) psymtab_include_list, (PTR) orig,
-// OBSOLETE includes_used * sizeof (char *));
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE }
-// OBSOLETE psymfile_depth++;
-// OBSOLETE continue;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE case 'v':
-// OBSOLETE add_psymbol_to_list (namestring, p - namestring,
-// OBSOLETE VAR_NAMESPACE, LOC_STATIC,
-// OBSOLETE &objfile->static_psymbols,
-// OBSOLETE 0, CUR_SYMBOL_VALUE,
-// OBSOLETE psymtab_language, objfile);
-// OBSOLETE continue;
-// OBSOLETE case 'V':
-// OBSOLETE add_psymbol_to_list (namestring, p - namestring,
-// OBSOLETE VAR_NAMESPACE, LOC_STATIC,
-// OBSOLETE &objfile->global_psymbols,
-// OBSOLETE 0, CUR_SYMBOL_VALUE,
-// OBSOLETE psymtab_language, objfile);
-// OBSOLETE continue;
-// OBSOLETE
-// OBSOLETE case 'T':
-// OBSOLETE if (p != namestring) /* a name is there, not just :T... */
-// OBSOLETE {
-// OBSOLETE add_psymbol_to_list (namestring, p - namestring,
-// OBSOLETE STRUCT_NAMESPACE, LOC_TYPEDEF,
-// OBSOLETE &objfile->static_psymbols,
-// OBSOLETE CUR_SYMBOL_VALUE, 0,
-// OBSOLETE psymtab_language, objfile);
-// OBSOLETE if (p[2] == 't')
-// OBSOLETE {
-// OBSOLETE /* Also a typedef with the same name. */
-// OBSOLETE add_psymbol_to_list (namestring, p - namestring,
-// OBSOLETE VAR_NAMESPACE, LOC_TYPEDEF,
-// OBSOLETE &objfile->static_psymbols,
-// OBSOLETE CUR_SYMBOL_VALUE, 0, psymtab_language,
-// OBSOLETE objfile);
-// OBSOLETE p += 1;
-// OBSOLETE }
-// OBSOLETE /* The semantics of C++ state that "struct foo { ... }"
-// OBSOLETE also defines a typedef for "foo". Unfortuantely, cfront
-// OBSOLETE never makes the typedef when translating from C++ to C.
-// OBSOLETE We make the typedef here so that "ptype foo" works as
-// OBSOLETE expected for cfront translated code. */
-// OBSOLETE else if (psymtab_language == language_cplus)
-// OBSOLETE {
-// OBSOLETE /* Also a typedef with the same name. */
-// OBSOLETE add_psymbol_to_list (namestring, p - namestring,
-// OBSOLETE VAR_NAMESPACE, LOC_TYPEDEF,
-// OBSOLETE &objfile->static_psymbols,
-// OBSOLETE CUR_SYMBOL_VALUE, 0, psymtab_language,
-// OBSOLETE objfile);
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE goto check_enum;
-// OBSOLETE case 't':
-// OBSOLETE if (p != namestring) /* a name is there, not just :T... */
-// OBSOLETE {
-// OBSOLETE add_psymbol_to_list (namestring, p - namestring,
-// OBSOLETE VAR_NAMESPACE, LOC_TYPEDEF,
-// OBSOLETE &objfile->static_psymbols,
-// OBSOLETE CUR_SYMBOL_VALUE, 0,
-// OBSOLETE psymtab_language, objfile);
-// OBSOLETE }
-// OBSOLETE check_enum:
-// OBSOLETE /* If this is an enumerated type, we need to
-// OBSOLETE add all the enum constants to the partial symbol
-// OBSOLETE table. This does not cover enums without names, e.g.
-// OBSOLETE "enum {a, b} c;" in C, but fortunately those are
-// OBSOLETE rare. There is no way for GDB to find those from the
-// OBSOLETE enum type without spending too much time on it. Thus
-// OBSOLETE to solve this problem, the compiler needs to put out the
-// OBSOLETE enum in a nameless type. GCC2 does this. */
-// OBSOLETE
-// OBSOLETE /* We are looking for something of the form
-// OBSOLETE <name> ":" ("t" | "T") [<number> "="] "e" <size>
-// OBSOLETE {<constant> ":" <value> ","} ";". */
-// OBSOLETE
-// OBSOLETE /* Skip over the colon and the 't' or 'T'. */
-// OBSOLETE p += 2;
-// OBSOLETE /* This type may be given a number. Also, numbers can come
-// OBSOLETE in pairs like (0,26). Skip over it. */
-// OBSOLETE while ((*p >= '0' && *p <= '9')
-// OBSOLETE || *p == '(' || *p == ',' || *p == ')'
-// OBSOLETE || *p == '=')
-// OBSOLETE p++;
-// OBSOLETE
-// OBSOLETE if (*p++ == 'e')
-// OBSOLETE {
-// OBSOLETE /* We have found an enumerated type. skip size */
-// OBSOLETE while (*p >= '0' && *p <= '9')
-// OBSOLETE p++;
-// OBSOLETE /* According to comments in read_enum_type
-// OBSOLETE a comma could end it instead of a semicolon.
-// OBSOLETE I don't know where that happens.
-// OBSOLETE Accept either. */
-// OBSOLETE while (*p && *p != ';' && *p != ',')
-// OBSOLETE {
-// OBSOLETE char *q;
-// OBSOLETE
-// OBSOLETE /* Check for and handle cretinous dbx symbol name
-// OBSOLETE continuation!
-// OBSOLETE if (*p == '\\')
-// OBSOLETE p = next_symbol_text (objfile);
-// OBSOLETE */
-// OBSOLETE
-// OBSOLETE /* Point to the character after the name
-// OBSOLETE of the enum constant. */
-// OBSOLETE for (q = p; *q && *q != ':'; q++)
-// OBSOLETE ;
-// OBSOLETE /* Note that the value doesn't matter for
-// OBSOLETE enum constants in psymtabs, just in symtabs. */
-// OBSOLETE add_psymbol_to_list (p, q - p,
-// OBSOLETE VAR_NAMESPACE, LOC_CONST,
-// OBSOLETE &objfile->static_psymbols, 0,
-// OBSOLETE 0, psymtab_language, objfile);
-// OBSOLETE /* Point past the name. */
-// OBSOLETE p = q;
-// OBSOLETE /* Skip over the value. */
-// OBSOLETE while (*p && *p != ',')
-// OBSOLETE p++;
-// OBSOLETE /* Advance past the comma. */
-// OBSOLETE if (*p)
-// OBSOLETE p++;
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE continue;
-// OBSOLETE case 'c':
-// OBSOLETE /* Constant, e.g. from "const" in Pascal. */
-// OBSOLETE add_psymbol_to_list (namestring, p - namestring,
-// OBSOLETE VAR_NAMESPACE, LOC_CONST,
-// OBSOLETE &objfile->static_psymbols, CUR_SYMBOL_VALUE,
-// OBSOLETE 0, psymtab_language, objfile);
-// OBSOLETE continue;
-// OBSOLETE
-// OBSOLETE case 'f':
-// OBSOLETE CUR_SYMBOL_VALUE += ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));
-// OBSOLETE if (pst && pst->textlow == 0)
-// OBSOLETE pst->textlow = CUR_SYMBOL_VALUE;
-// OBSOLETE
-// OBSOLETE add_psymbol_to_list (namestring, p - namestring,
-// OBSOLETE VAR_NAMESPACE, LOC_BLOCK,
-// OBSOLETE &objfile->static_psymbols, CUR_SYMBOL_VALUE,
-// OBSOLETE 0, psymtab_language, objfile);
-// OBSOLETE continue;
-// OBSOLETE
-// OBSOLETE case 'F':
-// OBSOLETE CUR_SYMBOL_VALUE += ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));
-// OBSOLETE if (pst && pst->textlow == 0)
-// OBSOLETE pst->textlow = CUR_SYMBOL_VALUE;
-// OBSOLETE
-// OBSOLETE add_psymbol_to_list (namestring, p - namestring,
-// OBSOLETE VAR_NAMESPACE, LOC_BLOCK,
-// OBSOLETE &objfile->global_psymbols, CUR_SYMBOL_VALUE,
-// OBSOLETE 0, psymtab_language, objfile);
-// OBSOLETE continue;
-// OBSOLETE
-// OBSOLETE case 'p':
-// OBSOLETE case 'l':
-// OBSOLETE case 's':
-// OBSOLETE continue;
-// OBSOLETE
-// OBSOLETE case ':':
-// OBSOLETE /* It is a C++ nested symbol. We don't need to record it
-// OBSOLETE (I don't think); if we try to look up foo::bar::baz,
-// OBSOLETE then symbols for the symtab containing foo should get
-// OBSOLETE read in, I think. */
-// OBSOLETE /* Someone says sun cc puts out symbols like
-// OBSOLETE /foo/baz/maclib::/usr/local/bin/maclib,
-// OBSOLETE which would get here with a symbol type of ':'. */
-// OBSOLETE continue;
-// OBSOLETE
-// OBSOLETE default:
-// OBSOLETE /* Unexpected symbol descriptor. The second and subsequent stabs
-// OBSOLETE of a continued stab can show up here. The question is
-// OBSOLETE whether they ever can mimic a normal stab--it would be
-// OBSOLETE nice if not, since we certainly don't want to spend the
-// OBSOLETE time searching to the end of every string looking for
-// OBSOLETE a backslash. */
-// OBSOLETE
-// OBSOLETE complain (&unknown_symchar_complaint, p[1]);
-// OBSOLETE continue;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE case N_SYM_RBRAC:
-// OBSOLETE CUR_SYMBOL_VALUE += ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));
-// OBSOLETE #ifdef HANDLE_RBRAC
-// OBSOLETE HANDLE_RBRAC (CUR_SYMBOL_VALUE);
-// OBSOLETE continue;
-// OBSOLETE #endif
-// OBSOLETE case N_SYM_LBRAC:
-// OBSOLETE continue;
-// OBSOLETE
-// OBSOLETE default:
-// OBSOLETE /* If we haven't found it yet, ignore it. It's probably some
-// OBSOLETE new type we don't know about yet. */
-// OBSOLETE complain (&unknown_symtype_complaint,
-// OBSOLETE local_hex_string ((unsigned long) bufp->n_type));
-// OBSOLETE continue;
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE DBX_SYMCOUNT (objfile) = symnum;
-// OBSOLETE
-// OBSOLETE /* If there's stuff to be cleaned up, clean it up. */
-// OBSOLETE if (DBX_SYMCOUNT (objfile) > 0
-// OBSOLETE /*FIXME, does this have a bug at start address 0? */
-// OBSOLETE && last_o_file_start
-// OBSOLETE && objfile->ei.entry_point < bufp->n_value
-// OBSOLETE && objfile->ei.entry_point >= last_o_file_start)
-// OBSOLETE {
-// OBSOLETE objfile->ei.entry_file_lowpc = last_o_file_start;
-// OBSOLETE objfile->ei.entry_file_highpc = bufp->n_value;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE if (pst)
-// OBSOLETE {
-// OBSOLETE os9k_end_psymtab (pst, psymtab_include_list, includes_used,
-// OBSOLETE symnum, end_of_text_addr,
-// OBSOLETE dependency_list, dependencies_used);
-// OBSOLETE }
-// OBSOLETE /*
-// OBSOLETE do_cleanups (back_to);
-// OBSOLETE */
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Allocate and partially fill a partial symtab. It will be
-// OBSOLETE completely filled at the end of the symbol list.
-// OBSOLETE
-// OBSOLETE SYMFILE_NAME is the name of the symbol-file we are reading from, and ADDR
-// OBSOLETE is the address relative to which its symbols are (incremental) or 0
-// OBSOLETE (normal). */
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE static struct partial_symtab *
-// OBSOLETE os9k_start_psymtab (struct objfile *objfile, char *filename, CORE_ADDR textlow,
-// OBSOLETE int ldsymoff, int ldsymcnt,
-// OBSOLETE struct partial_symbol **global_syms,
-// OBSOLETE struct partial_symbol **static_syms)
-// OBSOLETE {
-// OBSOLETE struct partial_symtab *result =
-// OBSOLETE start_psymtab_common (objfile, objfile->section_offsets,
-// OBSOLETE filename, textlow, global_syms, static_syms);
-// OBSOLETE
-// OBSOLETE result->read_symtab_private = (char *)
-// OBSOLETE obstack_alloc (&objfile->psymbol_obstack, sizeof (struct symloc));
-// OBSOLETE
-// OBSOLETE LDSYMOFF (result) = ldsymoff;
-// OBSOLETE LDSYMCNT (result) = ldsymcnt;
-// OBSOLETE result->read_symtab = os9k_psymtab_to_symtab;
-// OBSOLETE
-// OBSOLETE /* Deduce the source language from the filename for this psymtab. */
-// OBSOLETE psymtab_language = deduce_language_from_filename (filename);
-// OBSOLETE return result;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Close off the current usage of PST.
-// OBSOLETE Returns PST or NULL if the partial symtab was empty and thrown away.
-// OBSOLETE FIXME: List variables and peculiarities of same. */
-// OBSOLETE
-// OBSOLETE static struct partial_symtab *
-// OBSOLETE os9k_end_psymtab (struct partial_symtab *pst, char **include_list,
-// OBSOLETE int num_includes, int capping_symbol_cnt,
-// OBSOLETE CORE_ADDR capping_text,
-// OBSOLETE struct partial_symtab **dependency_list,
-// OBSOLETE int number_dependencies)
-// OBSOLETE {
-// OBSOLETE int i;
-// OBSOLETE struct partial_symtab *p1;
-// OBSOLETE struct objfile *objfile = pst->objfile;
-// OBSOLETE
-// OBSOLETE if (capping_symbol_cnt != -1)
-// OBSOLETE LDSYMCNT (pst) = capping_symbol_cnt - LDSYMCNT (pst);
-// OBSOLETE
-// OBSOLETE /* Under Solaris, the N_SO symbols always have a value of 0,
-// OBSOLETE instead of the usual address of the .o file. Therefore,
-// OBSOLETE we have to do some tricks to fill in texthigh and textlow.
-// OBSOLETE The first trick is in partial-stab.h: if we see a static
-// OBSOLETE or global function, and the textlow for the current pst
-// OBSOLETE is still 0, then we use that function's address for
-// OBSOLETE the textlow of the pst.
-// OBSOLETE
-// OBSOLETE Now, to fill in texthigh, we remember the last function seen
-// OBSOLETE in the .o file (also in partial-stab.h). Also, there's a hack in
-// OBSOLETE bfd/elf.c and gdb/elfread.c to pass the ELF st_size field
-// OBSOLETE to here via the misc_info field. Therefore, we can fill in
-// OBSOLETE a reliable texthigh by taking the address plus size of the
-// OBSOLETE last function in the file.
-// OBSOLETE
-// OBSOLETE Unfortunately, that does not cover the case where the last function
-// OBSOLETE in the file is static. See the paragraph below for more comments
-// OBSOLETE on this situation.
-// OBSOLETE
-// OBSOLETE Finally, if we have a valid textlow for the current file, we run
-// OBSOLETE down the partial_symtab_list filling in previous texthighs that
-// OBSOLETE are still unknown. */
-// OBSOLETE
-// OBSOLETE if (pst->texthigh == 0 && last_function_name)
-// OBSOLETE {
-// OBSOLETE char *p;
-// OBSOLETE int n;
-// OBSOLETE struct minimal_symbol *minsym;
-// OBSOLETE
-// OBSOLETE p = strchr (last_function_name, ':');
-// OBSOLETE if (p == NULL)
-// OBSOLETE p = last_function_name;
-// OBSOLETE n = p - last_function_name;
-// OBSOLETE p = alloca (n + 1);
-// OBSOLETE strncpy (p, last_function_name, n);
-// OBSOLETE p[n] = 0;
-// OBSOLETE
-// OBSOLETE minsym = lookup_minimal_symbol (p, NULL, objfile);
-// OBSOLETE
-// OBSOLETE if (minsym)
-// OBSOLETE {
-// OBSOLETE pst->texthigh = SYMBOL_VALUE_ADDRESS (minsym) + (long) MSYMBOL_INFO (minsym);
-// OBSOLETE }
-// OBSOLETE else
-// OBSOLETE {
-// OBSOLETE /* This file ends with a static function, and it's
-// OBSOLETE difficult to imagine how hard it would be to track down
-// OBSOLETE the elf symbol. Luckily, most of the time no one will notice,
-// OBSOLETE since the next file will likely be compiled with -g, so
-// OBSOLETE the code below will copy the first fuction's start address
-// OBSOLETE back to our texthigh variable. (Also, if this file is the
-// OBSOLETE last one in a dynamically linked program, texthigh already
-// OBSOLETE has the right value.) If the next file isn't compiled
-// OBSOLETE with -g, then the last function in this file winds up owning
-// OBSOLETE all of the text space up to the next -g file, or the end (minus
-// OBSOLETE shared libraries). This only matters for single stepping,
-// OBSOLETE and even then it will still work, except that it will single
-// OBSOLETE step through all of the covered functions, instead of setting
-// OBSOLETE breakpoints around them as it usualy does. This makes it
-// OBSOLETE pretty slow, but at least it doesn't fail.
-// OBSOLETE
-// OBSOLETE We can fix this with a fairly big change to bfd, but we need
-// OBSOLETE to coordinate better with Cygnus if we want to do that. FIXME. */
-// OBSOLETE }
-// OBSOLETE last_function_name = NULL;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* this test will be true if the last .o file is only data */
-// OBSOLETE if (pst->textlow == 0)
-// OBSOLETE pst->textlow = pst->texthigh;
-// OBSOLETE
-// OBSOLETE /* If we know our own starting text address, then walk through all other
-// OBSOLETE psymtabs for this objfile, and if any didn't know their ending text
-// OBSOLETE address, set it to our starting address. Take care to not set our
-// OBSOLETE own ending address to our starting address, nor to set addresses on
-// OBSOLETE `dependency' files that have both textlow and texthigh zero. */
-// OBSOLETE if (pst->textlow)
-// OBSOLETE {
-// OBSOLETE ALL_OBJFILE_PSYMTABS (objfile, p1)
-// OBSOLETE {
-// OBSOLETE if (p1->texthigh == 0 && p1->textlow != 0 && p1 != pst)
-// OBSOLETE {
-// OBSOLETE p1->texthigh = pst->textlow;
-// OBSOLETE /* if this file has only data, then make textlow match texthigh */
-// OBSOLETE if (p1->textlow == 0)
-// OBSOLETE p1->textlow = p1->texthigh;
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* End of kludge for patching Solaris textlow and texthigh. */
-// OBSOLETE
-// OBSOLETE pst->n_global_syms =
-// OBSOLETE objfile->global_psymbols.next - (objfile->global_psymbols.list + pst->globals_offset);
-// OBSOLETE pst->n_static_syms =
-// OBSOLETE objfile->static_psymbols.next - (objfile->static_psymbols.list + pst->statics_offset);
-// OBSOLETE
-// OBSOLETE pst->number_of_dependencies = number_dependencies;
-// OBSOLETE if (number_dependencies)
-// OBSOLETE {
-// OBSOLETE pst->dependencies = (struct partial_symtab **)
-// OBSOLETE obstack_alloc (&objfile->psymbol_obstack,
-// OBSOLETE number_dependencies * sizeof (struct partial_symtab *));
-// OBSOLETE memcpy (pst->dependencies, dependency_list,
-// OBSOLETE number_dependencies * sizeof (struct partial_symtab *));
-// OBSOLETE }
-// OBSOLETE else
-// OBSOLETE pst->dependencies = 0;
-// OBSOLETE
-// OBSOLETE for (i = 0; i < num_includes; i++)
-// OBSOLETE {
-// OBSOLETE struct partial_symtab *subpst =
-// OBSOLETE allocate_psymtab (include_list[i], objfile);
-// OBSOLETE
-// OBSOLETE subpst->section_offsets = pst->section_offsets;
-// OBSOLETE subpst->read_symtab_private =
-// OBSOLETE (char *) obstack_alloc (&objfile->psymbol_obstack,
-// OBSOLETE sizeof (struct symloc));
-// OBSOLETE LDSYMOFF (subpst) =
-// OBSOLETE LDSYMCNT (subpst) =
-// OBSOLETE subpst->textlow =
-// OBSOLETE subpst->texthigh = 0;
-// OBSOLETE
-// OBSOLETE /* We could save slight bits of space by only making one of these,
-// OBSOLETE shared by the entire set of include files. FIXME-someday. */
-// OBSOLETE subpst->dependencies = (struct partial_symtab **)
-// OBSOLETE obstack_alloc (&objfile->psymbol_obstack,
-// OBSOLETE sizeof (struct partial_symtab *));
-// OBSOLETE subpst->dependencies[0] = pst;
-// OBSOLETE subpst->number_of_dependencies = 1;
-// OBSOLETE
-// OBSOLETE subpst->globals_offset =
-// OBSOLETE subpst->n_global_syms =
-// OBSOLETE subpst->statics_offset =
-// OBSOLETE subpst->n_static_syms = 0;
-// OBSOLETE
-// OBSOLETE subpst->readin = 0;
-// OBSOLETE subpst->symtab = 0;
-// OBSOLETE subpst->read_symtab = pst->read_symtab;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE sort_pst_symbols (pst);
-// OBSOLETE
-// OBSOLETE /* If there is already a psymtab or symtab for a file of this name,
-// OBSOLETE remove it.
-// OBSOLETE (If there is a symtab, more drastic things also happen.)
-// OBSOLETE This happens in VxWorks. */
-// OBSOLETE free_named_symtabs (pst->filename);
-// OBSOLETE
-// OBSOLETE if (num_includes == 0
-// OBSOLETE && number_dependencies == 0
-// OBSOLETE && pst->n_global_syms == 0
-// OBSOLETE && pst->n_static_syms == 0)
-// OBSOLETE {
-// OBSOLETE /* Throw away this psymtab, it's empty. We can't deallocate it, since
-// OBSOLETE it is on the obstack, but we can forget to chain it on the list. */
-// OBSOLETE /* Indicate that psymtab was thrown away. */
-// OBSOLETE
-// OBSOLETE discard_psymtab (pst);
-// OBSOLETE
-// OBSOLETE pst = (struct partial_symtab *) NULL;
-// OBSOLETE }
-// OBSOLETE return pst;
-// OBSOLETE }
-// OBSOLETE \f
-// OBSOLETE static void
-// OBSOLETE os9k_psymtab_to_symtab_1 (struct partial_symtab *pst)
-// OBSOLETE {
-// OBSOLETE struct cleanup *old_chain;
-// OBSOLETE int i;
-// OBSOLETE
-// OBSOLETE if (!pst)
-// OBSOLETE return;
-// OBSOLETE
-// OBSOLETE if (pst->readin)
-// OBSOLETE {
-// OBSOLETE fprintf_unfiltered (gdb_stderr, "Psymtab for %s already read in. Shouldn't happen.\n",
-// OBSOLETE pst->filename);
-// OBSOLETE return;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Read in all partial symtabs on which this one is dependent */
-// OBSOLETE for (i = 0; i < pst->number_of_dependencies; i++)
-// OBSOLETE if (!pst->dependencies[i]->readin)
-// OBSOLETE {
-// OBSOLETE /* Inform about additional files that need to be read in. */
-// OBSOLETE if (info_verbose)
-// OBSOLETE {
-// OBSOLETE fputs_filtered (" ", gdb_stdout);
-// OBSOLETE wrap_here ("");
-// OBSOLETE fputs_filtered ("and ", gdb_stdout);
-// OBSOLETE wrap_here ("");
-// OBSOLETE printf_filtered ("%s...", pst->dependencies[i]->filename);
-// OBSOLETE wrap_here (""); /* Flush output */
-// OBSOLETE gdb_flush (gdb_stdout);
-// OBSOLETE }
-// OBSOLETE os9k_psymtab_to_symtab_1 (pst->dependencies[i]);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE if (LDSYMCNT (pst)) /* Otherwise it's a dummy */
-// OBSOLETE {
-// OBSOLETE /* Init stuff necessary for reading in symbols */
-// OBSOLETE stabsread_init ();
-// OBSOLETE buildsym_init ();
-// OBSOLETE old_chain = make_cleanup (really_free_pendings, 0);
-// OBSOLETE
-// OBSOLETE /* Read in this file's symbols */
-// OBSOLETE os9k_read_ofile_symtab (pst);
-// OBSOLETE sort_symtab_syms (pst->symtab);
-// OBSOLETE do_cleanups (old_chain);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE pst->readin = 1;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Read in all of the symbols for a given psymtab for real.
-// OBSOLETE Be verbose about it if the user wants that. */
-// OBSOLETE
-// OBSOLETE static void
-// OBSOLETE os9k_psymtab_to_symtab (struct partial_symtab *pst)
-// OBSOLETE {
-// OBSOLETE bfd *sym_bfd;
-// OBSOLETE
-// OBSOLETE if (!pst)
-// OBSOLETE return;
-// OBSOLETE
-// OBSOLETE if (pst->readin)
-// OBSOLETE {
-// OBSOLETE fprintf_unfiltered (gdb_stderr, "Psymtab for %s already read in. Shouldn't happen.\n",
-// OBSOLETE pst->filename);
-// OBSOLETE return;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE if (LDSYMCNT (pst) || pst->number_of_dependencies)
-// OBSOLETE {
-// OBSOLETE /* Print the message now, before reading the string table,
-// OBSOLETE to avoid disconcerting pauses. */
-// OBSOLETE if (info_verbose)
-// OBSOLETE {
-// OBSOLETE printf_filtered ("Reading in symbols for %s...", pst->filename);
-// OBSOLETE gdb_flush (gdb_stdout);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE sym_bfd = pst->objfile->obfd;
-// OBSOLETE os9k_psymtab_to_symtab_1 (pst);
-// OBSOLETE
-// OBSOLETE /* Match with global symbols. This only needs to be done once,
-// OBSOLETE after all of the symtabs and dependencies have been read in. */
-// OBSOLETE scan_file_globals (pst->objfile);
-// OBSOLETE
-// OBSOLETE /* Finish up the debug error message. */
-// OBSOLETE if (info_verbose)
-// OBSOLETE printf_filtered ("done.\n");
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Read in a defined section of a specific object file's symbols. */
-// OBSOLETE static void
-// OBSOLETE os9k_read_ofile_symtab (struct partial_symtab *pst)
-// OBSOLETE {
-// OBSOLETE register struct internal_symstruct *bufp;
-// OBSOLETE unsigned char type;
-// OBSOLETE unsigned max_symnum;
-// OBSOLETE register bfd *abfd;
-// OBSOLETE struct objfile *objfile;
-// OBSOLETE int sym_offset; /* Offset to start of symbols to read */
-// OBSOLETE CORE_ADDR text_offset; /* Start of text segment for symbols */
-// OBSOLETE int text_size; /* Size of text segment for symbols */
-// OBSOLETE FILE *dbg_file;
-// OBSOLETE
-// OBSOLETE objfile = pst->objfile;
-// OBSOLETE sym_offset = LDSYMOFF (pst);
-// OBSOLETE max_symnum = LDSYMCNT (pst);
-// OBSOLETE text_offset = pst->textlow;
-// OBSOLETE text_size = pst->texthigh - pst->textlow;
-// OBSOLETE
-// OBSOLETE current_objfile = objfile;
-// OBSOLETE subfile_stack = NULL;
-// OBSOLETE last_source_file = NULL;
-// OBSOLETE
-// OBSOLETE abfd = objfile->obfd;
-// OBSOLETE dbg_file = objfile->auxf2;
-// OBSOLETE
-// OBSOLETE #if 0
-// OBSOLETE /* It is necessary to actually read one symbol *before* the start
-// OBSOLETE of this symtab's symbols, because the GCC_COMPILED_FLAG_SYMBOL
-// OBSOLETE occurs before the N_SO symbol.
-// OBSOLETE Detecting this in read_dbx_symtab
-// OBSOLETE would slow down initial readin, so we look for it here instead. */
-// OBSOLETE if (!processing_acc_compilation && sym_offset >= (int) symbol_size)
-// OBSOLETE {
-// OBSOLETE fseek (objefile->auxf2, sym_offset, SEEK_CUR);
-// OBSOLETE fill_sym (objfile->auxf2, abfd);
-// OBSOLETE bufp = symbuf;
-// OBSOLETE
-// OBSOLETE processing_gcc_compilation = 0;
-// OBSOLETE if (bufp->n_type == N_TEXT)
-// OBSOLETE {
-// OBSOLETE if (STREQ (namestring, GCC_COMPILED_FLAG_SYMBOL))
-// OBSOLETE processing_gcc_compilation = 1;
-// OBSOLETE else if (STREQ (namestring, GCC2_COMPILED_FLAG_SYMBOL))
-// OBSOLETE processing_gcc_compilation = 2;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Try to select a C++ demangling based on the compilation unit
-// OBSOLETE producer. */
-// OBSOLETE
-// OBSOLETE if (processing_gcc_compilation)
-// OBSOLETE {
-// OBSOLETE if (AUTO_DEMANGLING)
-// OBSOLETE {
-// OBSOLETE set_demangling_style (GNU_DEMANGLING_STYLE_STRING);
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE else
-// OBSOLETE {
-// OBSOLETE /* The N_SO starting this symtab is the first symbol, so we
-// OBSOLETE better not check the symbol before it. I'm not this can
-// OBSOLETE happen, but it doesn't hurt to check for it. */
-// OBSOLETE bfd_seek (symfile_bfd, sym_offset, SEEK_CUR);
-// OBSOLETE processing_gcc_compilation = 0;
-// OBSOLETE }
-// OBSOLETE #endif /* 0 */
-// OBSOLETE
-// OBSOLETE fseek (dbg_file, (long) sym_offset, 0);
-// OBSOLETE /*
-// OBSOLETE if (bufp->n_type != (unsigned char)N_SYM_SYM)
-// OBSOLETE error("First symbol in segment of executable not a source symbol");
-// OBSOLETE */
-// OBSOLETE
-// OBSOLETE for (symnum = 0; symnum < max_symnum; symnum++)
-// OBSOLETE {
-// OBSOLETE QUIT; /* Allow this to be interruptable */
-// OBSOLETE fill_sym (dbg_file, abfd);
-// OBSOLETE bufp = symbuf;
-// OBSOLETE type = bufp->n_type;
-// OBSOLETE
-// OBSOLETE os9k_process_one_symbol ((int) type, (int) bufp->n_desc,
-// OBSOLETE (CORE_ADDR) bufp->n_value, bufp->n_strx, pst->section_offsets, objfile);
-// OBSOLETE
-// OBSOLETE /* We skip checking for a new .o or -l file; that should never
-// OBSOLETE happen in this routine. */
-// OBSOLETE #if 0
-// OBSOLETE else
-// OBSOLETE if (type == N_TEXT)
-// OBSOLETE {
-// OBSOLETE /* I don't think this code will ever be executed, because
-// OBSOLETE the GCC_COMPILED_FLAG_SYMBOL usually is right before
-// OBSOLETE the N_SO symbol which starts this source file.
-// OBSOLETE However, there is no reason not to accept
-// OBSOLETE the GCC_COMPILED_FLAG_SYMBOL anywhere. */
-// OBSOLETE
-// OBSOLETE if (STREQ (namestring, GCC_COMPILED_FLAG_SYMBOL))
-// OBSOLETE processing_gcc_compilation = 1;
-// OBSOLETE else if (STREQ (namestring, GCC2_COMPILED_FLAG_SYMBOL))
-// OBSOLETE processing_gcc_compilation = 2;
-// OBSOLETE
-// OBSOLETE if (AUTO_DEMANGLING)
-// OBSOLETE {
-// OBSOLETE set_demangling_style (GNU_DEMANGLING_STYLE_STRING);
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE else if (type & N_EXT || type == (unsigned char) N_TEXT
-// OBSOLETE || type == (unsigned char) N_NBTEXT
-// OBSOLETE )
-// OBSOLETE {
-// OBSOLETE /* Global symbol: see if we came across a dbx defintion for
-// OBSOLETE a corresponding symbol. If so, store the value. Remove
-// OBSOLETE syms from the chain when their values are stored, but
-// OBSOLETE search the whole chain, as there may be several syms from
-// OBSOLETE different files with the same name. */
-// OBSOLETE /* This is probably not true. Since the files will be read
-// OBSOLETE in one at a time, each reference to a global symbol will
-// OBSOLETE be satisfied in each file as it appears. So we skip this
-// OBSOLETE section. */
-// OBSOLETE ;
-// OBSOLETE }
-// OBSOLETE #endif /* 0 */
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE current_objfile = NULL;
-// OBSOLETE
-// OBSOLETE /* In a Solaris elf file, this variable, which comes from the
-// OBSOLETE value of the N_SO symbol, will still be 0. Luckily, text_offset,
-// OBSOLETE which comes from pst->textlow is correct. */
-// OBSOLETE if (last_source_start_addr == 0)
-// OBSOLETE last_source_start_addr = text_offset;
-// OBSOLETE pst->symtab = end_symtab (text_offset + text_size, objfile, SECT_OFF_TEXT (objfile));
-// OBSOLETE end_stabs ();
-// OBSOLETE }
-// OBSOLETE \f
-// OBSOLETE
-// OBSOLETE /* This handles a single symbol from the symbol-file, building symbols
-// OBSOLETE into a GDB symtab. It takes these arguments and an implicit argument.
-// OBSOLETE
-// OBSOLETE TYPE is the type field of the ".stab" symbol entry.
-// OBSOLETE DESC is the desc field of the ".stab" entry.
-// OBSOLETE VALU is the value field of the ".stab" entry.
-// OBSOLETE NAME is the symbol name, in our address space.
-// OBSOLETE SECTION_OFFSETS is a set of amounts by which the sections of this object
-// OBSOLETE file were relocated when it was loaded into memory.
-// OBSOLETE All symbols that refer
-// OBSOLETE to memory locations need to be offset by these amounts.
-// OBSOLETE OBJFILE is the object file from which we are reading symbols.
-// OBSOLETE It is used in end_symtab. */
-// OBSOLETE
-// OBSOLETE static void
-// OBSOLETE os9k_process_one_symbol (int type, int desc, CORE_ADDR valu, char *name,
-// OBSOLETE struct section_offsets *section_offsets,
-// OBSOLETE struct objfile *objfile)
-// OBSOLETE {
-// OBSOLETE register struct context_stack *new;
-// OBSOLETE /* The stab type used for the definition of the last function.
-// OBSOLETE N_STSYM or N_GSYM for SunOS4 acc; N_FUN for other compilers. */
-// OBSOLETE static int function_stab_type = 0;
-// OBSOLETE
-// OBSOLETE #if 0
-// OBSOLETE /* Something is wrong if we see real data before
-// OBSOLETE seeing a source file name. */
-// OBSOLETE if (last_source_file == NULL && type != (unsigned char) N_SO)
-// OBSOLETE {
-// OBSOLETE /* Ignore any symbols which appear before an N_SO symbol.
-// OBSOLETE Currently no one puts symbols there, but we should deal
-// OBSOLETE gracefully with the case. A complain()t might be in order,
-// OBSOLETE but this should not be an error (). */
-// OBSOLETE return;
-// OBSOLETE }
-// OBSOLETE #endif /* 0 */
-// OBSOLETE
-// OBSOLETE switch (type)
-// OBSOLETE {
-// OBSOLETE case N_SYM_LBRAC:
-// OBSOLETE /* On most machines, the block addresses are relative to the
-// OBSOLETE N_SO, the linker did not relocate them (sigh). */
-// OBSOLETE valu += ANOFFSET (section_offsets, SECT_OFF_TEXT (objfile));
-// OBSOLETE new = push_context (desc, valu);
-// OBSOLETE break;
-// OBSOLETE
-// OBSOLETE case N_SYM_RBRAC:
-// OBSOLETE valu += ANOFFSET (section_offsets, SECT_OFF_TEXT (objfile));
-// OBSOLETE new = pop_context ();
-// OBSOLETE
-// OBSOLETE #if !defined (OS9K_VARIABLES_INSIDE_BLOCK)
-// OBSOLETE #define OS9K_VARIABLES_INSIDE_BLOCK(desc, gcc_p) 1
-// OBSOLETE #endif
-// OBSOLETE
-// OBSOLETE if (!OS9K_VARIABLES_INSIDE_BLOCK (desc, processing_gcc_compilation))
-// OBSOLETE local_symbols = new->locals;
-// OBSOLETE
-// OBSOLETE if (context_stack_depth > 1)
-// OBSOLETE {
-// OBSOLETE /* This is not the outermost LBRAC...RBRAC pair in the function,
-// OBSOLETE its local symbols preceded it, and are the ones just recovered
-// OBSOLETE from the context stack. Define the block for them (but don't
-// OBSOLETE bother if the block contains no symbols. Should we complain
-// OBSOLETE on blocks without symbols? I can't think of any useful purpose
-// OBSOLETE for them). */
-// OBSOLETE if (local_symbols != NULL)
-// OBSOLETE {
-// OBSOLETE /* Muzzle a compiler bug that makes end < start. (which
-// OBSOLETE compilers? Is this ever harmful?). */
-// OBSOLETE if (new->start_addr > valu)
-// OBSOLETE {
-// OBSOLETE complain (&lbrac_rbrac_complaint);
-// OBSOLETE new->start_addr = valu;
-// OBSOLETE }
-// OBSOLETE /* Make a block for the local symbols within. */
-// OBSOLETE finish_block (0, &local_symbols, new->old_blocks,
-// OBSOLETE new->start_addr, valu, objfile);
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE else
-// OBSOLETE {
-// OBSOLETE if (context_stack_depth == 0)
-// OBSOLETE {
-// OBSOLETE within_function = 0;
-// OBSOLETE /* Make a block for the local symbols within. */
-// OBSOLETE finish_block (new->name, &local_symbols, new->old_blocks,
-// OBSOLETE new->start_addr, valu, objfile);
-// OBSOLETE }
-// OBSOLETE else
-// OBSOLETE {
-// OBSOLETE /* attach local_symbols to the end of new->locals */
-// OBSOLETE if (!new->locals)
-// OBSOLETE new->locals = local_symbols;
-// OBSOLETE else
-// OBSOLETE {
-// OBSOLETE struct pending *p;
-// OBSOLETE
-// OBSOLETE p = new->locals;
-// OBSOLETE while (p->next)
-// OBSOLETE p = p->next;
-// OBSOLETE p->next = local_symbols;
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE if (OS9K_VARIABLES_INSIDE_BLOCK (desc, processing_gcc_compilation))
-// OBSOLETE /* Now pop locals of block just finished. */
-// OBSOLETE local_symbols = new->locals;
-// OBSOLETE break;
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE case N_SYM_SLINE:
-// OBSOLETE /* This type of "symbol" really just records
-// OBSOLETE one line-number -- core-address correspondence.
-// OBSOLETE Enter it in the line list for this symbol table. */
-// OBSOLETE /* Relocate for dynamic loading and for ELF acc fn-relative syms. */
-// OBSOLETE valu += ANOFFSET (section_offsets, SECT_OFF_TEXT (objfile));
-// OBSOLETE /* FIXME: loses if sizeof (char *) > sizeof (int) */
-// OBSOLETE gdb_assert (sizeof (name) <= sizeof (int));
-// OBSOLETE record_line (current_subfile, (int) name, valu);
-// OBSOLETE break;
-// OBSOLETE
-// OBSOLETE /* The following symbol types need to have the appropriate offset added
-// OBSOLETE to their value; then we process symbol definitions in the name. */
-// OBSOLETE case N_SYM_SYM:
-// OBSOLETE
-// OBSOLETE if (name)
-// OBSOLETE {
-// OBSOLETE char deftype;
-// OBSOLETE char *dirn, *n;
-// OBSOLETE char *p = strchr (name, ':');
-// OBSOLETE if (p == NULL)
-// OBSOLETE deftype = '\0';
-// OBSOLETE else
-// OBSOLETE deftype = p[1];
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE switch (deftype)
-// OBSOLETE {
-// OBSOLETE case 'S':
-// OBSOLETE valu += ANOFFSET (section_offsets, SECT_OFF_TEXT (objfile));
-// OBSOLETE n = strrchr (name, '/');
-// OBSOLETE if (n != NULL)
-// OBSOLETE {
-// OBSOLETE *n = '\0';
-// OBSOLETE n++;
-// OBSOLETE dirn = name;
-// OBSOLETE }
-// OBSOLETE else
-// OBSOLETE {
-// OBSOLETE n = name;
-// OBSOLETE dirn = NULL;
-// OBSOLETE }
-// OBSOLETE *p = '\0';
-// OBSOLETE if (symfile_depth++ == 0)
-// OBSOLETE {
-// OBSOLETE if (last_source_file)
-// OBSOLETE {
-// OBSOLETE end_symtab (valu, objfile, SECT_OFF_TEXT (objfile));
-// OBSOLETE end_stabs ();
-// OBSOLETE }
-// OBSOLETE start_stabs ();
-// OBSOLETE os9k_stabs = 1;
-// OBSOLETE start_symtab (n, dirn, valu);
-// OBSOLETE record_debugformat ("OS9");
-// OBSOLETE }
-// OBSOLETE else
-// OBSOLETE {
-// OBSOLETE push_subfile ();
-// OBSOLETE start_subfile (n, dirn != NULL ? dirn : current_subfile->dirname);
-// OBSOLETE }
-// OBSOLETE break;
-// OBSOLETE
-// OBSOLETE case 'f':
-// OBSOLETE case 'F':
-// OBSOLETE valu += ANOFFSET (section_offsets, SECT_OFF_TEXT (objfile));
-// OBSOLETE function_stab_type = type;
-// OBSOLETE
-// OBSOLETE within_function = 1;
-// OBSOLETE new = push_context (0, valu);
-// OBSOLETE new->name = define_symbol (valu, name, desc, type, objfile);
-// OBSOLETE break;
-// OBSOLETE
-// OBSOLETE case 'V':
-// OBSOLETE case 'v':
-// OBSOLETE valu += ANOFFSET (section_offsets, SECT_OFF_DATA (objfile));
-// OBSOLETE define_symbol (valu, name, desc, type, objfile);
-// OBSOLETE break;
-// OBSOLETE
-// OBSOLETE default:
-// OBSOLETE define_symbol (valu, name, desc, type, objfile);
-// OBSOLETE break;
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE break;
-// OBSOLETE
-// OBSOLETE case N_SYM_SE:
-// OBSOLETE if (--symfile_depth != 0)
-// OBSOLETE start_subfile (pop_subfile (), current_subfile->dirname);
-// OBSOLETE break;
-// OBSOLETE
-// OBSOLETE default:
-// OBSOLETE complain (&unknown_symtype_complaint,
-// OBSOLETE local_hex_string ((unsigned long) type));
-// OBSOLETE /* FALLTHROUGH */
-// OBSOLETE break;
-// OBSOLETE
-// OBSOLETE case N_SYM_CMPLR:
-// OBSOLETE break;
-// OBSOLETE }
-// OBSOLETE previous_stab_code = type;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE static struct sym_fns os9k_sym_fns =
-// OBSOLETE {
-// OBSOLETE bfd_target_os9k_flavour,
-// OBSOLETE os9k_new_init, /* sym_new_init: init anything gbl to entire symtab */
-// OBSOLETE os9k_symfile_init, /* sym_init: read initial info, setup for sym_read() */
-// OBSOLETE os9k_symfile_read, /* sym_read: read a symbol file into symtab */
-// OBSOLETE os9k_symfile_finish, /* sym_finish: finished with file, cleanup */
-// OBSOLETE default_symfile_offsets, /* sym_offsets: parse user's offsets to internal form */
-// OBSOLETE NULL /* next: pointer to next struct sym_fns */
-// OBSOLETE };
-// OBSOLETE
-// OBSOLETE void
-// OBSOLETE _initialize_os9kread (void)
-// OBSOLETE {
-// OBSOLETE add_symtab_fns (&os9k_sym_fns);
-// OBSOLETE }
+++ /dev/null
-// OBSOLETE /* Remote debugging interface for Motorola's MVME187BUG monitor, an embedded
-// OBSOLETE monitor for the m88k.
-// OBSOLETE
-// OBSOLETE Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-// OBSOLETE 2002 Free Software Foundation, Inc.
-// OBSOLETE
-// OBSOLETE Contributed by Cygnus Support. Written by K. Richard Pixley.
-// 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 "gdb_string.h"
-// OBSOLETE #include "regcache.h"
-// OBSOLETE #include <ctype.h>
-// OBSOLETE #include <fcntl.h>
-// OBSOLETE #include <setjmp.h>
-// OBSOLETE #include <errno.h>
-// OBSOLETE
-// OBSOLETE #include "terminal.h"
-// OBSOLETE #include "gdbcore.h"
-// OBSOLETE #include "gdbcmd.h"
-// OBSOLETE
-// OBSOLETE #include "serial.h"
-// OBSOLETE #include "remote-utils.h"
-// OBSOLETE
-// OBSOLETE /* External data declarations */
-// OBSOLETE extern int stop_soon_quietly; /* for wait_for_inferior */
-// OBSOLETE
-// OBSOLETE /* Forward data declarations */
-// OBSOLETE extern struct target_ops bug_ops; /* Forward declaration */
-// OBSOLETE
-// OBSOLETE /* Forward function declarations */
-// OBSOLETE static int bug_clear_breakpoints (void);
-// OBSOLETE
-// OBSOLETE static int bug_read_memory (CORE_ADDR memaddr,
-// OBSOLETE unsigned char *myaddr, int len);
-// OBSOLETE
-// OBSOLETE static int bug_write_memory (CORE_ADDR memaddr,
-// OBSOLETE unsigned char *myaddr, int len);
-// OBSOLETE
-// OBSOLETE /* This variable is somewhat arbitrary. It's here so that it can be
-// OBSOLETE set from within a running gdb. */
-// OBSOLETE
-// OBSOLETE static int srec_max_retries = 3;
-// OBSOLETE
-// OBSOLETE /* Each S-record download to the target consists of an S0 header
-// OBSOLETE record, some number of S3 data records, and one S7 termination
-// OBSOLETE record. I call this download a "frame". Srec_frame says how many
-// OBSOLETE bytes will be represented in each frame. */
-// OBSOLETE
-// OBSOLETE #define SREC_SIZE 160
-// OBSOLETE static int srec_frame = SREC_SIZE;
-// OBSOLETE
-// OBSOLETE /* This variable determines how many bytes will be represented in each
-// OBSOLETE S3 s-record. */
-// OBSOLETE
-// OBSOLETE static int srec_bytes = 40;
-// OBSOLETE
-// OBSOLETE /* At one point it appeared to me as though the bug monitor could not
-// OBSOLETE really be expected to receive two sequential characters at 9600
-// OBSOLETE baud reliably. Echo-pacing is an attempt to force data across the
-// OBSOLETE line even in this condition. Specifically, in echo-pace mode, each
-// OBSOLETE character is sent one at a time and we look for the echo before
-// OBSOLETE sending the next. This is excruciatingly slow. */
-// OBSOLETE
-// OBSOLETE static int srec_echo_pace = 0;
-// OBSOLETE
-// OBSOLETE /* How long to wait after an srec for a possible error message.
-// OBSOLETE Similar to the above, I tried sleeping after sending each S3 record
-// OBSOLETE in hopes that I might actually see error messages from the bug
-// OBSOLETE monitor. This might actually work if we were to use sleep
-// OBSOLETE intervals smaller than 1 second. */
-// OBSOLETE
-// OBSOLETE static int srec_sleep = 0;
-// OBSOLETE
-// OBSOLETE /* Every srec_noise records, flub the checksum. This is a debugging
-// OBSOLETE feature. Set the variable to something other than 1 in order to
-// OBSOLETE inject *deliberate* checksum errors. One might do this if one
-// OBSOLETE wanted to test error handling and recovery. */
-// OBSOLETE
-// OBSOLETE static int srec_noise = 0;
-// OBSOLETE
-// OBSOLETE /* Called when SIGALRM signal sent due to alarm() timeout. */
-// OBSOLETE
-// OBSOLETE /* Number of SIGTRAPs we need to simulate. That is, the next
-// OBSOLETE NEED_ARTIFICIAL_TRAP calls to bug_wait should just return
-// OBSOLETE SIGTRAP without actually waiting for anything. */
-// OBSOLETE
-// OBSOLETE static int need_artificial_trap = 0;
-// OBSOLETE
-// OBSOLETE /*
-// OBSOLETE * Download a file specified in 'args', to the bug.
-// OBSOLETE */
-// OBSOLETE
-// OBSOLETE static void
-// OBSOLETE bug_load (char *args, int fromtty)
-// OBSOLETE {
-// OBSOLETE bfd *abfd;
-// OBSOLETE asection *s;
-// OBSOLETE char buffer[1024];
-// OBSOLETE
-// OBSOLETE sr_check_open ();
-// OBSOLETE
-// OBSOLETE inferior_ptid = null_ptid;
-// OBSOLETE abfd = bfd_openr (args, 0);
-// OBSOLETE if (!abfd)
-// OBSOLETE {
-// OBSOLETE printf_filtered ("Unable to open file %s\n", args);
-// OBSOLETE return;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE if (bfd_check_format (abfd, bfd_object) == 0)
-// OBSOLETE {
-// OBSOLETE printf_filtered ("File is not an object file\n");
-// OBSOLETE return;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE s = abfd->sections;
-// OBSOLETE while (s != (asection *) NULL)
-// OBSOLETE {
-// OBSOLETE srec_frame = SREC_SIZE;
-// OBSOLETE if (s->flags & SEC_LOAD)
-// OBSOLETE {
-// OBSOLETE int i;
-// OBSOLETE
-// OBSOLETE char *buffer = xmalloc (srec_frame);
-// OBSOLETE
-// OBSOLETE printf_filtered ("%s\t: 0x%4lx .. 0x%4lx ", s->name, s->vma, s->vma + s->_raw_size);
-// OBSOLETE gdb_flush (gdb_stdout);
-// OBSOLETE for (i = 0; i < s->_raw_size; i += srec_frame)
-// OBSOLETE {
-// OBSOLETE if (srec_frame > s->_raw_size - i)
-// OBSOLETE srec_frame = s->_raw_size - i;
-// OBSOLETE
-// OBSOLETE bfd_get_section_contents (abfd, s, buffer, i, srec_frame);
-// OBSOLETE bug_write_memory (s->vma + i, buffer, srec_frame);
-// OBSOLETE printf_filtered ("*");
-// OBSOLETE gdb_flush (gdb_stdout);
-// OBSOLETE }
-// OBSOLETE printf_filtered ("\n");
-// OBSOLETE xfree (buffer);
-// OBSOLETE }
-// OBSOLETE s = s->next;
-// OBSOLETE }
-// OBSOLETE sprintf (buffer, "rs ip %lx", (unsigned long) abfd->start_address);
-// OBSOLETE sr_write_cr (buffer);
-// OBSOLETE gr_expect_prompt ();
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE #if 0
-// OBSOLETE static char *
-// OBSOLETE get_word (char **p)
-// OBSOLETE {
-// OBSOLETE char *s = *p;
-// OBSOLETE char *word;
-// OBSOLETE char *copy;
-// OBSOLETE size_t len;
-// OBSOLETE
-// OBSOLETE while (isspace (*s))
-// OBSOLETE s++;
-// OBSOLETE
-// OBSOLETE word = s;
-// OBSOLETE
-// OBSOLETE len = 0;
-// OBSOLETE
-// OBSOLETE while (*s && !isspace (*s))
-// OBSOLETE {
-// OBSOLETE s++;
-// OBSOLETE len++;
-// OBSOLETE
-// OBSOLETE }
-// OBSOLETE copy = xmalloc (len + 1);
-// OBSOLETE memcpy (copy, word, len);
-// OBSOLETE copy[len] = 0;
-// OBSOLETE *p = s;
-// OBSOLETE return copy;
-// OBSOLETE }
-// OBSOLETE #endif
-// OBSOLETE
-// OBSOLETE static struct gr_settings bug_settings =
-// OBSOLETE {
-// OBSOLETE "Bug>", /* prompt */
-// OBSOLETE &bug_ops, /* ops */
-// OBSOLETE bug_clear_breakpoints, /* clear_all_breakpoints */
-// OBSOLETE gr_generic_checkin, /* checkin */
-// OBSOLETE };
-// OBSOLETE
-// OBSOLETE static char *cpu_check_strings[] =
-// OBSOLETE {
-// OBSOLETE "=",
-// OBSOLETE "Invalid Register",
-// OBSOLETE };
-// OBSOLETE
-// OBSOLETE static void
-// OBSOLETE bug_open (char *args, int from_tty)
-// OBSOLETE {
-// OBSOLETE if (args == NULL)
-// OBSOLETE args = "";
-// OBSOLETE
-// OBSOLETE gr_open (args, from_tty, &bug_settings);
-// OBSOLETE /* decide *now* whether we are on an 88100 or an 88110 */
-// OBSOLETE sr_write_cr ("rs cr06");
-// OBSOLETE sr_expect ("rs cr06");
-// OBSOLETE
-// OBSOLETE switch (gr_multi_scan (cpu_check_strings, 0))
-// OBSOLETE {
-// OBSOLETE case 0: /* this is an m88100 */
-// OBSOLETE target_is_m88110 = 0;
-// OBSOLETE break;
-// OBSOLETE case 1: /* this is an m88110 */
-// OBSOLETE target_is_m88110 = 1;
-// OBSOLETE break;
-// OBSOLETE default:
-// OBSOLETE internal_error (__FILE__, __LINE__, "failed internal consistency check");
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Tell the remote machine to resume. */
-// OBSOLETE
-// OBSOLETE void
-// OBSOLETE bug_resume (ptid_t ptid, int step, enum target_signal sig)
-// OBSOLETE {
-// OBSOLETE if (step)
-// OBSOLETE {
-// OBSOLETE sr_write_cr ("t");
-// OBSOLETE
-// OBSOLETE /* Force the next bug_wait to return a trap. Not doing anything
-// OBSOLETE about I/O from the target means that the user has to type
-// OBSOLETE "continue" to see any. FIXME, this should be fixed. */
-// OBSOLETE need_artificial_trap = 1;
-// OBSOLETE }
-// OBSOLETE else
-// OBSOLETE sr_write_cr ("g");
-// OBSOLETE
-// OBSOLETE return;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Wait until the remote machine stops, then return,
-// OBSOLETE storing status in STATUS just as `wait' would. */
-// OBSOLETE
-// OBSOLETE static char *wait_strings[] =
-// OBSOLETE {
-// OBSOLETE "At Breakpoint",
-// OBSOLETE "Exception: Data Access Fault (Local Bus Timeout)",
-// OBSOLETE "\r8??\?-Bug>", /* The '\?' avoids creating a trigraph */
-// OBSOLETE "\r197-Bug>",
-// OBSOLETE NULL,
-// OBSOLETE };
-// OBSOLETE
-// OBSOLETE ptid_t
-// OBSOLETE bug_wait (ptid_t ptid, struct target_waitstatus *status)
-// OBSOLETE {
-// OBSOLETE int old_timeout = sr_get_timeout ();
-// OBSOLETE int old_immediate_quit = immediate_quit;
-// OBSOLETE
-// OBSOLETE status->kind = TARGET_WAITKIND_EXITED;
-// OBSOLETE status->value.integer = 0;
-// OBSOLETE
-// OBSOLETE /* read off leftovers from resume so that the rest can be passed
-// OBSOLETE back out as stdout. */
-// OBSOLETE if (need_artificial_trap == 0)
-// OBSOLETE {
-// OBSOLETE sr_expect ("Effective address: ");
-// OBSOLETE (void) sr_get_hex_word ();
-// OBSOLETE sr_expect ("\r\n");
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE sr_set_timeout (-1); /* Don't time out -- user program is running. */
-// OBSOLETE immediate_quit = 1; /* Helps ability to QUIT */
-// OBSOLETE
-// OBSOLETE switch (gr_multi_scan (wait_strings, need_artificial_trap == 0))
-// OBSOLETE {
-// OBSOLETE case 0: /* breakpoint case */
-// OBSOLETE status->kind = TARGET_WAITKIND_STOPPED;
-// OBSOLETE status->value.sig = TARGET_SIGNAL_TRAP;
-// OBSOLETE /* user output from the target can be discarded here. (?) */
-// OBSOLETE gr_expect_prompt ();
-// OBSOLETE break;
-// OBSOLETE
-// OBSOLETE case 1: /* bus error */
-// OBSOLETE status->kind = TARGET_WAITKIND_STOPPED;
-// OBSOLETE status->value.sig = TARGET_SIGNAL_BUS;
-// OBSOLETE /* user output from the target can be discarded here. (?) */
-// OBSOLETE gr_expect_prompt ();
-// OBSOLETE break;
-// OBSOLETE
-// OBSOLETE case 2: /* normal case */
-// OBSOLETE case 3:
-// OBSOLETE if (need_artificial_trap != 0)
-// OBSOLETE {
-// OBSOLETE /* stepping */
-// OBSOLETE status->kind = TARGET_WAITKIND_STOPPED;
-// OBSOLETE status->value.sig = TARGET_SIGNAL_TRAP;
-// OBSOLETE need_artificial_trap--;
-// OBSOLETE break;
-// OBSOLETE }
-// OBSOLETE else
-// OBSOLETE {
-// OBSOLETE /* exit case */
-// OBSOLETE status->kind = TARGET_WAITKIND_EXITED;
-// OBSOLETE status->value.integer = 0;
-// OBSOLETE break;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE case -1: /* trouble */
-// OBSOLETE default:
-// OBSOLETE fprintf_filtered (gdb_stderr,
-// OBSOLETE "Trouble reading target during wait\n");
-// OBSOLETE break;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE sr_set_timeout (old_timeout);
-// OBSOLETE immediate_quit = old_immediate_quit;
-// OBSOLETE return inferior_ptid;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Return the name of register number REGNO
-// OBSOLETE in the form input and output by bug.
-// OBSOLETE
-// OBSOLETE Returns a pointer to a static buffer containing the answer. */
-// OBSOLETE static char *
-// OBSOLETE get_reg_name (int regno)
-// OBSOLETE {
-// OBSOLETE static char *rn[] =
-// OBSOLETE {
-// OBSOLETE "r00", "r01", "r02", "r03", "r04", "r05", "r06", "r07",
-// OBSOLETE "r08", "r09", "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
-// OBSOLETE /* these get confusing because we omit a few and switch some ordering around. */
-// OBSOLETE
-// OBSOLETE "cr01", /* 32 = psr */
-// OBSOLETE "fcr62", /* 33 = fpsr */
-// OBSOLETE "fcr63", /* 34 = fpcr */
-// OBSOLETE "ip", /* this is something of a cheat. */
-// OBSOLETE /* 35 = sxip */
-// OBSOLETE "cr05", /* 36 = snip */
-// OBSOLETE "cr06", /* 37 = sfip */
-// OBSOLETE
-// OBSOLETE "x00", "x01", "x02", "x03", "x04", "x05", "x06", "x07",
-// OBSOLETE "x08", "x09", "x10", "x11", "x12", "x13", "x14", "x15",
-// OBSOLETE "x16", "x17", "x18", "x19", "x20", "x21", "x22", "x23",
-// OBSOLETE "x24", "x25", "x26", "x27", "x28", "x29", "x30", "x31",
-// OBSOLETE };
-// OBSOLETE
-// OBSOLETE return rn[regno];
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE #if 0 /* not currently used */
-// OBSOLETE /* Read from remote while the input matches STRING. Return zero on
-// OBSOLETE success, -1 on failure. */
-// OBSOLETE
-// OBSOLETE static int
-// OBSOLETE bug_scan (char *s)
-// OBSOLETE {
-// OBSOLETE int c;
-// OBSOLETE
-// OBSOLETE while (*s)
-// OBSOLETE {
-// OBSOLETE c = sr_readchar ();
-// OBSOLETE if (c != *s++)
-// OBSOLETE {
-// OBSOLETE fflush (stdout);
-// OBSOLETE printf ("\nNext character is '%c' - %d and s is \"%s\".\n", c, c, --s);
-// OBSOLETE return (-1);
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE return (0);
-// OBSOLETE }
-// OBSOLETE #endif /* never */
-// OBSOLETE
-// OBSOLETE static int
-// OBSOLETE bug_srec_write_cr (char *s)
-// OBSOLETE {
-// OBSOLETE char *p = s;
-// OBSOLETE
-// OBSOLETE if (srec_echo_pace)
-// OBSOLETE for (p = s; *p; ++p)
-// OBSOLETE {
-// OBSOLETE if (sr_get_debug () > 0)
-// OBSOLETE printf ("%c", *p);
-// OBSOLETE
-// OBSOLETE do
-// OBSOLETE serial_write (sr_get_desc (), p, 1);
-// OBSOLETE while (sr_pollchar () != *p);
-// OBSOLETE }
-// OBSOLETE else
-// OBSOLETE {
-// OBSOLETE sr_write_cr (s);
-// OBSOLETE /* return(bug_scan (s) || bug_scan ("\n")); */
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE return (0);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Store register REGNO, or all if REGNO == -1. */
-// OBSOLETE
-// OBSOLETE static void
-// OBSOLETE bug_fetch_register (int regno)
-// OBSOLETE {
-// OBSOLETE sr_check_open ();
-// OBSOLETE
-// OBSOLETE if (regno == -1)
-// OBSOLETE {
-// OBSOLETE int i;
-// OBSOLETE
-// OBSOLETE for (i = 0; i < NUM_REGS; ++i)
-// OBSOLETE bug_fetch_register (i);
-// OBSOLETE }
-// OBSOLETE else if (target_is_m88110 && regno == SFIP_REGNUM)
-// OBSOLETE {
-// OBSOLETE /* m88110 has no sfip. */
-// OBSOLETE long l = 0;
-// OBSOLETE supply_register (regno, (char *) &l);
-// OBSOLETE }
-// OBSOLETE else if (regno < XFP_REGNUM)
-// OBSOLETE {
-// OBSOLETE char buffer[MAX_REGISTER_RAW_SIZE];
-// OBSOLETE
-// OBSOLETE sr_write ("rs ", 3);
-// OBSOLETE sr_write_cr (get_reg_name (regno));
-// OBSOLETE sr_expect ("=");
-// OBSOLETE store_unsigned_integer (buffer, REGISTER_RAW_SIZE (regno),
-// OBSOLETE sr_get_hex_word ());
-// OBSOLETE gr_expect_prompt ();
-// OBSOLETE supply_register (regno, buffer);
-// OBSOLETE }
-// OBSOLETE else
-// OBSOLETE {
-// OBSOLETE /* Float register so we need to parse a strange data format. */
-// OBSOLETE long p;
-// OBSOLETE unsigned char fpreg_buf[10];
-// OBSOLETE
-// OBSOLETE sr_write ("rs ", 3);
-// OBSOLETE sr_write (get_reg_name (regno), strlen (get_reg_name (regno)));
-// OBSOLETE sr_write_cr (";d");
-// OBSOLETE sr_expect ("rs");
-// OBSOLETE sr_expect (get_reg_name (regno));
-// OBSOLETE sr_expect (";d");
-// OBSOLETE sr_expect ("=");
-// OBSOLETE
-// OBSOLETE /* sign */
-// OBSOLETE p = sr_get_hex_digit (1);
-// OBSOLETE fpreg_buf[0] = p << 7;
-// OBSOLETE
-// OBSOLETE /* exponent */
-// OBSOLETE sr_expect ("_");
-// OBSOLETE p = sr_get_hex_digit (1);
-// OBSOLETE fpreg_buf[0] += (p << 4);
-// OBSOLETE fpreg_buf[0] += sr_get_hex_digit (1);
-// OBSOLETE
-// OBSOLETE fpreg_buf[1] = sr_get_hex_digit (1) << 4;
-// OBSOLETE
-// OBSOLETE /* fraction */
-// OBSOLETE sr_expect ("_");
-// OBSOLETE fpreg_buf[1] += sr_get_hex_digit (1);
-// OBSOLETE
-// OBSOLETE fpreg_buf[2] = (sr_get_hex_digit (1) << 4) + sr_get_hex_digit (1);
-// OBSOLETE fpreg_buf[3] = (sr_get_hex_digit (1) << 4) + sr_get_hex_digit (1);
-// OBSOLETE fpreg_buf[4] = (sr_get_hex_digit (1) << 4) + sr_get_hex_digit (1);
-// OBSOLETE fpreg_buf[5] = (sr_get_hex_digit (1) << 4) + sr_get_hex_digit (1);
-// OBSOLETE fpreg_buf[6] = (sr_get_hex_digit (1) << 4) + sr_get_hex_digit (1);
-// OBSOLETE fpreg_buf[7] = (sr_get_hex_digit (1) << 4) + sr_get_hex_digit (1);
-// OBSOLETE fpreg_buf[8] = 0;
-// OBSOLETE fpreg_buf[9] = 0;
-// OBSOLETE
-// OBSOLETE gr_expect_prompt ();
-// OBSOLETE supply_register (regno, fpreg_buf);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE return;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Store register REGNO, or all if REGNO == -1. */
-// OBSOLETE
-// OBSOLETE static void
-// OBSOLETE bug_store_register (int regno)
-// OBSOLETE {
-// OBSOLETE char buffer[1024];
-// OBSOLETE sr_check_open ();
-// OBSOLETE
-// OBSOLETE if (regno == -1)
-// OBSOLETE {
-// OBSOLETE int i;
-// OBSOLETE
-// OBSOLETE for (i = 0; i < NUM_REGS; ++i)
-// OBSOLETE bug_store_register (i);
-// OBSOLETE }
-// OBSOLETE else
-// OBSOLETE {
-// OBSOLETE char *regname;
-// OBSOLETE
-// OBSOLETE regname = get_reg_name (regno);
-// OBSOLETE
-// OBSOLETE if (target_is_m88110 && regno == SFIP_REGNUM)
-// OBSOLETE return;
-// OBSOLETE else if (regno < XFP_REGNUM)
-// OBSOLETE sprintf (buffer, "rs %s %08lx",
-// OBSOLETE regname,
-// OBSOLETE (long) read_register (regno));
-// OBSOLETE else
-// OBSOLETE {
-// OBSOLETE unsigned char *fpreg_buf =
-// OBSOLETE (unsigned char *) ®isters[REGISTER_BYTE (regno)];
-// OBSOLETE
-// OBSOLETE sprintf (buffer, "rs %s %1x_%02x%1x_%1x%02x%02x%02x%02x%02x%02x;d",
-// OBSOLETE regname,
-// OBSOLETE /* sign */
-// OBSOLETE (fpreg_buf[0] >> 7) & 0xf,
-// OBSOLETE /* exponent */
-// OBSOLETE fpreg_buf[0] & 0x7f,
-// OBSOLETE (fpreg_buf[1] >> 8) & 0xf,
-// OBSOLETE /* fraction */
-// OBSOLETE fpreg_buf[1] & 0xf,
-// OBSOLETE fpreg_buf[2],
-// OBSOLETE fpreg_buf[3],
-// OBSOLETE fpreg_buf[4],
-// OBSOLETE fpreg_buf[5],
-// OBSOLETE fpreg_buf[6],
-// OBSOLETE fpreg_buf[7]);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE sr_write_cr (buffer);
-// OBSOLETE gr_expect_prompt ();
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE return;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Transfer LEN bytes between GDB address MYADDR and target address
-// OBSOLETE MEMADDR. If WRITE is non-zero, transfer them to the target,
-// OBSOLETE otherwise transfer them from the target. TARGET is unused.
-// OBSOLETE
-// OBSOLETE Returns the number of bytes transferred. */
-// OBSOLETE
-// OBSOLETE int
-// OBSOLETE bug_xfer_memory (CORE_ADDR memaddr, char *myaddr, int len, int write,
-// OBSOLETE struct mem_attrib *attrib, struct target_ops *target)
-// OBSOLETE {
-// OBSOLETE int res;
-// OBSOLETE
-// OBSOLETE if (len <= 0)
-// OBSOLETE return 0;
-// OBSOLETE
-// OBSOLETE if (write)
-// OBSOLETE res = bug_write_memory (memaddr, myaddr, len);
-// OBSOLETE else
-// OBSOLETE res = bug_read_memory (memaddr, myaddr, len);
-// OBSOLETE
-// OBSOLETE return res;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE static void
-// OBSOLETE start_load (void)
-// OBSOLETE {
-// OBSOLETE char *command;
-// OBSOLETE
-// OBSOLETE command = (srec_echo_pace ? "lo 0 ;x" : "lo 0");
-// OBSOLETE
-// OBSOLETE sr_write_cr (command);
-// OBSOLETE sr_expect (command);
-// OBSOLETE sr_expect ("\r\n");
-// OBSOLETE bug_srec_write_cr ("S0030000FC");
-// OBSOLETE return;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* This is an extremely vulnerable and fragile function. I've made
-// OBSOLETE considerable attempts to make this deterministic, but I've
-// OBSOLETE certainly forgotten something. The trouble is that S-records are
-// OBSOLETE only a partial file format, not a protocol. Worse, apparently the
-// OBSOLETE m88k bug monitor does not run in real time while receiving
-// OBSOLETE S-records. Hence, we must pay excruciating attention to when and
-// OBSOLETE where error messages are returned, and what has actually been sent.
-// OBSOLETE
-// OBSOLETE Each call represents a chunk of memory to be sent to the target.
-// OBSOLETE We break that chunk into an S0 header record, some number of S3
-// OBSOLETE data records each containing srec_bytes, and an S7 termination
-// OBSOLETE record. */
-// OBSOLETE
-// OBSOLETE static char *srecord_strings[] =
-// OBSOLETE {
-// OBSOLETE "S-RECORD",
-// OBSOLETE "-Bug>",
-// OBSOLETE NULL,
-// OBSOLETE };
-// OBSOLETE
-// OBSOLETE static int
-// OBSOLETE bug_write_memory (CORE_ADDR memaddr, unsigned char *myaddr, int len)
-// OBSOLETE {
-// OBSOLETE int done;
-// OBSOLETE int checksum;
-// OBSOLETE int x;
-// OBSOLETE int retries;
-// OBSOLETE char *buffer = alloca ((srec_bytes + 8) << 1);
-// OBSOLETE
-// OBSOLETE retries = 0;
-// OBSOLETE
-// OBSOLETE do
-// OBSOLETE {
-// OBSOLETE done = 0;
-// OBSOLETE
-// OBSOLETE if (retries > srec_max_retries)
-// OBSOLETE return (-1);
-// OBSOLETE
-// OBSOLETE if (retries > 0)
-// OBSOLETE {
-// OBSOLETE if (sr_get_debug () > 0)
-// OBSOLETE printf ("\n<retrying...>\n");
-// OBSOLETE
-// OBSOLETE /* This gr_expect_prompt call is extremely important. Without
-// OBSOLETE it, we will tend to resend our packet so fast that it
-// OBSOLETE will arrive before the bug monitor is ready to receive
-// OBSOLETE it. This would lead to a very ugly resend loop. */
-// OBSOLETE
-// OBSOLETE gr_expect_prompt ();
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE start_load ();
-// OBSOLETE
-// OBSOLETE while (done < len)
-// OBSOLETE {
-// OBSOLETE int thisgo;
-// OBSOLETE int idx;
-// OBSOLETE char *buf = buffer;
-// OBSOLETE CORE_ADDR address;
-// OBSOLETE
-// OBSOLETE checksum = 0;
-// OBSOLETE thisgo = len - done;
-// OBSOLETE if (thisgo > srec_bytes)
-// OBSOLETE thisgo = srec_bytes;
-// OBSOLETE
-// OBSOLETE address = memaddr + done;
-// OBSOLETE sprintf (buf, "S3%02X%08lX", thisgo + 4 + 1, (long) address);
-// OBSOLETE buf += 12;
-// OBSOLETE
-// OBSOLETE checksum += (thisgo + 4 + 1
-// OBSOLETE + (address & 0xff)
-// OBSOLETE + ((address >> 8) & 0xff)
-// OBSOLETE + ((address >> 16) & 0xff)
-// OBSOLETE + ((address >> 24) & 0xff));
-// OBSOLETE
-// OBSOLETE for (idx = 0; idx < thisgo; idx++)
-// OBSOLETE {
-// OBSOLETE sprintf (buf, "%02X", myaddr[idx + done]);
-// OBSOLETE checksum += myaddr[idx + done];
-// OBSOLETE buf += 2;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE if (srec_noise > 0)
-// OBSOLETE {
-// OBSOLETE /* FIXME-NOW: insert a deliberate error every now and then.
-// OBSOLETE This is intended for testing/debugging the error handling
-// OBSOLETE stuff. */
-// OBSOLETE static int counter = 0;
-// OBSOLETE if (++counter > srec_noise)
-// OBSOLETE {
-// OBSOLETE counter = 0;
-// OBSOLETE ++checksum;
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE sprintf (buf, "%02X", ~checksum & 0xff);
-// OBSOLETE bug_srec_write_cr (buffer);
-// OBSOLETE
-// OBSOLETE if (srec_sleep != 0)
-// OBSOLETE sleep (srec_sleep);
-// OBSOLETE
-// OBSOLETE /* This pollchar is probably redundant to the gr_multi_scan
-// OBSOLETE below. Trouble is, we can't be sure when or where an
-// OBSOLETE error message will appear. Apparently, when running at
-// OBSOLETE full speed from a typical sun4, error messages tend to
-// OBSOLETE appear to arrive only *after* the s7 record. */
-// OBSOLETE
-// OBSOLETE if ((x = sr_pollchar ()) != 0)
-// OBSOLETE {
-// OBSOLETE if (sr_get_debug () > 0)
-// OBSOLETE printf ("\n<retrying...>\n");
-// OBSOLETE
-// OBSOLETE ++retries;
-// OBSOLETE
-// OBSOLETE /* flush any remaining input and verify that we are back
-// OBSOLETE at the prompt level. */
-// OBSOLETE gr_expect_prompt ();
-// OBSOLETE /* start all over again. */
-// OBSOLETE start_load ();
-// OBSOLETE done = 0;
-// OBSOLETE continue;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE done += thisgo;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE bug_srec_write_cr ("S7060000000000F9");
-// OBSOLETE ++retries;
-// OBSOLETE
-// OBSOLETE /* Having finished the load, we need to figure out whether we
-// OBSOLETE had any errors. */
-// OBSOLETE }
-// OBSOLETE while (gr_multi_scan (srecord_strings, 0) == 0);;
-// OBSOLETE
-// OBSOLETE return (0);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Copy LEN bytes of data from debugger memory at MYADDR
-// OBSOLETE to inferior's memory at MEMADDR. Returns errno value.
-// OBSOLETE * sb/sh instructions don't work on unaligned addresses, when TU=1.
-// OBSOLETE */
-// OBSOLETE
-// OBSOLETE /* Read LEN bytes from inferior memory at MEMADDR. Put the result
-// OBSOLETE at debugger address MYADDR. Returns errno value. */
-// OBSOLETE static int
-// OBSOLETE bug_read_memory (CORE_ADDR memaddr, unsigned char *myaddr, int len)
-// OBSOLETE {
-// OBSOLETE char request[100];
-// OBSOLETE char *buffer;
-// OBSOLETE char *p;
-// OBSOLETE char type;
-// OBSOLETE char size;
-// OBSOLETE unsigned char c;
-// OBSOLETE unsigned int inaddr;
-// OBSOLETE unsigned int checksum;
-// OBSOLETE
-// OBSOLETE sprintf (request, "du 0 %lx:&%d", (long) memaddr, len);
-// OBSOLETE sr_write_cr (request);
-// OBSOLETE
-// OBSOLETE p = buffer = alloca (len);
-// OBSOLETE
-// OBSOLETE /* scan up through the header */
-// OBSOLETE sr_expect ("S0030000FC");
-// OBSOLETE
-// OBSOLETE while (p < buffer + len)
-// OBSOLETE {
-// OBSOLETE /* scan off any white space. */
-// OBSOLETE while (sr_readchar () != 'S');;
-// OBSOLETE
-// OBSOLETE /* what kind of s-rec? */
-// OBSOLETE type = sr_readchar ();
-// OBSOLETE
-// OBSOLETE /* scan record size */
-// OBSOLETE sr_get_hex_byte (&size);
-// OBSOLETE checksum = size;
-// OBSOLETE --size;
-// OBSOLETE inaddr = 0;
-// OBSOLETE
-// OBSOLETE switch (type)
-// OBSOLETE {
-// OBSOLETE case '7':
-// OBSOLETE case '8':
-// OBSOLETE case '9':
-// OBSOLETE goto done;
-// OBSOLETE
-// OBSOLETE case '3':
-// OBSOLETE sr_get_hex_byte (&c);
-// OBSOLETE inaddr = (inaddr << 8) + c;
-// OBSOLETE checksum += c;
-// OBSOLETE --size;
-// OBSOLETE /* intentional fall through */
-// OBSOLETE case '2':
-// OBSOLETE sr_get_hex_byte (&c);
-// OBSOLETE inaddr = (inaddr << 8) + c;
-// OBSOLETE checksum += c;
-// OBSOLETE --size;
-// OBSOLETE /* intentional fall through */
-// OBSOLETE case '1':
-// OBSOLETE sr_get_hex_byte (&c);
-// OBSOLETE inaddr = (inaddr << 8) + c;
-// OBSOLETE checksum += c;
-// OBSOLETE --size;
-// OBSOLETE sr_get_hex_byte (&c);
-// OBSOLETE inaddr = (inaddr << 8) + c;
-// OBSOLETE checksum += c;
-// OBSOLETE --size;
-// OBSOLETE break;
-// OBSOLETE
-// OBSOLETE default:
-// OBSOLETE /* bonk */
-// OBSOLETE error ("reading s-records.");
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE if (inaddr < memaddr
-// OBSOLETE || (memaddr + len) < (inaddr + size))
-// OBSOLETE error ("srec out of memory range.");
-// OBSOLETE
-// OBSOLETE if (p != buffer + inaddr - memaddr)
-// OBSOLETE error ("srec out of sequence.");
-// OBSOLETE
-// OBSOLETE for (; size; --size, ++p)
-// OBSOLETE {
-// OBSOLETE sr_get_hex_byte (p);
-// OBSOLETE checksum += *p;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE sr_get_hex_byte (&c);
-// OBSOLETE if (c != (~checksum & 0xff))
-// OBSOLETE error ("bad s-rec checksum");
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE done:
-// OBSOLETE gr_expect_prompt ();
-// OBSOLETE if (p != buffer + len)
-// OBSOLETE return (1);
-// OBSOLETE
-// OBSOLETE memcpy (myaddr, buffer, len);
-// OBSOLETE return (0);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE #define MAX_BREAKS 16
-// OBSOLETE static int num_brkpts = 0;
-// OBSOLETE
-// OBSOLETE /* Insert a breakpoint at ADDR. SAVE is normally the address of the
-// OBSOLETE pattern buffer where the instruction that the breakpoint overwrites
-// OBSOLETE is saved. It is unused here since the bug is responsible for
-// OBSOLETE saving/restoring the original instruction. */
-// OBSOLETE
-// OBSOLETE static int
-// OBSOLETE bug_insert_breakpoint (CORE_ADDR addr, char *save)
-// OBSOLETE {
-// OBSOLETE sr_check_open ();
-// OBSOLETE
-// OBSOLETE if (num_brkpts < MAX_BREAKS)
-// OBSOLETE {
-// OBSOLETE char buffer[100];
-// OBSOLETE
-// OBSOLETE num_brkpts++;
-// OBSOLETE sprintf (buffer, "br %lx", (long) addr);
-// OBSOLETE sr_write_cr (buffer);
-// OBSOLETE gr_expect_prompt ();
-// OBSOLETE return (0);
-// OBSOLETE }
-// OBSOLETE else
-// OBSOLETE {
-// OBSOLETE fprintf_filtered (gdb_stderr,
-// OBSOLETE "Too many break points, break point not installed\n");
-// OBSOLETE return (1);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Remove a breakpoint at ADDR. SAVE is normally the previously
-// OBSOLETE saved pattern, but is unused here since the bug is responsible
-// OBSOLETE for saving/restoring instructions. */
-// OBSOLETE
-// OBSOLETE static int
-// OBSOLETE bug_remove_breakpoint (CORE_ADDR addr, char *save)
-// OBSOLETE {
-// OBSOLETE if (num_brkpts > 0)
-// OBSOLETE {
-// OBSOLETE char buffer[100];
-// OBSOLETE
-// OBSOLETE num_brkpts--;
-// OBSOLETE sprintf (buffer, "nobr %lx", (long) addr);
-// OBSOLETE sr_write_cr (buffer);
-// OBSOLETE gr_expect_prompt ();
-// OBSOLETE
-// OBSOLETE }
-// OBSOLETE return (0);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Clear the bugs notion of what the break points are */
-// OBSOLETE static int
-// OBSOLETE bug_clear_breakpoints (void)
-// OBSOLETE {
-// OBSOLETE
-// OBSOLETE if (sr_is_open ())
-// OBSOLETE {
-// OBSOLETE sr_write_cr ("nobr");
-// OBSOLETE sr_expect ("nobr");
-// OBSOLETE gr_expect_prompt ();
-// OBSOLETE }
-// OBSOLETE num_brkpts = 0;
-// OBSOLETE return (0);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE struct target_ops bug_ops;
-// OBSOLETE
-// OBSOLETE static void
-// OBSOLETE init_bug_ops (void)
-// OBSOLETE {
-// OBSOLETE bug_ops.to_shortname = "bug";
-// OBSOLETE "Remote BUG monitor",
-// OBSOLETE bug_ops.to_longname = "Use the mvme187 board running the BUG monitor connected by a serial line.";
-// OBSOLETE bug_ops.to_doc = " ";
-// OBSOLETE bug_ops.to_open = bug_open;
-// OBSOLETE bug_ops.to_close = gr_close;
-// OBSOLETE bug_ops.to_attach = 0;
-// OBSOLETE bug_ops.to_post_attach = NULL;
-// OBSOLETE bug_ops.to_require_attach = NULL;
-// OBSOLETE bug_ops.to_detach = gr_detach;
-// OBSOLETE bug_ops.to_require_detach = NULL;
-// OBSOLETE bug_ops.to_resume = bug_resume;
-// OBSOLETE bug_ops.to_wait = bug_wait;
-// OBSOLETE bug_ops.to_post_wait = NULL;
-// OBSOLETE bug_ops.to_fetch_registers = bug_fetch_register;
-// OBSOLETE bug_ops.to_store_registers = bug_store_register;
-// OBSOLETE bug_ops.to_prepare_to_store = gr_prepare_to_store;
-// OBSOLETE bug_ops.to_xfer_memory = bug_xfer_memory;
-// OBSOLETE bug_ops.to_files_info = gr_files_info;
-// OBSOLETE bug_ops.to_insert_breakpoint = bug_insert_breakpoint;
-// OBSOLETE bug_ops.to_remove_breakpoint = bug_remove_breakpoint;
-// OBSOLETE bug_ops.to_terminal_init = 0;
-// OBSOLETE bug_ops.to_terminal_inferior = 0;
-// OBSOLETE bug_ops.to_terminal_ours_for_output = 0;
-// OBSOLETE bug_ops.to_terminal_ours = 0;
-// OBSOLETE bug_ops.to_terminal_info = 0;
-// OBSOLETE bug_ops.to_kill = gr_kill;
-// OBSOLETE bug_ops.to_load = bug_load;
-// OBSOLETE bug_ops.to_lookup_symbol = 0;
-// OBSOLETE bug_ops.to_create_inferior = gr_create_inferior;
-// OBSOLETE bug_ops.to_post_startup_inferior = NULL;
-// OBSOLETE bug_ops.to_acknowledge_created_inferior = NULL;
-// OBSOLETE bug_ops.to_clone_and_follow_inferior = NULL;
-// OBSOLETE bug_ops.to_post_follow_inferior_by_clone = NULL;
-// OBSOLETE bug_ops.to_insert_fork_catchpoint = NULL;
-// OBSOLETE bug_ops.to_remove_fork_catchpoint = NULL;
-// OBSOLETE bug_ops.to_insert_vfork_catchpoint = NULL;
-// OBSOLETE bug_ops.to_remove_vfork_catchpoint = NULL;
-// OBSOLETE bug_ops.to_has_forked = NULL;
-// OBSOLETE bug_ops.to_has_vforked = NULL;
-// OBSOLETE bug_ops.to_can_follow_vfork_prior_to_exec = NULL;
-// OBSOLETE bug_ops.to_post_follow_vfork = NULL;
-// OBSOLETE bug_ops.to_insert_exec_catchpoint = NULL;
-// OBSOLETE bug_ops.to_remove_exec_catchpoint = NULL;
-// OBSOLETE bug_ops.to_has_execd = NULL;
-// OBSOLETE bug_ops.to_reported_exec_events_per_exec_call = NULL;
-// OBSOLETE bug_ops.to_has_exited = NULL;
-// OBSOLETE bug_ops.to_mourn_inferior = gr_mourn;
-// OBSOLETE bug_ops.to_can_run = 0;
-// OBSOLETE bug_ops.to_notice_signals = 0;
-// OBSOLETE bug_ops.to_thread_alive = 0;
-// OBSOLETE bug_ops.to_stop = 0;
-// OBSOLETE bug_ops.to_pid_to_exec_file = NULL;
-// OBSOLETE bug_ops.to_stratum = process_stratum;
-// OBSOLETE bug_ops.DONT_USE = 0;
-// OBSOLETE bug_ops.to_has_all_memory = 1;
-// OBSOLETE bug_ops.to_has_memory = 1;
-// OBSOLETE bug_ops.to_has_stack = 1;
-// OBSOLETE bug_ops.to_has_registers = 0;
-// OBSOLETE bug_ops.to_has_execution = 0;
-// OBSOLETE bug_ops.to_sections = 0;
-// OBSOLETE bug_ops.to_sections_end = 0;
-// OBSOLETE bug_ops.to_magic = OPS_MAGIC; /* Always the last thing */
-// OBSOLETE } /* init_bug_ops */
-// OBSOLETE
-// OBSOLETE void
-// OBSOLETE _initialize_remote_bug (void)
-// OBSOLETE {
-// OBSOLETE init_bug_ops ();
-// OBSOLETE add_target (&bug_ops);
-// OBSOLETE
-// OBSOLETE add_show_from_set
-// OBSOLETE (add_set_cmd ("srec-bytes", class_support, var_uinteger,
-// OBSOLETE (char *) &srec_bytes,
-// OBSOLETE "\
-// OBSOLETE Set the number of bytes represented in each S-record.\n\
-// OBSOLETE This affects the communication protocol with the remote target.",
-// OBSOLETE &setlist),
-// OBSOLETE &showlist);
-// OBSOLETE
-// OBSOLETE add_show_from_set
-// OBSOLETE (add_set_cmd ("srec-max-retries", class_support, var_uinteger,
-// OBSOLETE (char *) &srec_max_retries,
-// OBSOLETE "\
-// OBSOLETE Set the number of retries for shipping S-records.\n\
-// OBSOLETE This affects the communication protocol with the remote target.",
-// OBSOLETE &setlist),
-// OBSOLETE &showlist);
-// OBSOLETE
-// OBSOLETE #if 0
-// OBSOLETE /* This needs to set SREC_SIZE, not srec_frame which gets changed at the
-// OBSOLETE end of a download. But do we need the option at all? */
-// OBSOLETE add_show_from_set
-// OBSOLETE (add_set_cmd ("srec-frame", class_support, var_uinteger,
-// OBSOLETE (char *) &srec_frame,
-// OBSOLETE "\
-// OBSOLETE Set the number of bytes in an S-record frame.\n\
-// OBSOLETE This affects the communication protocol with the remote target.",
-// OBSOLETE &setlist),
-// OBSOLETE &showlist);
-// OBSOLETE #endif /* 0 */
-// OBSOLETE
-// OBSOLETE add_show_from_set
-// OBSOLETE (add_set_cmd ("srec-noise", class_support, var_zinteger,
-// OBSOLETE (char *) &srec_noise,
-// OBSOLETE "\
-// OBSOLETE Set number of S-record to send before deliberately flubbing a checksum.\n\
-// OBSOLETE Zero means flub none at all. This affects the communication protocol\n\
-// OBSOLETE with the remote target.",
-// OBSOLETE &setlist),
-// OBSOLETE &showlist);
-// OBSOLETE
-// OBSOLETE add_show_from_set
-// OBSOLETE (add_set_cmd ("srec-sleep", class_support, var_zinteger,
-// OBSOLETE (char *) &srec_sleep,
-// OBSOLETE "\
-// OBSOLETE Set number of seconds to sleep after an S-record for a possible error message to arrive.\n\
-// OBSOLETE This affects the communication protocol with the remote target.",
-// OBSOLETE &setlist),
-// OBSOLETE &showlist);
-// OBSOLETE
-// OBSOLETE add_show_from_set
-// OBSOLETE (add_set_cmd ("srec-echo-pace", class_support, var_boolean,
-// OBSOLETE (char *) &srec_echo_pace,
-// OBSOLETE "\
-// OBSOLETE Set echo-verification.\n\
-// OBSOLETE When on, use verification by echo when downloading S-records. This is\n\
-// OBSOLETE much slower, but generally more reliable.",
-// OBSOLETE &setlist),
-// OBSOLETE &showlist);
-// OBSOLETE }
+++ /dev/null
-// 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 \f
-// 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 \f
-// 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 \f
-// 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 \f
-// 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 (®isters[REGISTER_BYTE (R0_REGNUM)], nindy_regs.local_regs, 16 * 4);
-// OBSOLETE memcpy (®isters[REGISTER_BYTE (G0_REGNUM)], nindy_regs.global_regs, 16 * 4);
-// OBSOLETE memcpy (®isters[REGISTER_BYTE (PCW_REGNUM)], nindy_regs.pcw_acw, 2 * 4);
-// OBSOLETE memcpy (®isters[REGISTER_BYTE (IP_REGNUM)], nindy_regs.ip, 1 * 4);
-// OBSOLETE memcpy (®isters[REGISTER_BYTE (TCW_REGNUM)], nindy_regs.tcw, 1 * 4);
-// OBSOLETE memcpy (®isters[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, ®isters[REGISTER_BYTE (R0_REGNUM)], 16 * 4);
-// OBSOLETE memcpy (nindy_regs.global_regs, ®isters[REGISTER_BYTE (G0_REGNUM)], 16 * 4);
-// OBSOLETE memcpy (nindy_regs.pcw_acw, ®isters[REGISTER_BYTE (PCW_REGNUM)], 2 * 4);
-// OBSOLETE memcpy (nindy_regs.ip, ®isters[REGISTER_BYTE (IP_REGNUM)], 1 * 4);
-// OBSOLETE memcpy (nindy_regs.tcw, ®isters[REGISTER_BYTE (TCW_REGNUM)], 1 * 4);
-// OBSOLETE memcpy (nindy_regs.fp_as_double, ®isters[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 \f
-// 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 \f
-// 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 \f
-// 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 }
+++ /dev/null
-// 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 }
+++ /dev/null
-// OBSOLETE /* Remote debugging interface for boot monitors, for GDB.
-// OBSOLETE
-// OBSOLETE Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999,
-// 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 /* This file was derived from remote-eb.c, which did a similar job, but for
-// OBSOLETE an AMD-29K running EBMON. That file was in turn derived from remote.c
-// OBSOLETE as mentioned in the following comment (left in for comic relief):
-// OBSOLETE
-// OBSOLETE "This is like remote.c but is for a different situation--
-// OBSOLETE having a PC running os9000 hook up with a unix machine with
-// OBSOLETE a serial line, and running ctty com2 on the PC. os9000 has a debug
-// OBSOLETE monitor called ROMBUG running. Not to mention that the PC
-// OBSOLETE has PC/NFS, so it can access the same executables that gdb can,
-// OBSOLETE over the net in real time."
-// OBSOLETE
-// OBSOLETE In reality, this module talks to a debug monitor called 'ROMBUG', which
-// OBSOLETE We communicate with ROMBUG via a direct serial line, the network version
-// OBSOLETE of ROMBUG is not available yet.
-// OBSOLETE */
-// OBSOLETE
-// OBSOLETE /* FIXME This file needs to be rewritten if it's to work again, either
-// OBSOLETE to self-contained or to use the new monitor interface. */
-// OBSOLETE
-// OBSOLETE #include "defs.h"
-// OBSOLETE #include "gdbcore.h"
-// OBSOLETE #include "target.h"
-// OBSOLETE #include "gdb_string.h"
-// OBSOLETE #include <sys/types.h>
-// OBSOLETE #include "command.h"
-// OBSOLETE #include "serial.h"
-// OBSOLETE #include "monitor.h"
-// OBSOLETE #include "remote-utils.h"
-// OBSOLETE #include "symtab.h"
-// OBSOLETE #include "symfile.h"
-// OBSOLETE #include "objfiles.h"
-// OBSOLETE #include "gdb-stabs.h"
-// OBSOLETE #include "regcache.h"
-// OBSOLETE
-// OBSOLETE struct cmd_list_element *showlist;
-// OBSOLETE extern struct target_ops rombug_ops; /* Forward declaration */
-// OBSOLETE extern struct monitor_ops rombug_cmds; /* Forward declaration */
-// OBSOLETE extern struct cmd_list_element *setlist;
-// OBSOLETE extern struct cmd_list_element *unsetlist;
-// OBSOLETE extern int attach_flag;
-// OBSOLETE
-// OBSOLETE static void rombug_close ();
-// OBSOLETE static void rombug_fetch_register ();
-// OBSOLETE static void rombug_fetch_registers ();
-// OBSOLETE static void rombug_store_register ();
-// OBSOLETE #if 0
-// OBSOLETE static int sr_get_debug (); /* flag set by "set remotedebug" */
-// OBSOLETE #endif
-// OBSOLETE static int hashmark; /* flag set by "set hash" */
-// OBSOLETE static int rombug_is_open = 0;
-// OBSOLETE
-// OBSOLETE /* FIXME: Replace with sr_get_debug (). */
-// OBSOLETE #define LOG_FILE "monitor.log"
-// OBSOLETE FILE *log_file;
-// OBSOLETE static int monitor_log = 0;
-// OBSOLETE static int tty_xon = 0;
-// OBSOLETE static int tty_xoff = 0;
-// OBSOLETE
-// OBSOLETE static int timeout = 10;
-// OBSOLETE static int is_trace_mode = 0;
-// OBSOLETE /* Descriptor for I/O to remote machine. Initialize it to NULL */
-// OBSOLETE static struct serial *monitor_desc = NULL;
-// OBSOLETE
-// OBSOLETE static CORE_ADDR bufaddr = 0;
-// OBSOLETE static int buflen = 0;
-// OBSOLETE static char readbuf[16];
-// OBSOLETE
-// OBSOLETE /* Send data to monitor. Works just like printf. */
-// OBSOLETE static void
-// OBSOLETE printf_monitor (char *pattern,...)
-// OBSOLETE {
-// OBSOLETE va_list args;
-// OBSOLETE char buf[200];
-// OBSOLETE int i;
-// OBSOLETE
-// OBSOLETE va_start (args, pattern);
-// OBSOLETE
-// OBSOLETE vsprintf (buf, pattern, args);
-// OBSOLETE va_end (args);
-// OBSOLETE
-// OBSOLETE if (serial_write (monitor_desc, buf, strlen (buf)))
-// OBSOLETE fprintf_unfiltered (gdb_stderr, "serial_write failed: %s\n",
-// OBSOLETE safe_strerror (errno));
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Read a character from the remote system, doing all the fancy timeout stuff */
-// OBSOLETE static int
-// OBSOLETE readchar (int timeout)
-// OBSOLETE {
-// OBSOLETE int c;
-// OBSOLETE
-// OBSOLETE c = serial_readchar (monitor_desc, timeout);
-// OBSOLETE
-// OBSOLETE if (sr_get_debug ())
-// OBSOLETE putchar (c & 0x7f);
-// OBSOLETE
-// OBSOLETE if (monitor_log && isascii (c))
-// OBSOLETE putc (c & 0x7f, log_file);
-// OBSOLETE
-// OBSOLETE if (c >= 0)
-// OBSOLETE return c & 0x7f;
-// OBSOLETE
-// OBSOLETE if (c == SERIAL_TIMEOUT)
-// OBSOLETE {
-// OBSOLETE if (timeout == 0)
-// OBSOLETE return c; /* Polls shouldn't generate timeout errors */
-// OBSOLETE
-// OBSOLETE error ("Timeout reading from remote system.");
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE perror_with_name ("remote-monitor");
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Scan input from the remote system, until STRING is found. If DISCARD is
-// OBSOLETE non-zero, then discard non-matching input, else print it out.
-// OBSOLETE Let the user break out immediately. */
-// OBSOLETE static void
-// OBSOLETE expect (char *string, int discard)
-// OBSOLETE {
-// OBSOLETE char *p = string;
-// OBSOLETE int c;
-// OBSOLETE
-// OBSOLETE if (sr_get_debug ())
-// OBSOLETE printf ("Expecting \"%s\"\n", string);
-// OBSOLETE
-// OBSOLETE immediate_quit++;
-// OBSOLETE while (1)
-// OBSOLETE {
-// OBSOLETE c = readchar (timeout);
-// OBSOLETE if (!isascii (c))
-// OBSOLETE continue;
-// OBSOLETE if (c == *p++)
-// OBSOLETE {
-// OBSOLETE if (*p == '\0')
-// OBSOLETE {
-// OBSOLETE immediate_quit--;
-// OBSOLETE if (sr_get_debug ())
-// OBSOLETE printf ("\nMatched\n");
-// OBSOLETE return;
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE else
-// OBSOLETE {
-// OBSOLETE if (!discard)
-// OBSOLETE {
-// OBSOLETE fwrite (string, 1, (p - 1) - string, stdout);
-// OBSOLETE putchar ((char) c);
-// OBSOLETE fflush (stdout);
-// OBSOLETE }
-// OBSOLETE p = string;
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Keep discarding input until we see the ROMBUG prompt.
-// OBSOLETE
-// OBSOLETE The convention for dealing with the prompt is that you
-// OBSOLETE o give your command
-// OBSOLETE o *then* wait for the prompt.
-// OBSOLETE
-// OBSOLETE Thus the last thing that a procedure does with the serial line
-// OBSOLETE will be an expect_prompt(). Exception: rombug_resume does not
-// OBSOLETE wait for the prompt, because the terminal is being handed over
-// OBSOLETE to the inferior. However, the next thing which happens after that
-// OBSOLETE is a rombug_wait which does wait for the prompt.
-// OBSOLETE Note that this includes abnormal exit, e.g. error(). This is
-// OBSOLETE necessary to prevent getting into states from which we can't
-// OBSOLETE recover. */
-// OBSOLETE static void
-// OBSOLETE expect_prompt (int discard)
-// OBSOLETE {
-// OBSOLETE if (monitor_log)
-// OBSOLETE /* This is a convenient place to do this. The idea is to do it often
-// OBSOLETE enough that we never lose much data if we terminate abnormally. */
-// OBSOLETE fflush (log_file);
-// OBSOLETE
-// OBSOLETE if (is_trace_mode)
-// OBSOLETE {
-// OBSOLETE expect ("trace", discard);
-// OBSOLETE }
-// OBSOLETE else
-// OBSOLETE {
-// OBSOLETE expect (PROMPT, discard);
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Get a hex digit from the remote system & return its value.
-// OBSOLETE If ignore_space is nonzero, ignore spaces (not newline, tab, etc). */
-// OBSOLETE static int
-// OBSOLETE get_hex_digit (int ignore_space)
-// OBSOLETE {
-// OBSOLETE int ch;
-// OBSOLETE while (1)
-// OBSOLETE {
-// OBSOLETE ch = readchar (timeout);
-// OBSOLETE if (ch >= '0' && ch <= '9')
-// OBSOLETE return ch - '0';
-// OBSOLETE else if (ch >= 'A' && ch <= 'F')
-// OBSOLETE return ch - 'A' + 10;
-// OBSOLETE else if (ch >= 'a' && ch <= 'f')
-// OBSOLETE return ch - 'a' + 10;
-// OBSOLETE else if (ch == ' ' && ignore_space)
-// OBSOLETE ;
-// OBSOLETE else
-// OBSOLETE {
-// OBSOLETE expect_prompt (1);
-// OBSOLETE error ("Invalid hex digit from remote system.");
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Get a byte from monitor and put it in *BYT. Accept any number
-// OBSOLETE leading spaces. */
-// OBSOLETE static void
-// OBSOLETE get_hex_byte (char *byt)
-// OBSOLETE {
-// OBSOLETE int val;
-// OBSOLETE
-// OBSOLETE val = get_hex_digit (1) << 4;
-// OBSOLETE val |= get_hex_digit (0);
-// OBSOLETE *byt = val;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Get N 32-bit words from remote, each preceded by a space,
-// OBSOLETE and put them in registers starting at REGNO. */
-// OBSOLETE static void
-// OBSOLETE get_hex_regs (int n, int regno)
-// OBSOLETE {
-// OBSOLETE long val;
-// OBSOLETE int i;
-// OBSOLETE unsigned char b;
-// OBSOLETE
-// OBSOLETE for (i = 0; i < n; i++)
-// OBSOLETE {
-// OBSOLETE int j;
-// OBSOLETE
-// OBSOLETE val = 0;
-// OBSOLETE for (j = 0; j < 4; j++)
-// OBSOLETE {
-// OBSOLETE get_hex_byte (&b);
-// OBSOLETE if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
-// OBSOLETE val = (val << 8) + b;
-// OBSOLETE else
-// OBSOLETE val = val + (b << (j * 8));
-// OBSOLETE }
-// OBSOLETE supply_register (regno++, (char *) &val);
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* This is called not only when we first attach, but also when the
-// OBSOLETE user types "run" after having attached. */
-// OBSOLETE static void
-// OBSOLETE rombug_create_inferior (char *execfile, char *args, char **env)
-// OBSOLETE {
-// OBSOLETE int entry_pt;
-// OBSOLETE
-// OBSOLETE if (args && *args)
-// OBSOLETE error ("Can't pass arguments to remote ROMBUG 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 if (monitor_log)
-// OBSOLETE fputs ("\nIn Create_inferior()", log_file);
-// OBSOLETE
-// 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 init_wait_for_inferior ();
-// OBSOLETE proceed ((CORE_ADDR) entry_pt, TARGET_SIGNAL_DEFAULT, 0);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Open a connection to a remote debugger.
-// OBSOLETE NAME is the filename used for communication. */
-// OBSOLETE
-// OBSOLETE static char dev_name[100];
-// OBSOLETE
-// OBSOLETE static void
-// OBSOLETE rombug_open (char *args, int from_tty)
-// OBSOLETE {
-// OBSOLETE if (args == NULL)
-// OBSOLETE error ("Use `target RomBug DEVICE-NAME' to use a serial port, or \n\
-// OBSOLETE `target RomBug HOST-NAME:PORT-NUMBER' to use a network connection.");
-// OBSOLETE
-// OBSOLETE target_preopen (from_tty);
-// OBSOLETE
-// OBSOLETE if (rombug_is_open)
-// OBSOLETE unpush_target (&rombug_ops);
-// OBSOLETE
-// OBSOLETE strcpy (dev_name, args);
-// OBSOLETE monitor_desc = serial_open (dev_name);
-// OBSOLETE if (monitor_desc == NULL)
-// OBSOLETE perror_with_name (dev_name);
-// OBSOLETE
-// OBSOLETE /* if baud rate is set by 'set remotebaud' */
-// OBSOLETE if (serial_setbaudrate (monitor_desc, sr_get_baud_rate ()))
-// OBSOLETE {
-// OBSOLETE serial_close (monitor_desc);
-// OBSOLETE perror_with_name ("RomBug");
-// OBSOLETE }
-// OBSOLETE serial_raw (monitor_desc);
-// OBSOLETE if (tty_xon || tty_xoff)
-// OBSOLETE {
-// OBSOLETE struct hardware_ttystate
-// OBSOLETE {
-// OBSOLETE struct termios t;
-// OBSOLETE }
-// OBSOLETE *tty_s;
-// OBSOLETE
-// OBSOLETE tty_s = (struct hardware_ttystate *) serial_get_tty_state (monitor_desc);
-// OBSOLETE if (tty_xon)
-// OBSOLETE tty_s->t.c_iflag |= IXON;
-// OBSOLETE if (tty_xoff)
-// OBSOLETE tty_s->t.c_iflag |= IXOFF;
-// OBSOLETE serial_set_tty_state (monitor_desc, (serial_ttystate) tty_s);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE rombug_is_open = 1;
-// OBSOLETE
-// OBSOLETE log_file = fopen (LOG_FILE, "w");
-// OBSOLETE if (log_file == NULL)
-// OBSOLETE perror_with_name (LOG_FILE);
-// OBSOLETE
-// OBSOLETE push_monitor (&rombug_cmds);
-// OBSOLETE printf_monitor ("\r"); /* CR wakes up monitor */
-// OBSOLETE expect_prompt (1);
-// OBSOLETE push_target (&rombug_ops);
-// OBSOLETE attach_flag = 1;
-// OBSOLETE
-// OBSOLETE if (from_tty)
-// OBSOLETE printf ("Remote %s connected to %s\n", target_shortname,
-// OBSOLETE dev_name);
-// OBSOLETE
-// OBSOLETE rombug_fetch_registers ();
-// OBSOLETE
-// OBSOLETE printf_monitor ("ov e \r");
-// OBSOLETE expect_prompt (1);
-// OBSOLETE bufaddr = 0;
-// OBSOLETE buflen = 0;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /*
-// OBSOLETE * Close out all files and local state before this target loses control.
-// OBSOLETE */
-// OBSOLETE
-// OBSOLETE static void
-// OBSOLETE rombug_close (int quitting)
-// OBSOLETE {
-// OBSOLETE if (rombug_is_open)
-// OBSOLETE {
-// OBSOLETE serial_close (monitor_desc);
-// OBSOLETE monitor_desc = NULL;
-// OBSOLETE rombug_is_open = 0;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE if (log_file)
-// OBSOLETE {
-// OBSOLETE if (ferror (log_file))
-// OBSOLETE fprintf_unfiltered (gdb_stderr, "Error writing log file.\n");
-// OBSOLETE if (fclose (log_file) != 0)
-// OBSOLETE fprintf_unfiltered (gdb_stderr, "Error closing log file.\n");
-// OBSOLETE log_file = 0;
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE int
-// OBSOLETE rombug_link (char *mod_name, CORE_ADDR *text_reloc)
-// OBSOLETE {
-// OBSOLETE int i, j;
-// OBSOLETE unsigned long val;
-// OBSOLETE unsigned char b;
-// OBSOLETE
-// OBSOLETE printf_monitor ("l %s \r", mod_name);
-// OBSOLETE expect_prompt (1);
-// OBSOLETE printf_monitor (".r \r");
-// OBSOLETE expect (REG_DELIM, 1);
-// OBSOLETE for (i = 0; i <= 7; i++)
-// OBSOLETE {
-// OBSOLETE val = 0;
-// OBSOLETE for (j = 0; j < 4; j++)
-// OBSOLETE {
-// OBSOLETE get_hex_byte (&b);
-// OBSOLETE val = (val << 8) + b;
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE expect_prompt (1);
-// OBSOLETE *text_reloc = val;
-// OBSOLETE return 1;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Terminate the open connection to the remote debugger.
-// OBSOLETE Use this when you want to detach and do something else
-// OBSOLETE with your gdb. */
-// OBSOLETE static void
-// OBSOLETE rombug_detach (int from_tty)
-// OBSOLETE {
-// OBSOLETE if (attach_flag)
-// OBSOLETE {
-// OBSOLETE printf_monitor (GO_CMD);
-// OBSOLETE attach_flag = 0;
-// OBSOLETE }
-// OBSOLETE pop_target (); /* calls rombug_close to do the real work */
-// OBSOLETE if (from_tty)
-// OBSOLETE printf ("Ending remote %s debugging\n", target_shortname);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /*
-// OBSOLETE * Tell the remote machine to resume.
-// OBSOLETE */
-// OBSOLETE static void
-// OBSOLETE rombug_resume (ptid_t ptid, int step, enum target_signal sig)
-// OBSOLETE {
-// OBSOLETE if (monitor_log)
-// OBSOLETE fprintf (log_file, "\nIn Resume (step=%d, sig=%d)\n", step, sig);
-// OBSOLETE
-// OBSOLETE if (step)
-// OBSOLETE {
-// OBSOLETE is_trace_mode = 1;
-// OBSOLETE printf_monitor (STEP_CMD);
-// OBSOLETE /* wait for the echo. **
-// OBSOLETE expect (STEP_CMD, 1);
-// OBSOLETE */
-// OBSOLETE }
-// OBSOLETE else
-// OBSOLETE {
-// OBSOLETE printf_monitor (GO_CMD);
-// OBSOLETE /* swallow the echo. **
-// OBSOLETE expect (GO_CMD, 1);
-// OBSOLETE */
-// OBSOLETE }
-// OBSOLETE bufaddr = 0;
-// OBSOLETE buflen = 0;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /*
-// OBSOLETE * Wait until the remote machine stops, then return,
-// OBSOLETE * storing status in status just as `wait' would.
-// OBSOLETE */
-// OBSOLETE
-// OBSOLETE static ptid *
-// OBSOLETE rombug_wait (ptid_t ptid, struct target_waitstatus *status)
-// OBSOLETE {
-// OBSOLETE int old_timeout = timeout;
-// OBSOLETE struct section_offsets *offs;
-// OBSOLETE CORE_ADDR addr, pc;
-// OBSOLETE struct obj_section *obj_sec;
-// OBSOLETE
-// OBSOLETE if (monitor_log)
-// OBSOLETE fputs ("\nIn wait ()", log_file);
-// OBSOLETE
-// OBSOLETE status->kind = TARGET_WAITKIND_EXITED;
-// OBSOLETE status->value.integer = 0;
-// OBSOLETE
-// OBSOLETE timeout = -1; /* Don't time out -- user program is running. */
-// OBSOLETE expect ("eax:", 0); /* output any message before register display */
-// OBSOLETE expect_prompt (1); /* Wait for prompt, outputting extraneous text */
-// OBSOLETE
-// OBSOLETE status->kind = TARGET_WAITKIND_STOPPED;
-// OBSOLETE status->value.sig = TARGET_SIGNAL_TRAP;
-// OBSOLETE timeout = old_timeout;
-// OBSOLETE rombug_fetch_registers ();
-// OBSOLETE bufaddr = 0;
-// OBSOLETE buflen = 0;
-// OBSOLETE pc = read_register (PC_REGNUM);
-// OBSOLETE addr = read_register (DATABASE_REG);
-// OBSOLETE obj_sec = find_pc_section (pc);
-// OBSOLETE if (obj_sec != NULL)
-// OBSOLETE {
-// OBSOLETE if (obj_sec->objfile != symfile_objfile)
-// OBSOLETE new_symfile_objfile (obj_sec->objfile, 1, 0);
-// OBSOLETE offs = (struct section_offsets *) alloca (SIZEOF_SECTION_OFFSETS);
-// OBSOLETE memcpy (offs, symfile_objfile->section_offsets, SIZEOF_SECTION_OFFSETS);
-// OBSOLETE offs->offsets[SECT_OFF_DATA (symfile_objfile)] = addr;
-// OBSOLETE offs->offsets[SECT_OFF_BSS (symfile_objfile)] = addr;
-// OBSOLETE
-// OBSOLETE objfile_relocate (symfile_objfile, offs);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE return inferior_ptid;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Return the name of register number regno in the form input and output by
-// OBSOLETE monitor. Currently, register_names just happens to contain exactly what
-// OBSOLETE monitor wants. Lets take advantage of that just as long as possible! */
-// OBSOLETE
-// OBSOLETE static char *
-// OBSOLETE get_reg_name (int regno)
-// OBSOLETE {
-// OBSOLETE static char buf[50];
-// OBSOLETE char *p;
-// OBSOLETE char *b;
-// OBSOLETE
-// OBSOLETE b = buf;
-// OBSOLETE
-// OBSOLETE if (regno < 0)
-// OBSOLETE return ("");
-// OBSOLETE /*
-// OBSOLETE for (p = REGISTER_NAME (regno); *p; p++)
-// OBSOLETE *b++ = toupper(*p);
-// OBSOLETE *b = '\000';
-// OBSOLETE */
-// OBSOLETE p = (char *) REGISTER_NAME (regno);
-// OBSOLETE return p;
-// OBSOLETE /*
-// OBSOLETE return buf;
-// OBSOLETE */
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* read the remote registers into the block regs. */
-// OBSOLETE
-// OBSOLETE static void
-// OBSOLETE rombug_fetch_registers (void)
-// OBSOLETE {
-// OBSOLETE int regno, j, i;
-// OBSOLETE long val;
-// OBSOLETE unsigned char b;
-// OBSOLETE
-// OBSOLETE printf_monitor (GET_REG);
-// OBSOLETE expect ("eax:", 1);
-// OBSOLETE expect ("\n", 1);
-// OBSOLETE get_hex_regs (1, 0);
-// OBSOLETE get_hex_regs (1, 3);
-// OBSOLETE get_hex_regs (1, 1);
-// OBSOLETE get_hex_regs (1, 2);
-// OBSOLETE get_hex_regs (1, 6);
-// OBSOLETE get_hex_regs (1, 7);
-// OBSOLETE get_hex_regs (1, 5);
-// OBSOLETE get_hex_regs (1, 4);
-// OBSOLETE for (regno = 8; regno <= 15; regno++)
-// OBSOLETE {
-// OBSOLETE expect (REG_DELIM, 1);
-// OBSOLETE if (regno >= 8 && regno <= 13)
-// OBSOLETE {
-// OBSOLETE val = 0;
-// OBSOLETE for (j = 0; j < 2; j++)
-// OBSOLETE {
-// OBSOLETE get_hex_byte (&b);
-// OBSOLETE if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
-// OBSOLETE val = (val << 8) + b;
-// OBSOLETE else
-// OBSOLETE val = val + (b << (j * 8));
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE if (regno == 8)
-// OBSOLETE i = 10;
-// OBSOLETE if (regno >= 9 && regno <= 12)
-// OBSOLETE i = regno + 3;
-// OBSOLETE if (regno == 13)
-// OBSOLETE i = 11;
-// OBSOLETE supply_register (i, (char *) &val);
-// OBSOLETE }
-// OBSOLETE else if (regno == 14)
-// OBSOLETE {
-// OBSOLETE get_hex_regs (1, PC_REGNUM);
-// OBSOLETE }
-// OBSOLETE else if (regno == 15)
-// OBSOLETE {
-// OBSOLETE get_hex_regs (1, 9);
-// OBSOLETE }
-// OBSOLETE else
-// OBSOLETE {
-// OBSOLETE val = 0;
-// OBSOLETE supply_register (regno, (char *) &val);
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE is_trace_mode = 0;
-// OBSOLETE expect_prompt (1);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Fetch register REGNO, or all registers if REGNO is -1.
-// OBSOLETE Returns errno value. */
-// OBSOLETE static void
-// OBSOLETE rombug_fetch_register (int regno)
-// OBSOLETE {
-// OBSOLETE int val, j;
-// OBSOLETE unsigned char b;
-// OBSOLETE
-// OBSOLETE if (monitor_log)
-// OBSOLETE {
-// OBSOLETE fprintf (log_file, "\nIn Fetch Register (reg=%s)\n", get_reg_name (regno));
-// OBSOLETE fflush (log_file);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE if (regno < 0)
-// OBSOLETE {
-// OBSOLETE rombug_fetch_registers ();
-// OBSOLETE }
-// OBSOLETE else
-// OBSOLETE {
-// OBSOLETE char *name = get_reg_name (regno);
-// OBSOLETE printf_monitor (GET_REG);
-// OBSOLETE if (regno >= 10 && regno <= 15)
-// OBSOLETE {
-// OBSOLETE expect ("\n", 1);
-// OBSOLETE expect ("\n", 1);
-// OBSOLETE expect (name, 1);
-// OBSOLETE expect (REG_DELIM, 1);
-// OBSOLETE val = 0;
-// OBSOLETE for (j = 0; j < 2; j++)
-// OBSOLETE {
-// OBSOLETE get_hex_byte (&b);
-// OBSOLETE if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
-// OBSOLETE val = (val << 8) + b;
-// OBSOLETE else
-// OBSOLETE val = val + (b << (j * 8));
-// OBSOLETE }
-// OBSOLETE supply_register (regno, (char *) &val);
-// OBSOLETE }
-// OBSOLETE else if (regno == 8 || regno == 9)
-// OBSOLETE {
-// OBSOLETE expect ("\n", 1);
-// OBSOLETE expect ("\n", 1);
-// OBSOLETE expect ("\n", 1);
-// OBSOLETE expect (name, 1);
-// OBSOLETE expect (REG_DELIM, 1);
-// OBSOLETE get_hex_regs (1, regno);
-// OBSOLETE }
-// OBSOLETE else
-// OBSOLETE {
-// OBSOLETE expect (name, 1);
-// OBSOLETE expect (REG_DELIM, 1);
-// OBSOLETE expect ("\n", 1);
-// OBSOLETE get_hex_regs (1, 0);
-// OBSOLETE get_hex_regs (1, 3);
-// OBSOLETE get_hex_regs (1, 1);
-// OBSOLETE get_hex_regs (1, 2);
-// OBSOLETE get_hex_regs (1, 6);
-// OBSOLETE get_hex_regs (1, 7);
-// OBSOLETE get_hex_regs (1, 5);
-// OBSOLETE get_hex_regs (1, 4);
-// OBSOLETE }
-// OBSOLETE expect_prompt (1);
-// OBSOLETE }
-// OBSOLETE return;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Store the remote registers from the contents of the block REGS. */
-// OBSOLETE
-// OBSOLETE static void
-// OBSOLETE rombug_store_registers (void)
-// OBSOLETE {
-// OBSOLETE int regno;
-// OBSOLETE
-// OBSOLETE for (regno = 0; regno <= PC_REGNUM; regno++)
-// OBSOLETE rombug_store_register (regno);
-// OBSOLETE
-// OBSOLETE registers_changed ();
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Store register REGNO, or all if REGNO == 0.
-// OBSOLETE return errno value. */
-// OBSOLETE static void
-// OBSOLETE rombug_store_register (int regno)
-// OBSOLETE {
-// OBSOLETE char *name;
-// OBSOLETE
-// OBSOLETE if (monitor_log)
-// OBSOLETE fprintf (log_file, "\nIn Store_register (regno=%d)\n", regno);
-// OBSOLETE
-// OBSOLETE if (regno == -1)
-// OBSOLETE rombug_store_registers ();
-// OBSOLETE else
-// OBSOLETE {
-// OBSOLETE if (sr_get_debug ())
-// OBSOLETE printf ("Setting register %s to 0x%x\n", get_reg_name (regno), read_register (regno));
-// OBSOLETE
-// OBSOLETE name = get_reg_name (regno);
-// OBSOLETE if (name == 0)
-// OBSOLETE return;
-// OBSOLETE printf_monitor (SET_REG, name, read_register (regno));
-// OBSOLETE
-// OBSOLETE is_trace_mode = 0;
-// OBSOLETE expect_prompt (1);
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Get ready to modify the registers array. On machines which store
-// OBSOLETE individual registers, this doesn't need to do anything. On machines
-// OBSOLETE which store all the registers in one fell swoop, this makes sure
-// OBSOLETE that registers contains all the registers from the program being
-// OBSOLETE debugged. */
-// OBSOLETE
-// OBSOLETE static void
-// OBSOLETE rombug_prepare_to_store (void)
-// OBSOLETE {
-// OBSOLETE /* Do nothing, since we can store individual regs */
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE static void
-// OBSOLETE rombug_files_info (void)
-// OBSOLETE {
-// OBSOLETE printf ("\tAttached to %s at %d baud.\n",
-// OBSOLETE dev_name, sr_get_baud_rate ());
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Copy LEN bytes of data from debugger memory at MYADDR
-// OBSOLETE to inferior's memory at MEMADDR. Returns length moved. */
-// OBSOLETE static int
-// OBSOLETE rombug_write_inferior_memory (CORE_ADDR memaddr, unsigned char *myaddr, int len)
-// OBSOLETE {
-// OBSOLETE int i;
-// OBSOLETE char buf[10];
-// OBSOLETE
-// OBSOLETE if (monitor_log)
-// OBSOLETE fprintf (log_file, "\nIn Write_inferior_memory (memaddr=%x, len=%d)\n", memaddr, len);
-// OBSOLETE
-// OBSOLETE printf_monitor (MEM_SET_CMD, memaddr);
-// OBSOLETE for (i = 0; i < len; i++)
-// OBSOLETE {
-// OBSOLETE expect (CMD_DELIM, 1);
-// OBSOLETE printf_monitor ("%x \r", myaddr[i]);
-// OBSOLETE if (sr_get_debug ())
-// OBSOLETE printf ("\nSet 0x%x to 0x%x\n", memaddr + i, myaddr[i]);
-// OBSOLETE }
-// OBSOLETE expect (CMD_DELIM, 1);
-// OBSOLETE if (CMD_END)
-// OBSOLETE printf_monitor (CMD_END);
-// OBSOLETE is_trace_mode = 0;
-// OBSOLETE expect_prompt (1);
-// OBSOLETE
-// OBSOLETE bufaddr = 0;
-// OBSOLETE buflen = 0;
-// OBSOLETE return len;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Read LEN bytes from inferior memory at MEMADDR. Put the result
-// OBSOLETE at debugger address MYADDR. Returns length moved. */
-// OBSOLETE static int
-// OBSOLETE rombug_read_inferior_memory (CORE_ADDR memaddr, char *myaddr, int len)
-// OBSOLETE {
-// OBSOLETE int i, j;
-// OBSOLETE
-// OBSOLETE /* Number of bytes read so far. */
-// OBSOLETE int count;
-// OBSOLETE
-// OBSOLETE /* Starting address of this pass. */
-// OBSOLETE unsigned long startaddr;
-// OBSOLETE
-// OBSOLETE /* Number of bytes to read in this pass. */
-// OBSOLETE int len_this_pass;
-// OBSOLETE
-// OBSOLETE if (monitor_log)
-// OBSOLETE fprintf (log_file, "\nIn Read_inferior_memory (memaddr=%x, len=%d)\n", memaddr, len);
-// OBSOLETE
-// OBSOLETE /* Note that this code works correctly if startaddr is just less
-// OBSOLETE than UINT_MAX (well, really CORE_ADDR_MAX if there was such a
-// OBSOLETE thing). That is, something like
-// OBSOLETE rombug_read_bytes (CORE_ADDR_MAX - 4, foo, 4)
-// OBSOLETE works--it never adds len To memaddr and gets 0. */
-// OBSOLETE /* However, something like
-// OBSOLETE rombug_read_bytes (CORE_ADDR_MAX - 3, foo, 4)
-// OBSOLETE doesn't need to work. Detect it and give up if there's an attempt
-// OBSOLETE to do that. */
-// OBSOLETE if (((memaddr - 1) + len) < memaddr)
-// OBSOLETE {
-// OBSOLETE errno = EIO;
-// OBSOLETE return 0;
-// OBSOLETE }
-// OBSOLETE if (bufaddr <= memaddr && (memaddr + len) <= (bufaddr + buflen))
-// OBSOLETE {
-// OBSOLETE memcpy (myaddr, &readbuf[memaddr - bufaddr], len);
-// OBSOLETE return len;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE startaddr = memaddr;
-// OBSOLETE count = 0;
-// OBSOLETE while (count < len)
-// OBSOLETE {
-// OBSOLETE len_this_pass = 16;
-// OBSOLETE if ((startaddr % 16) != 0)
-// OBSOLETE len_this_pass -= startaddr % 16;
-// OBSOLETE if (len_this_pass > (len - count))
-// OBSOLETE len_this_pass = (len - count);
-// OBSOLETE if (sr_get_debug ())
-// OBSOLETE printf ("\nDisplay %d bytes at %x\n", len_this_pass, startaddr);
-// OBSOLETE
-// OBSOLETE printf_monitor (MEM_DIS_CMD, startaddr, 8);
-// OBSOLETE expect ("- ", 1);
-// OBSOLETE for (i = 0; i < 16; i++)
-// OBSOLETE {
-// OBSOLETE get_hex_byte (&readbuf[i]);
-// OBSOLETE }
-// OBSOLETE bufaddr = startaddr;
-// OBSOLETE buflen = 16;
-// OBSOLETE memcpy (&myaddr[count], readbuf, len_this_pass);
-// OBSOLETE count += len_this_pass;
-// OBSOLETE startaddr += len_this_pass;
-// OBSOLETE expect (CMD_DELIM, 1);
-// OBSOLETE }
-// OBSOLETE if (CMD_END)
-// OBSOLETE printf_monitor (CMD_END);
-// OBSOLETE is_trace_mode = 0;
-// OBSOLETE expect_prompt (1);
-// OBSOLETE
-// OBSOLETE return len;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Transfer LEN bytes between GDB address MYADDR and target address
-// OBSOLETE MEMADDR. If WRITE is non-zero, transfer them to the target,
-// OBSOLETE otherwise transfer them from the target. TARGET is unused.
-// OBSOLETE
-// OBSOLETE Returns the number of bytes transferred. */
-// OBSOLETE
-// OBSOLETE static int
-// OBSOLETE rombug_xfer_inferior_memory (CORE_ADDR memaddr, char *myaddr, int len,
-// OBSOLETE int write, struct mem_attrib *attrib,
-// OBSOLETE struct target_ops *target)
-// OBSOLETE {
-// OBSOLETE if (write)
-// OBSOLETE return rombug_write_inferior_memory (memaddr, myaddr, len);
-// OBSOLETE else
-// OBSOLETE return rombug_read_inferior_memory (memaddr, myaddr, len);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE static void
-// OBSOLETE rombug_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 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 static void
-// OBSOLETE rombug_mourn_inferior (void)
-// OBSOLETE {
-// OBSOLETE remove_breakpoints ();
-// OBSOLETE generic_mourn_inferior (); /* Do all the proper things now */
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE #define MAX_MONITOR_BREAKPOINTS 16
-// OBSOLETE
-// OBSOLETE static CORE_ADDR breakaddr[MAX_MONITOR_BREAKPOINTS] =
-// OBSOLETE {0};
-// OBSOLETE
-// OBSOLETE static int
-// OBSOLETE rombug_insert_breakpoint (CORE_ADDR addr, char *shadow)
-// OBSOLETE {
-// OBSOLETE int i;
-// OBSOLETE CORE_ADDR bp_addr = addr;
-// OBSOLETE int bp_size = 0;
-// OBSOLETE
-// OBSOLETE if (monitor_log)
-// OBSOLETE fprintf (log_file, "\nIn Insert_breakpoint (addr=%x)\n", addr);
-// OBSOLETE BREAKPOINT_FROM_PC (&bp_addr, &bp_size);
-// OBSOLETE
-// OBSOLETE for (i = 0; i <= MAX_MONITOR_BREAKPOINTS; i++)
-// OBSOLETE if (breakaddr[i] == 0)
-// OBSOLETE {
-// OBSOLETE breakaddr[i] = addr;
-// OBSOLETE if (sr_get_debug ())
-// OBSOLETE printf ("Breakpoint at %x\n", addr);
-// OBSOLETE rombug_read_inferior_memory (bp_addr, shadow, bp_size);
-// OBSOLETE printf_monitor (SET_BREAK_CMD, addr);
-// OBSOLETE is_trace_mode = 0;
-// OBSOLETE expect_prompt (1);
-// OBSOLETE return 0;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE fprintf_unfiltered (gdb_stderr, "Too many breakpoints (> 16) for monitor\n");
-// OBSOLETE return 1;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /*
-// OBSOLETE * _remove_breakpoint -- Tell the monitor to remove a breakpoint
-// OBSOLETE */
-// OBSOLETE static int
-// OBSOLETE rombug_remove_breakpoint (CORE_ADDR addr, char *shadow)
-// OBSOLETE {
-// OBSOLETE int i;
-// OBSOLETE
-// OBSOLETE if (monitor_log)
-// OBSOLETE fprintf (log_file, "\nIn Remove_breakpoint (addr=%x)\n", addr);
-// OBSOLETE
-// OBSOLETE for (i = 0; i < MAX_MONITOR_BREAKPOINTS; i++)
-// OBSOLETE if (breakaddr[i] == addr)
-// OBSOLETE {
-// OBSOLETE breakaddr[i] = 0;
-// OBSOLETE printf_monitor (CLR_BREAK_CMD, addr);
-// OBSOLETE is_trace_mode = 0;
-// OBSOLETE expect_prompt (1);
-// OBSOLETE return 0;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE fprintf_unfiltered (gdb_stderr,
-// OBSOLETE "Can't find breakpoint associated with 0x%x\n", addr);
-// OBSOLETE return 1;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Load a file. This is usually an srecord, which is ascii. No
-// OBSOLETE protocol, just sent line by line. */
-// OBSOLETE
-// OBSOLETE #define DOWNLOAD_LINE_SIZE 100
-// OBSOLETE static void
-// OBSOLETE rombug_load (char *arg)
-// OBSOLETE {
-// OBSOLETE /* this part comment out for os9* */
-// OBSOLETE #if 0
-// OBSOLETE FILE *download;
-// OBSOLETE char buf[DOWNLOAD_LINE_SIZE];
-// OBSOLETE int i, bytes_read;
-// OBSOLETE
-// OBSOLETE if (sr_get_debug ())
-// OBSOLETE printf ("Loading %s to monitor\n", arg);
-// OBSOLETE
-// OBSOLETE download = fopen (arg, "r");
-// OBSOLETE if (download == NULL)
-// OBSOLETE {
-// OBSOLETE error (sprintf (buf, "%s Does not exist", arg));
-// OBSOLETE return;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE printf_monitor (LOAD_CMD);
-// OBSOLETE /* expect ("Waiting for S-records from host... ", 1); */
-// OBSOLETE
-// OBSOLETE while (!feof (download))
-// OBSOLETE {
-// OBSOLETE bytes_read = fread (buf, sizeof (char), DOWNLOAD_LINE_SIZE, download);
-// OBSOLETE if (hashmark)
-// OBSOLETE {
-// OBSOLETE putchar ('.');
-// OBSOLETE fflush (stdout);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE if (serial_write (monitor_desc, buf, bytes_read))
-// OBSOLETE {
-// OBSOLETE fprintf_unfiltered (gdb_stderr,
-// OBSOLETE "serial_write failed: (while downloading) %s\n",
-// OBSOLETE safe_strerror (errno));
-// OBSOLETE break;
-// OBSOLETE }
-// OBSOLETE i = 0;
-// OBSOLETE while (i++ <= 200000)
-// OBSOLETE {
-// OBSOLETE }; /* Ugly HACK, probably needs flow control */
-// OBSOLETE if (bytes_read < DOWNLOAD_LINE_SIZE)
-// OBSOLETE {
-// OBSOLETE if (!feof (download))
-// OBSOLETE error ("Only read %d bytes\n", bytes_read);
-// OBSOLETE break;
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE if (hashmark)
-// OBSOLETE {
-// OBSOLETE putchar ('\n');
-// OBSOLETE }
-// OBSOLETE if (!feof (download))
-// OBSOLETE error ("Never got EOF while downloading");
-// OBSOLETE fclose (download);
-// OBSOLETE #endif /* 0 */
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Put a command string, in args, out to MONITOR.
-// OBSOLETE Output from MONITOR is placed on the users terminal until the prompt
-// OBSOLETE is seen. */
-// OBSOLETE
-// OBSOLETE static void
-// OBSOLETE rombug_command (char *args, int fromtty)
-// OBSOLETE {
-// OBSOLETE if (monitor_desc == NULL)
-// OBSOLETE error ("monitor target not open.");
-// OBSOLETE
-// OBSOLETE if (monitor_log)
-// OBSOLETE fprintf (log_file, "\nIn command (args=%s)\n", args);
-// OBSOLETE
-// OBSOLETE if (!args)
-// OBSOLETE error ("Missing command.");
-// OBSOLETE
-// OBSOLETE printf_monitor ("%s\r", args);
-// OBSOLETE expect_prompt (0);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE #if 0
-// OBSOLETE /* Connect the user directly to MONITOR. This command acts just like the
-// OBSOLETE 'cu' or 'tip' command. Use <CR>~. or <CR>~^D to break out. */
-// OBSOLETE
-// OBSOLETE static struct ttystate ttystate;
-// OBSOLETE
-// OBSOLETE static void
-// OBSOLETE cleanup_tty (void)
-// OBSOLETE {
-// OBSOLETE printf ("\r\n[Exiting connect mode]\r\n");
-// OBSOLETE /*serial_restore(0, &ttystate); */
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE static void
-// OBSOLETE connect_command (char *args, int fromtty)
-// OBSOLETE {
-// OBSOLETE fd_set readfds;
-// OBSOLETE int numfds;
-// OBSOLETE int c;
-// OBSOLETE char cur_esc = 0;
-// OBSOLETE
-// OBSOLETE dont_repeat ();
-// OBSOLETE
-// OBSOLETE if (monitor_desc == NULL)
-// OBSOLETE error ("monitor target not open.");
-// OBSOLETE
-// OBSOLETE if (args)
-// OBSOLETE fprintf ("This command takes no args. They have been ignored.\n");
-// OBSOLETE
-// OBSOLETE printf ("[Entering connect mode. Use ~. or ~^D to escape]\n");
-// OBSOLETE
-// OBSOLETE serial_raw (0, &ttystate);
-// OBSOLETE
-// OBSOLETE make_cleanup (cleanup_tty, 0);
-// OBSOLETE
-// OBSOLETE FD_ZERO (&readfds);
-// OBSOLETE
-// OBSOLETE while (1)
-// OBSOLETE {
-// OBSOLETE do
-// OBSOLETE {
-// OBSOLETE FD_SET (0, &readfds);
-// OBSOLETE FD_SET (deprecated_serial_fd (monitor_desc), &readfds);
-// OBSOLETE numfds = select (sizeof (readfds) * 8, &readfds, 0, 0, 0);
-// OBSOLETE }
-// OBSOLETE while (numfds == 0);
-// OBSOLETE
-// OBSOLETE if (numfds < 0)
-// OBSOLETE perror_with_name ("select");
-// OBSOLETE
-// OBSOLETE if (FD_ISSET (0, &readfds))
-// OBSOLETE { /* tty input, send to monitor */
-// OBSOLETE c = getchar ();
-// OBSOLETE if (c < 0)
-// OBSOLETE perror_with_name ("connect");
-// OBSOLETE
-// OBSOLETE printf_monitor ("%c", c);
-// OBSOLETE switch (cur_esc)
-// OBSOLETE {
-// OBSOLETE case 0:
-// OBSOLETE if (c == '\r')
-// OBSOLETE cur_esc = c;
-// OBSOLETE break;
-// OBSOLETE case '\r':
-// OBSOLETE if (c == '~')
-// OBSOLETE cur_esc = c;
-// OBSOLETE else
-// OBSOLETE cur_esc = 0;
-// OBSOLETE break;
-// OBSOLETE case '~':
-// OBSOLETE if (c == '.' || c == '\004')
-// OBSOLETE return;
-// OBSOLETE else
-// OBSOLETE cur_esc = 0;
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE if (FD_ISSET (deprecated_serial_fd (monitor_desc), &readfds))
-// OBSOLETE {
-// OBSOLETE while (1)
-// OBSOLETE {
-// OBSOLETE c = readchar (0);
-// OBSOLETE if (c < 0)
-// OBSOLETE break;
-// OBSOLETE putchar (c);
-// OBSOLETE }
-// OBSOLETE fflush (stdout);
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE #endif
-// OBSOLETE
-// OBSOLETE /*
-// OBSOLETE * Define the monitor command strings. Since these are passed directly
-// OBSOLETE * through to a printf style function, we need can include formatting
-// OBSOLETE * strings. We also need a CR or LF on the end.
-// OBSOLETE */
-// OBSOLETE #warning FIXME: monitor interface pattern strings, stale struct decl
-// OBSOLETE struct monitor_ops rombug_cmds =
-// OBSOLETE {
-// OBSOLETE "g \r", /* execute or usually GO command */
-// OBSOLETE "g \r", /* continue command */
-// OBSOLETE "t \r", /* single step */
-// OBSOLETE "b %x\r", /* set a breakpoint */
-// OBSOLETE "k %x\r", /* clear a breakpoint */
-// OBSOLETE "c %x\r", /* set memory to a value */
-// OBSOLETE "d %x %d\r", /* display memory */
-// OBSOLETE "$%08X", /* prompt memory commands use */
-// OBSOLETE ".%s %x\r", /* set a register */
-// OBSOLETE ":", /* delimiter between registers */
-// OBSOLETE ". \r", /* read a register */
-// OBSOLETE "mf \r", /* download command */
-// OBSOLETE "RomBug: ", /* monitor command prompt */
-// OBSOLETE ": ", /* end-of-command delimitor */
-// OBSOLETE ".\r" /* optional command terminator */
-// OBSOLETE };
-// OBSOLETE
-// OBSOLETE struct target_ops rombug_ops;
-// OBSOLETE
-// OBSOLETE static void
-// OBSOLETE init_rombug_ops (void)
-// OBSOLETE {
-// OBSOLETE rombug_ops.to_shortname = "rombug";
-// OBSOLETE rombug_ops.to_longname = "Microware's ROMBUG debug monitor";
-// OBSOLETE rombug_ops.to_doc = "Use a remote computer running the ROMBUG debug monitor.\n\
-// OBSOLETE Specify the serial device it is connected to (e.g. /dev/ttya).",
-// OBSOLETE rombug_ops.to_open = rombug_open;
-// OBSOLETE rombug_ops.to_close = rombug_close;
-// OBSOLETE rombug_ops.to_attach = 0;
-// OBSOLETE rombug_ops.to_post_attach = NULL;
-// OBSOLETE rombug_ops.to_require_attach = NULL;
-// OBSOLETE rombug_ops.to_detach = rombug_detach;
-// OBSOLETE rombug_ops.to_require_detach = NULL;
-// OBSOLETE rombug_ops.to_resume = rombug_resume;
-// OBSOLETE rombug_ops.to_wait = rombug_wait;
-// OBSOLETE rombug_ops.to_post_wait = NULL;
-// OBSOLETE rombug_ops.to_fetch_registers = rombug_fetch_register;
-// OBSOLETE rombug_ops.to_store_registers = rombug_store_register;
-// OBSOLETE rombug_ops.to_prepare_to_store = rombug_prepare_to_store;
-// OBSOLETE rombug_ops.to_xfer_memory = rombug_xfer_inferior_memory;
-// OBSOLETE rombug_ops.to_files_info = rombug_files_info;
-// OBSOLETE rombug_ops.to_insert_breakpoint = rombug_insert_breakpoint;
-// OBSOLETE rombug_ops.to_remove_breakpoint = rombug_remove_breakpoint; /* Breakpoints */
-// OBSOLETE rombug_ops.to_terminal_init = 0;
-// OBSOLETE rombug_ops.to_terminal_inferior = 0;
-// OBSOLETE rombug_ops.to_terminal_ours_for_output = 0;
-// OBSOLETE rombug_ops.to_terminal_ours = 0;
-// OBSOLETE rombug_ops.to_terminal_info = 0; /* Terminal handling */
-// OBSOLETE rombug_ops.to_kill = rombug_kill;
-// OBSOLETE rombug_ops.to_load = rombug_load; /* load */
-// OBSOLETE rombug_ops.to_lookup_symbol = rombug_link; /* lookup_symbol */
-// OBSOLETE rombug_ops.to_create_inferior = rombug_create_inferior;
-// OBSOLETE rombug_ops.to_post_startup_inferior = NULL;
-// OBSOLETE rombug_ops.to_acknowledge_created_inferior = NULL;
-// OBSOLETE rombug_ops.to_clone_and_follow_inferior = NULL;
-// OBSOLETE rombug_ops.to_post_follow_inferior_by_clone = NULL;
-// OBSOLETE rombug_ops.to_insert_fork_catchpoint = NULL;
-// OBSOLETE rombug_ops.to_remove_fork_catchpoint = NULL;
-// OBSOLETE rombug_ops.to_insert_vfork_catchpoint = NULL;
-// OBSOLETE rombug_ops.to_remove_vfork_catchpoint = NULL;
-// OBSOLETE rombug_ops.to_has_forked = NULL;
-// OBSOLETE rombug_ops.to_has_vforked = NULL;
-// OBSOLETE rombug_ops.to_can_follow_vfork_prior_to_exec = NULL;
-// OBSOLETE rombug_ops.to_post_follow_vfork = NULL;
-// OBSOLETE rombug_ops.to_insert_exec_catchpoint = NULL;
-// OBSOLETE rombug_ops.to_remove_exec_catchpoint = NULL;
-// OBSOLETE rombug_ops.to_has_execd = NULL;
-// OBSOLETE rombug_ops.to_reported_exec_events_per_exec_call = NULL;
-// OBSOLETE rombug_ops.to_has_exited = NULL;
-// OBSOLETE rombug_ops.to_mourn_inferior = rombug_mourn_inferior;
-// OBSOLETE rombug_ops.to_can_run = 0; /* can_run */
-// OBSOLETE rombug_ops.to_notice_signals = 0; /* notice_signals */
-// OBSOLETE rombug_ops.to_thread_alive = 0;
-// OBSOLETE rombug_ops.to_stop = 0; /* to_stop */
-// OBSOLETE rombug_ops.to_pid_to_exec_file = NULL;
-// OBSOLETE rombug_ops.to_stratum = process_stratum;
-// OBSOLETE rombug_ops.DONT_USE = 0; /* next */
-// OBSOLETE rombug_ops.to_has_all_memory = 1;
-// OBSOLETE rombug_ops.to_has_memory = 1;
-// OBSOLETE rombug_ops.to_has_stack = 1;
-// OBSOLETE rombug_ops.to_has_registers = 1;
-// OBSOLETE rombug_ops.to_has_execution = 1; /* has execution */
-// OBSOLETE rombug_ops.to_sections = 0;
-// OBSOLETE rombug_ops.to_sections_end = 0; /* Section pointers */
-// OBSOLETE rombug_ops.to_magic = OPS_MAGIC; /* Always the last thing */
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE void
-// OBSOLETE _initialize_remote_os9k (void)
-// OBSOLETE {
-// OBSOLETE init_rombug_ops ();
-// OBSOLETE add_target (&rombug_ops);
-// OBSOLETE
-// OBSOLETE add_show_from_set (
-// OBSOLETE add_set_cmd ("hash", no_class, var_boolean, (char *) &hashmark,
-// OBSOLETE "Set display of activity while downloading a file.\nWhen enabled, a period \'.\' is displayed.",
-// OBSOLETE &setlist),
-// OBSOLETE &showlist);
-// OBSOLETE
-// OBSOLETE add_show_from_set (
-// OBSOLETE add_set_cmd ("timeout", no_class, var_zinteger,
-// OBSOLETE (char *) &timeout,
-// OBSOLETE "Set timeout in seconds for remote MIPS serial I/O.",
-// OBSOLETE &setlist),
-// OBSOLETE &showlist);
-// OBSOLETE
-// OBSOLETE add_show_from_set (
-// OBSOLETE add_set_cmd ("remotelog", no_class, var_zinteger,
-// OBSOLETE (char *) &monitor_log,
-// OBSOLETE "Set monitor activity log on(=1) or off(=0).",
-// OBSOLETE &setlist),
-// OBSOLETE &showlist);
-// OBSOLETE
-// OBSOLETE add_show_from_set (
-// OBSOLETE add_set_cmd ("remotexon", no_class, var_zinteger,
-// OBSOLETE (char *) &tty_xon,
-// OBSOLETE "Set remote tty line XON control",
-// OBSOLETE &setlist),
-// OBSOLETE &showlist);
-// OBSOLETE
-// OBSOLETE add_show_from_set (
-// OBSOLETE add_set_cmd ("remotexoff", no_class, var_zinteger,
-// OBSOLETE (char *) &tty_xoff,
-// OBSOLETE "Set remote tty line XOFF control",
-// OBSOLETE &setlist),
-// OBSOLETE &showlist);
-// OBSOLETE
-// OBSOLETE add_com ("rombug <command>", class_obscure, rombug_command,
-// OBSOLETE "Send a command to the debug monitor.");
-// OBSOLETE #if 0
-// OBSOLETE add_com ("connect", class_obscure, connect_command,
-// OBSOLETE "Connect the terminal directly up to a serial based command monitor.\nUse <CR>~. or <CR>~^D to break out.");
-// OBSOLETE #endif
-// OBSOLETE }
+++ /dev/null
-// 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 ®isters[REGISTER_BYTE (R0_REGNUM)], 16 * I960_GREG_SIZE);
-// OBSOLETE bcopy (&i960_greg_packet[I960_R_G0],
-// OBSOLETE ®isters[REGISTER_BYTE (G0_REGNUM)], 16 * I960_GREG_SIZE);
-// OBSOLETE bcopy (&i960_greg_packet[I960_R_PCW],
-// OBSOLETE ®isters[REGISTER_BYTE (PCW_REGNUM)], sizeof (int));
-// OBSOLETE bcopy (&i960_greg_packet[I960_R_ACW],
-// OBSOLETE ®isters[REGISTER_BYTE (ACW_REGNUM)], sizeof (int));
-// OBSOLETE bcopy (&i960_greg_packet[I960_R_TCW],
-// OBSOLETE ®isters[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 ®isters[REGISTER_BYTE (FP0_REGNUM)],
-// OBSOLETE REGISTER_RAW_SIZE (FP0_REGNUM) * 4);
-// OBSOLETE }
-// OBSOLETE else
-// OBSOLETE bzero (®isters[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 (®isters[REGISTER_BYTE (R0_REGNUM)],
-// OBSOLETE &i960_greg_packet[I960_R_R0], 16 * I960_GREG_SIZE);
-// OBSOLETE bcopy (®isters[REGISTER_BYTE (G0_REGNUM)],
-// OBSOLETE &i960_greg_packet[I960_R_G0], 16 * I960_GREG_SIZE);
-// OBSOLETE bcopy (®isters[REGISTER_BYTE (PCW_REGNUM)],
-// OBSOLETE &i960_greg_packet[I960_R_PCW], sizeof (int));
-// OBSOLETE bcopy (®isters[REGISTER_BYTE (ACW_REGNUM)],
-// OBSOLETE &i960_greg_packet[I960_R_ACW], sizeof (int));
-// OBSOLETE bcopy (®isters[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 (®isters[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 }