since it was always defined exactly the same in all of them.
+Mon Nov 18 15:12:45 1991 John Gilmore (gnu at cygnus.com)
+
+ * blockframe.c: Remove tdesc-related code. Default
+ FRAME_CHAIN_COMBINE if not defined.
+ * infrun.c: Remove tdesc-related code.
+ * m88k-tdep.c (frame_chain_combine, init_frame_pc): Remove copies
+ of defaultable things.
+ * tm-m88k.h: New file, common to all Moto 88k target configs.
+ Derived from tm-delta88.h.
+ * tm-delta88.h: Use it.
+ * xm-m88k.h: Common file for 88K hosts. Remove obsolete stuff.
+ * xm-delta88.h: Use it.
+ * tm-*.h: Remove FRAME_CHAIN_COMBINE macros, since all are
+ default.
+ * coffread.c: Remove tdesc stuff.
+
+Mon Nov 18 13:51:37 1991 Per Bothner (bothner at cygnus.com)
+
+ * source.c (open_source_file): If openp fails, try again
+ using just the base (non-directory) part of the filename.
+ This solves various annoying problems, such as when the
+ source was compiled with an absolute pathname - and the
+ source files have moved. Or if the source was compiled
+ using a relative pathname, it can be more convenient
+ to just specific the source directory to the dir command.
+
Mon Nov 18 00:04:41 1991 Fred Fish (fnf at cygnus.com)
* cplus-dem.c (munge_function_name): Add missing third arg to
#include "value.h" /* for read_register */
#include "target.h" /* for target_has_stack */
-/* Required by INIT_EXTRA_FRAME_INFO on 88k. */
-#include <setjmp.h>
-#include <obstack.h>
-
CORE_ADDR read_pc (); /* In infcmd.c */
/* Start and end of object file containing the entry point.
return !(addr >= startup_file_start && addr < startup_file_end);
}
+/* Support an alternate method to avoid running off the bottom of
+ the stack (or top, depending upon your stack orientation).
+
+ There are two frames that are "special", the frame for the function
+ containing the process entry point, since it has no predecessor frame,
+ and the frame for the function containing the user code entry point
+ (the main() function), since all the predecessor frames are for the
+ process startup code. Since we have no guarantee that the linked
+ in startup modules have any debugging information that gdb can use,
+ we need to avoid following frame pointers back into frames that might
+ have been built in the startup code, as we might get hopelessly
+ confused. However, we almost always have debugging information
+ available for main().
+
+ These variables are used to save the range of PC values which are valid
+ within the main() function and within the function containing the process
+ entry point. If we always consider the frame for main() as the outermost
+ frame when debugging user code, and the frame for the process entry
+ point function as the outermost frame when debugging startup code, then
+ all we have to do is have FRAME_CHAIN_VALID return false whenever a
+ frame's current PC is within the range specified by these variables.
+ In essence, we set "blocks" in the frame chain beyond which we will
+ not proceed when following the frame chain.
+
+ A nice side effect is that we can still debug startup code without
+ running off the end of the frame chain, assuming that we have usable
+ debugging information in the startup modules, and if we choose to not
+ use the block at main, or can't find it for some reason, everything
+ still works as before. And if we have no startup code debugging
+ information but we do have usable information for main(), backtraces
+ from user code don't go wandering off into the startup code.
+
+ To use this method, define your FRAME_CHAIN_VALID macro like:
+
+ #define FRAME_CHAIN_VALID(chain, thisframe) \
+ (chain != 0 \
+ && !(inside_main_scope ((thisframe)->pc)) \
+ && !(inside_entry_scope ((thisframe)->pc)))
+
+ and add initializations of the four scope controlling variables inside
+ the object file / debugging information processing modules. */
+
+CORE_ADDR entry_scope_lowpc;
+CORE_ADDR entry_scope_highpc;
+CORE_ADDR main_scope_lowpc;
+CORE_ADDR main_scope_highpc;
+
+/* Test a specified PC value to see if it is in the range of addresses
+ that correspond to the main() function. See comments above for why
+ we might want to do this.
+
+ Typically called from FRAME_CHAIN_VALID. */
+
+int
+inside_main_scope (pc)
+CORE_ADDR pc;
+{
+ return (main_scope_lowpc <= pc && pc < main_scope_highpc);
+}
+
+/* Test a specified PC value to see if it is in the range of addresses
+ that correspond to the process entry point function. See comments above
+ for why we might want to do this.
+
+ Typically called from FRAME_CHAIN_VALID. */
+
+int
+inside_entry_scope (pc)
+CORE_ADDR pc;
+{
+ return (entry_scope_lowpc <= pc && pc < entry_scope_highpc);
+}
+
/* Address of innermost stack frame (contents of FP register) */
static FRAME current_frame;
fci->pc = pc;
#ifdef INIT_EXTRA_FRAME_INFO
- INIT_EXTRA_FRAME_INFO (fci);
+ INIT_EXTRA_FRAME_INFO (0, fci);
#endif
return fci;
return 0;
}
+/* Default a few macros that people seldom redefine. */
+
#if !defined (INIT_FRAME_PC)
#define INIT_FRAME_PC(fromleaf, prev) \
prev->pc = (fromleaf ? SAVED_PC_AFTER_CALL (prev->next) : \
prev->next ? FRAME_SAVED_PC (prev->next) : read_pc ());
#endif
+#ifndef FRAME_CHAIN_COMBINE
+#define FRAME_CHAIN_COMBINE(chain, thisframe) (chain)
+#endif
+
/* Return a structure containing various interesting information
about the frame that called NEXT_FRAME. Returns NULL
if there is no such frame. */
return 0;
address = FRAME_CHAIN_COMBINE (address, next_frame);
}
+ if (address == 0)
+ return 0;
prev = (struct frame_info *)
obstack_alloc (&frame_cache_obstack,
prev->next_frame = prev->next ? prev->next->frame : 0;
#ifdef INIT_EXTRA_FRAME_INFO
- INIT_EXTRA_FRAME_INFO(prev);
+ INIT_EXTRA_FRAME_INFO(fromleaf, prev);
#endif
/* This entry is in the frame queue now, which is good since
FRAME_SAVED_PC may use that queue to figure out it's value
- (see m-sparc.h). We want the pc saved in the inferior frame. */
+ (see tm-sparc.h). We want the pc saved in the inferior frame. */
INIT_FRAME_PC(fromleaf, prev);
return prev;
#include "bfd.h"
#include "symfile.h"
-#if defined (TDESC)
-/* Need to get C_VERSION and friends. FIXME, should be in internalcoff.h */
-#include "coff-m88k.h"
-#endif /* not TDESC */
-
#include <obstack.h>
#include <string.h>
static unsigned local_auxesz;
-#ifdef TDESC
-#include "tdesc.h"
-#define SEM
-int int_sem_val = 's' << 24 | 'e' << 16 | 'm' << 8 | '.';
-int temp_sem_val;
-int last_coffsem = 2;
-#if 0
- /* This isn't used currently. */
-int last_coffsyn = 0;
-#endif
-int debug_info = 0; /*used by tdesc */
-extern dc_dcontext_t tdesc_handle;
-extern int safe_to_init_tdesc_context;
-#endif
-
/* Chain of typedefs of pointers to empty struct/union types.
They are chained thru the SYMBOL_VALUE_CHAIN. */
context_stack = 0;
within_function = 0;
last_source_file = 0;
-#ifdef TDESC
- last_coffsem = 2;
-#if 0
- /* This isn't used currently. */
- last_coffsyn = 0;
-#endif
-#endif
/* Initialize the source file line number information for this file. */
xrealloc (lv, (sizeof (struct linetable)
+ lv->nitems * sizeof (struct linetable_entry)));
-#ifdef TDESC
- symtab->coffsem = last_coffsem;
-#if 0
- /* This isn't used currently. Besides, if this is really about "syntax",
- it shouldn't need to stick around past symbol read-in time. */
- symtab->coffsyn = last_coffsyn;
-#endif
-#endif
-
free_named_symtabs (symtab->filename);
/* Link the new symtab into the list of such. */
char *name;
CORE_ADDR address;
{
-#ifdef TDESC
/* We don't want TDESC entry points on the misc_function_vector */
if (name[0] == '@') return;
-#endif
+
/* mf_text isn't true, but apparently COFF doesn't tell us what it really
is, so this guess is more useful than mf_unknown. */
prim_record_misc_function (savestring (name, strlen (name)),
/* FIXME memory leak */
sf->sym_private = xmalloc (sizeof (struct coff_symfile_info));
-#if defined (TDESC)
- safe_to_init_tdesc_context = 0;
-#endif
-
/* Save startup file's range of PC addresses to help blockframe.c
decide where the bottom of the stack is. */
if (bfd_get_file_flags (abfd) & EXEC_P)
maxoff = offset + size;
if (maxoff > info->max_lineno_offset)
info->max_lineno_offset = maxoff;
-#ifdef TDESC
- /* While we're at it, find the debug_info. It's in the s_relptr
- (or, in BFD-speak, rel_filepos) of the text segment section header. */
- if (strcmp (bfd_section_name (abfd, asect), ".text") == 0)
- {
- /* WARNING WILL ROBINSON! ACCESSING BFD-PRIVATE DATA HERE! FIXME! */
- debug_info = asect->rel_filepos;
- /* End of warning */
- if (tdesc_handle)
- {
- dc_terminate (tdesc_handle);
- tdesc_handle = 0;
- }
- }
-#endif /* TDESC */
}
free (new);
}
break;
-#ifdef TDESC
- case C_VERSION:
-#if 0
- /* This isn't used currently. */
- if (strcmp (cs->c_name, ".coffsyn") == 0)
- last_coffsyn = cs->c_value;
- else
-#endif /* 0 */
- if ((strcmp (cs->c_name, ".coffsem") == 0) &&
- (cs->c_value != 0))
- last_coffsem = cs->c_value;
- break;
-#endif /* TDESC */
default:
-#ifdef TDESC
- if ((strcmp (cs->c_name, ".coffsem") == 0) &&
- (cs->c_value != 0))
- last_coffsem = cs->c_value;
- else
-#endif
(void) process_coff_symbol (cs, &main_aux);
break;
}
type = coff_alloc_type (cs->c_symnum);
TYPE_CODE (type) = TYPE_CODE_STRUCT;
TYPE_NAME (type) = concat ("struct ", "<opaque>", NULL);
+ TYPE_CPLUS_SPECIFIC (type)
+ = (struct cplus_struct_type *) obstack_alloc (symbol_obstack, sizeof (struct cplus_struct_type));
+ bzero (TYPE_CPLUS_SPECIFIC (type), sizeof (struct cplus_struct_type));
TYPE_LENGTH (type) = 0;
TYPE_FIELDS (type) = 0;
TYPE_NFIELDS (type) = 0;
type = coff_alloc_type (index);
TYPE_CODE (type) = TYPE_CODE_STRUCT;
+ TYPE_CPLUS_SPECIFIC (type)
+ = (struct cplus_struct_type *) obstack_alloc (symbol_obstack, sizeof (struct cplus_struct_type));
+ bzero (TYPE_CPLUS_SPECIFIC (type), sizeof (struct cplus_struct_type));
TYPE_LENGTH (type) = length;
while (!done && symnum < lastsym && symnum < nlist_nsyms_global)
static struct sym_fns coff_sym_fns =
{
- /* This assumes that 88kbcs implies TDESC and TDESC implies 88kbcs.
- If that's not true, this can be relaxed, but if it is true,
- it will just cause users grief if we try to read the wrong kind
- of symbol file. */
-#if defined (TDESC)
- "m88kbcs", 8,
-#else /* not TDESC */
-# ifdef i386
- "i386coff", 8,
-# else
"coff", 4,
-# endif /* not i386 */
-#endif /* not TDESC */
coff_new_init, coff_symfile_init, coff_symfile_read,
};
Current and previous sp.
Current and previous start of current function.
- If the start's of the functions don't match, then
+ If the starts of the functions don't match, then
a) We did a subroutine call.
(name && !strcmp ("_sigtramp", name))
#endif
-#ifdef TDESC
-#include "tdesc.h"
-int safe_to_init_tdesc_context = 0;
-extern dc_dcontext_t current_context;
-#endif
-
/* Tables of how to react to signals; the user sets them. */
static char signal_stop[NSIG];
int stop_step_resume_break;
struct symtab_and_line sal;
int remove_breakpoints_on_following_step = 0;
-#ifdef TDESC
- extern dc_handle_t tdesc_handle;
-#endif
int current_line;
#if 0
if (WIFEXITED (w))
{
target_terminal_ours (); /* Must do this before mourn anyway */
-#ifdef TDESC
- safe_to_init_tdesc_context = 0;
-#endif
if (WEXITSTATUS (w))
printf ("\nProgram exited with code 0%o.\n",
(unsigned int)WEXITSTATUS (w));
stop_signal = WTERMSIG (w);
target_terminal_ours (); /* Must do this before mourn anyway */
target_kill ((char *)0, 0); /* kill mourns as well */
-#ifdef TDESC
- safe_to_init_tdesc_context = 0;
-#endif
#ifdef PRINT_RANDOM_SIGNAL
printf ("\nProgram terminated: ");
PRINT_RANDOM_SIGNAL (stop_signal);
#endif /* NO_SINGLE_STEP */
stop_pc = read_pc ();
-#ifdef TDESC
- if (safe_to_init_tdesc_context)
- {
- current_context = init_dcontext();
- set_current_frame ( create_new_frame (get_frame_base (read_pc()),read_pc()));
- }
- else
-#endif /* TDESC */
set_current_frame ( create_new_frame (read_register (FP_REGNUM),
read_pc ()));
to one-proceed past a breakpoint. */
/* If we've just finished a special step resume and we don't
want to hit a breakpoint, pull em out. */
-#ifdef TDESC
- if (!tdesc_handle)
- {
- init_tdesc();
- safe_to_init_tdesc_context = 1;
- }
-#endif
-
if (!step_resume_break_address &&
remove_breakpoints_on_following_step)
{
&& outside_startup_file (FRAME_SAVED_PC (thisframe)));
}
-CORE_ADDR
-frame_chain_combine (chain, thisframe)
- CORE_ADDR chain;
-{
- return chain;
-}
-
void
init_extra_frame_info (fromleaf, fi)
int fromleaf;
fi->args_pointer = 0; /* Unknown */
fi->locals_pointer = 0; /* Unknown */
}
-
-void
-init_frame_pc (fromleaf, prev)
- int fromleaf;
- struct frame_info *prev;
-{
- /* FIXME, for now it's the default from blockframe.c. If it stays that
- way, remove it entirely from here. */
- prev->pc = (fromleaf ? SAVED_PC_AFTER_CALL (prev->next) :
- prev->next ? FRAME_SAVED_PC (prev->next) : read_pc ());
-
-}
\f
/* Examine an m88k function prologue, recording the addresses at which
registers are saved explicitly by the prologue code, and returning
/* FRAME_CHAIN takes a FRAME
and produces the frame's chain-pointer.
- FRAME_CHAIN_COMBINE takes the chain pointer and the frame's nominal address
- and produces the nominal address of the caller frame.
-
However, if FRAME_CHAIN_VALID returns zero,
- it means the given frame is the outermost one and has no caller.
- In that case, FRAME_CHAIN_COMBINE is not used. */
+ it means the given frame is the outermost one and has no caller. */
/* On the 29k, the nominal address of a frame is the address on the
register stack of the return address (the one next to the incoming
#define FRAME_CHAIN_VALID(chain, thisframe) \
(outside_startup_file (FRAME_SAVED_PC (thisframe)))
-#define FRAME_CHAIN_COMBINE(chain, thisframe) (0)
-
/* Define other aspects of the stack frame. */
/* A macro that tells us whether the function invocation represented
/* FRAME_CHAIN takes a frame's nominal address
and produces the frame's chain-pointer.
- FRAME_CHAIN_COMBINE takes the chain pointer and the frame's nominal address
- and produces the nominal address of the caller frame.
-
However, if FRAME_CHAIN_VALID returns zero,
- it means the given frame is the outermost one and has no caller.
- In that case, FRAME_CHAIN_COMBINE is not used. */
+ it means the given frame is the outermost one and has no caller. */
/* In the case of the 68000, the frame's nominal address
is the address of a 4-byte word containing the calling frame's address. */
#endif /* FRAME_CHAIN_VALID_ALTERNATE */
-#define FRAME_CHAIN_COMBINE(chain, thisframe) (chain)
-
/* Define other aspects of the stack frame. */
/* A macro that tells us whether the function invocation represented
/* FRAME_CHAIN takes a frame's nominal address
and produces the frame's chain-pointer.
- FRAME_CHAIN_COMBINE takes the chain pointer and the frame's nominal address
- and produces the nominal address of the caller frame.
-
However, if FRAME_CHAIN_VALID returns zero,
- it means the given frame is the outermost one and has no caller.
- In that case, FRAME_CHAIN_COMBINE is not used. */
+ it means the given frame is the outermost one and has no caller. */
/* In the case of the ARM, the frame's nominal address is the FP value,
and 12 bytes before comes the saved previous FP value as a 4-byte word. */
#define FRAME_CHAIN_VALID(chain, thisframe) \
(chain != 0 && (FRAME_SAVED_PC (thisframe) >= first_object_file_end))
-#define FRAME_CHAIN_COMBINE(chain, thisframe) (chain)
-
/* Define other aspects of the stack frame. */
/* A macro that tells us whether the function invocation represented
/* FRAME_CHAIN takes a frame_info with a frame's nominal address in fi->frame,
and produces the frame's chain-pointer.
- FRAME_CHAIN_COMBINE takes the chain pointer and the frame's nominal address
- and produces the nominal address of the caller frame.
-
However, if FRAME_CHAIN_VALID returns zero,
- it means the given frame is the outermost one and has no caller.
- In that case, FRAME_CHAIN_COMBINE is not used. */
+ it means the given frame is the outermost one and has no caller. */
/* (caller fp is saved at 8(fp)) */
#define FRAME_CHAIN_VALID(chain, thisframe) \
(chain != 0 && (outside_startup_file (FRAME_SAVED_PC (thisframe))))
-#define FRAME_CHAIN_COMBINE(chain, thisframe) (chain)
-
/* Define other aspects of the stack frame. */
/* We need the boundaries of the text in the exec file, as a kludge,
-/* Copyright (C) 1986, 1987, 1988, 1989, 1990 Free Software Foundation, Inc.
+/* Target machine description for Motorola Delta 88 box, for GDB.
+ Copyright 1986, 1987, 1988, 1989, 1990, 1991 Free Software Foundation, Inc.
This file is part of GDB.
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
-/* g++ support is not yet included. */
-
-#define TARGET_BYTE_ORDER BIG_ENDIAN
-
-/* We cache information about saved registers in the frame structure,
- to save us from having to re-scan function prologues every time
- a register in a non-current frame is accessed. */
-
-#define EXTRA_FRAME_INFO \
- struct frame_saved_regs *fsr; \
- CORE_ADDR locals_pointer; \
- CORE_ADDR args_pointer;
-
-/* Zero the frame_saved_regs pointer when the frame is initialized,
- so that FRAME_FIND_SAVED_REGS () will know to allocate and
- initialize a frame_saved_regs struct the first time it is called.
- Set the arg_pointer to -1, which is not valid; 0 and other values
- indicate real, cached values. */
-
-#define INIT_EXTRA_FRAME_INFO(fromleaf, fi) \
- init_extra_frame_info (fromleaf, fi)
-extern void init_extra_frame_info ();
-
-#define INIT_FRAME_PC(fromleaf, prev) \
- init_frame_pc (fromleaf, prev)
-extern void init_frame_pc ();
-
-#define IEEE_FLOAT
-
-/* Define this if the C compiler puts an underscore at the front
- of external names before giving them to the linker. */
-
-#define NAMES_HAVE_UNDERSCORE
-
-/* Hook for read_relative_register_raw_bytes */
-
-#define READ_RELATIVE_REGISTER_RAW_BYTES
-
-/* Offset from address of function to start of its code.
- Zero on most machines. */
-
-#define FUNCTION_START_OFFSET 0
-
-/* Advance PC across any function entry prologue instructions
- to reach some "real" code. */
-
-#define SKIP_PROLOGUE(frompc) \
- skip_prologue (frompc)
-extern CORE_ADDR skip_prologue ();
-
-/* The m88k kernel aligns all instructions on 4-byte boundaries. The
- kernel also uses the least significant two bits for its own hocus
- pocus. When gdb receives an address from the kernel, it needs to
- preserve those right-most two bits, but gdb also needs to be careful
- to realize that those two bits are not really a part of the address
- of an instruction. Shrug. */
-
-#define ADDR_BITS_REMOVE(addr) ((addr) & ~3)
-#define ADDR_BITS_SET(addr) (((addr) | 0x00000002) - 4)
-
-/* Immediately after a function call, return the saved pc.
- Can't always go through the frames for this because on some machines
- the new frame is not set up until the new function executes
- some instructions. */
-
-#define SAVED_PC_AFTER_CALL(frame) \
- (ADDR_BITS_REMOVE (read_register (SRP_REGNUM)))
-
-/* Address of end of stack space (in core files). */
-
-#define STACK_END_ADDR 0xF0000000
-
-/* Stack grows downward. */
-
-#define INNER_THAN <
-
-/* Sequence of bytes for breakpoint instruction. */
-
-/* instruction 0xF000D1FF is 'tb0 0,r0,511'
- If Bit bit 0 of r0 is clear (always true),
- initiate exception processing (trap).
- */
-#define BREAKPOINT {0xF0, 0x00, 0xD1, 0xFF}
-
-/* Amount PC must be decremented by after a breakpoint.
- This is often the number of bytes in BREAKPOINT
- but not always. */
-
-#define DECR_PC_AFTER_BREAK 0
-
-/* Nonzero if instruction at PC is a return instruction. */
-/* 'jmp r1' or 'jmp.n r1' is used to return from a subroutine. */
-
-#define ABOUT_TO_RETURN(pc) (read_memory_integer (pc, 2) == 0xF800)
-
-/* Return 1 if P points to an invalid floating point value.
- LEN is the length in bytes. */
-
-#define INVALID_FLOAT(p, len) IEEE_isNAN(p,len)
-
-/* Say how long (ordinary) registers are. */
-
-#define REGISTER_TYPE long
-
-/* Number of machine registers */
-
-#define NUM_REGS 38
-
-/* Initializer for an array of names of registers.
- There should be NUM_REGS strings in this initializer. */
-
-#define REGISTER_NAMES {\
- "r0",\
- "r1",\
- "r2",\
- "r3",\
- "r4",\
- "r5",\
- "r6",\
- "r7",\
- "r8",\
- "r9",\
- "r10",\
- "r11",\
- "r12",\
- "r13",\
- "r14",\
- "r15",\
- "r16",\
- "r17",\
- "r18",\
- "r19",\
- "r20",\
- "r21",\
- "r22",\
- "r23",\
- "r24",\
- "r25",\
- "r26",\
- "r27",\
- "r28",\
- "r29",\
- "r30",\
- "r31",\
- "psr",\
- "fpsr",\
- "fpcr",\
- "sxip",\
- "snip",\
- "sfip",\
- "vbr",\
- "dmt0",\
- "dmd0",\
- "dma0",\
- "dmt1",\
- "dmd1",\
- "dma1",\
- "dmt2",\
- "dmd2",\
- "dma2",\
- "sr0",\
- "sr1",\
- "sr2",\
- "sr3",\
- "fpecr",\
- "fphs1",\
- "fpls1",\
- "fphs2",\
- "fpls2",\
- "fppt",\
- "fprh",\
- "fprl",\
- "fpit",\
- "fpsr",\
- "fpcr",\
- };
-
-
-/* Register numbers of various important registers.
- Note that some of these values are "real" register numbers,
- and correspond to the general registers of the machine,
- and some are "phony" register numbers which are too large
- to be actual register numbers as far as the user is concerned
- but do serve to get the desired values when passed to read_register. */
-
-#define SRP_REGNUM 1 /* Contains subroutine return pointer */
-#define RV_REGNUM 2 /* Contains simple return values */
-#define SRA_REGNUM 12 /* Contains address of struct return values */
-#define FP_REGNUM 31 /* Reg fetched to locate frame when pgm stops */
-#define SP_REGNUM 31 /* Contains address of top of stack */
-#define SXIP_REGNUM 35 /* Contains Shadow Execute Instruction Pointer */
-#define SNIP_REGNUM 36 /* Contains Shadow Next Instruction Pointer */
-#define PC_REGNUM SXIP_REGNUM /* Program Counter */
-#define NPC_REGNUM SNIP_REGNUM /* Next Program Counter */
-#define PSR_REGNUM 32 /* Processor Status Register */
-#define FPSR_REGNUM 33 /* Floating Point Status Register */
-#define FPCR_REGNUM 34 /* Floating Point Control Register */
-#define SFIP_REGNUM 37 /* Contains Shadow Fetched Intruction pointer */
-#define NNPC_REGNUM SFIP_REGNUM /* Next Next Program Counter */
-
-/* PSR status bit definitions. */
-
-#define PSR_MODE 0x80000000
-#define PSR_BYTE_ORDER 0x40000000
-#define PSR_SERIAL_MODE 0x20000000
-#define PSR_CARRY 0x10000000
-#define PSR_SFU_DISABLE 0x000003f0
-#define PSR_SFU1_DISABLE 0x00000008
-#define PSR_MXM 0x00000004
-#define PSR_IND 0x00000002
-#define PSR_SFRZ 0x00000001
-
-/* BCS requires that the SXIP_REGNUM (or PC_REGNUM) contain the address
- of the next instr to be executed when a breakpoint occurs. Because
- the kernel gets the next instr (SNIP_REGNUM), the instr in SNIP needs
- to be put back into SFIP, and the instr in SXIP should be shifted
- to SNIP */
-
-/* Are you sitting down? It turns out that the 88K BCS (binary compatibility
- standard) folks originally felt that the debugger should be responsible
- for backing up the IPs, not the kernel (as is usually done). Well, they
- have reversed their decision, and in future releases our kernel will be
- handling the backing up of the IPs. So, eventually, we won't need to
- do the SHIFT_INST_REGS stuff. But, for now, since there are 88K systems out
- there that do need the debugger to do the IP shifting, and since there
- will be systems where the kernel does the shifting, the code is a little
- more complex than perhaps it needs to be (we still go inside SHIFT_INST_REGS,
- and if the shifting hasn't occurred then gdb goes ahead and shifts). */
-
-#define SHIFT_INST_REGS
-
-/* Total amount of space needed to store our copies of the machine's
- register state, the array `registers'. */
-
-#define REGISTER_BYTES (NUM_REGS * sizeof(REGISTER_TYPE))
-
-/* Index within `registers' of the first byte of the space for
- register N. */
-
-#define REGISTER_BYTE(N) ((N)*sizeof(REGISTER_TYPE))
-
-/* Number of bytes of storage in the actual machine representation
- for register N. */
-
-#define REGISTER_RAW_SIZE(N) (sizeof(REGISTER_TYPE))
-
-/* Number of bytes of storage in the program's representation
- for register N. */
-
-#define REGISTER_VIRTUAL_SIZE(N) (sizeof(REGISTER_TYPE))
-
-/* Largest value REGISTER_RAW_SIZE can have. */
-
-#define MAX_REGISTER_RAW_SIZE (sizeof(REGISTER_TYPE))
-
-/* Largest value REGISTER_VIRTUAL_SIZE can have.
-/* Are FPS1, FPS2, FPR "virtual" regisers? */
-
-#define MAX_REGISTER_VIRTUAL_SIZE (sizeof(REGISTER_TYPE))
-
-/* Nonzero if register N requires conversion
- from raw format to virtual format. */
-
-#define REGISTER_CONVERTIBLE(N) (0)
-
-/* Convert data from raw format for register REGNUM
- to virtual format for register REGNUM. */
-
-#define REGISTER_CONVERT_TO_VIRTUAL(REGNUM,FROM,TO) {bcopy ((FROM), (TO), (sizeof(REGISTER_TYPE)));}
-
-/* Convert data from virtual format for register REGNUM
- to raw format for register REGNUM. */
-
-#define REGISTER_CONVERT_TO_RAW(REGNUM,FROM,TO) {bcopy ((FROM), (TO), (sizeof(REGISTER_TYPE)));}
-
-/* Return the GDB type object for the "standard" data type
- of data in register N. */
-
-#define REGISTER_VIRTUAL_TYPE(N) (builtin_type_int)
-
-/* The 88k call/return conventions call for "small" values to be returned
- into consecutive registers starting from r2. */
-
-#define EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
- bcopy (&(((char *)REGBUF)[REGISTER_BYTE(RV_REGNUM)]), (VALBUF), TYPE_LENGTH (TYPE))
-
-#define EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) (*(int *)(REGBUF))
-
-/* Write into appropriate registers a function return value
- of type TYPE, given in virtual format. */
-
-#define STORE_RETURN_VALUE(TYPE,VALBUF) \
- write_register_bytes (2*sizeof(void*), (VALBUF), TYPE_LENGTH (TYPE))
-
-/* In COFF, if PCC says a parameter is a short or a char, do not
- change it to int (it seems the convention is to change it). */
-
-#define BELIEVE_PCC_PROMOTION 1
-
-/* Describe the pointer in each stack frame to the previous stack frame
- (its caller). */
-
-/* FRAME_CHAIN takes a frame's nominal address
- and produces the frame's chain-pointer.
-
- FRAME_CHAIN_COMBINE takes the chain pointer and the frame's nominal address
- and produces the nominal address of the caller frame.
-
- However, if FRAME_CHAIN_VALID returns zero,
- it means the given frame is the outermost one and has no caller.
- In that case, FRAME_CHAIN_COMBINE is not used. */
-
-extern CORE_ADDR frame_chain ();
-extern int frame_chain_valid ();
-extern CORE_ADDR frame_chain_combine ();
-extern int frameless_function_invocation ();
-
-#define FRAME_CHAIN(thisframe) \
- frame_chain (thisframe)
-
-#define FRAME_CHAIN_VALID(chain, thisframe) \
- frame_chain_valid (chain, thisframe)
-
-#define FRAME_CHAIN_COMBINE(chain, thisframe) \
- frame_chain_combine (chain, thisframe)
-
-#define FRAMELESS_FUNCTION_INVOCATION(frame, fromleaf) \
- fromleaf = frameless_function_invocation (frame)
-
-/* Define other aspects of the stack frame. */
-
-#define FRAME_SAVED_PC(FRAME) \
- frame_saved_pc (FRAME)
-extern CORE_ADDR frame_saved_pc ();
-
-#define FRAME_ARGS_ADDRESS(fi) \
- frame_args_address (fi)
-extern CORE_ADDR frame_args_address ();
-
-#define FRAME_LOCALS_ADDRESS(fi) \
- frame_locals_address (fi)
-extern CORE_ADDR frame_locals_address ();
-
-/* Return number of args passed to a frame.
- Can return -1, meaning no way to tell. */
-
-#define FRAME_NUM_ARGS(numargs, fi) ((numargs) = -1)
-
-/* Return number of bytes at start of arglist that are not really args. */
-
-#define FRAME_ARGS_SKIP 0
-
-/* Put here the code to store, into a struct frame_saved_regs,
- the addresses of the saved registers of frame described by FRAME_INFO.
- This includes special registers such as pc and fp saved in special
- ways in the stack frame. sp is even more special:
- the address we return for it IS the sp for the next frame. */
-
-/* On the 88k, parameter registers get stored into the so called "homing"
- area. This *always* happens when you compiled with GCC and use -g.
- Also, (with GCC and -g) the saving of the parameter register values
- always happens right within the function prologue code, so these register
- values can generally be relied upon to be already copied into their
- respective homing slots by the time you will normally try to look at
- them (we hope).
-
- Note that homing area stack slots are always at *positive* offsets from
- the frame pointer. Thus, the homing area stack slots for the parameter
- registers (passed values) for a given function are actually part of the
- frame area of the caller. This is unusual, but it should not present
- any special problems for GDB.
-
- Note also that on the 88k, we are only interested in finding the
- registers that might have been saved in memory. This is a subset of
- the whole set of registers because the standard calling sequence allows
- the called routine to clobber many registers.
-
- We could manage to locate values for all of the so called "preserved"
- registers (some of which may get saved within any particular frame) but
- that would require decoding all of the tdesc information. Tht would be
- nice information for GDB to have, but it is not strictly manditory if we
- can live without the ability to look at values within (or backup to)
- previous frames.
-*/
-
-#define FRAME_FIND_SAVED_REGS(frame_info, frame_saved_regs) \
- frame_find_saved_regs (frame_info, &frame_saved_regs)
-
-\f
-/* There is not currently a functioning way to call functions in the
- inferior. */
-
-/* But if there was this is where we'd put the call dummy. */
-/* #define CALL_DUMMY_LOCATION AFTER_TEXT_END */
-
-/* When popping a frame on the 88k (say when doing a return command), the
- calling function only expects to have the "preserved" registers restored.
- Thus, those are the only ones that we even try to restore here. */
-
-extern void pop_frame ();
-
-#define POP_FRAME pop_frame ()
+#include "tm-m88k.h"
/* BCS is a standard for binary compatibility. This machine uses it. */
#if !defined (BCS)
/* FRAME_CHAIN takes a frame's nominal address
and produces the frame's chain-pointer.
- FRAME_CHAIN_COMBINE takes the chain pointer and the frame's nominal address
- and produces the nominal address of the caller frame.
-
However, if FRAME_CHAIN_VALID returns zero,
- it means the given frame is the outermost one and has no caller.
- In that case, FRAME_CHAIN_COMBINE is not used. */
+ it means the given frame is the outermost one and has no caller. */
#define FRAME_CHAIN(thisframe) \
(outside_startup_file ((thisframe)->pc) ? \
#define FRAME_CHAIN_VALID(chain, thisframe) \
(chain != 0 && (outside_startup_file (FRAME_SAVED_PC (thisframe))))
-#define FRAME_CHAIN_COMBINE(chain, thisframe) (chain)
-
/* Define other aspects of the stack frame. */
/* A macro that tells us whether the function invocation represented
/* FRAME_CHAIN takes a frame's nominal address
and produces the frame's chain-pointer.
- FRAME_CHAIN_COMBINE takes the chain pointer and the frame's nominal address
- and produces the nominal address of the caller frame.
-
However, if FRAME_CHAIN_VALID returns zero,
- it means the given frame is the outermost one and has no caller.
- In that case, FRAME_CHAIN_COMBINE is not used. */
+ it means the given frame is the outermost one and has no caller. */
/* We cache information about saved registers in the frame structure,
to save us from having to re-scan function prologues every time
#define FRAME_CHAIN(thisframe) \
(read_memory_integer (FRAME_FP(thisframe), 4) & ~0xf)
-#define FRAME_CHAIN_COMBINE(chain, thisframe) (chain)
-
/* FRAME_CHAIN_VALID returns zero if the given frame is the outermost one
- and has no caller. In that case, FRAME_CHAIN_COMBINE is not used.
+ and has no caller.
On the i960, each various target system type must define FRAME_CHAIN_VALID,
since it differs between NINDY and VxWorks, the two currently supported
/* FRAME_CHAIN takes a frame's nominal address
and produces the frame's chain-pointer.
- FRAME_CHAIN_COMBINE takes the chain pointer and the frame's nominal address
- and produces the nominal address of the caller frame.
-
However, if FRAME_CHAIN_VALID returns zero,
- it means the given frame is the outermost one and has no caller.
- In that case, FRAME_CHAIN_COMBINE is not used. */
+ it means the given frame is the outermost one and has no caller. */
#define FRAME_CHAIN(thisframe) (FRAME_ADDR)mips_frame_chain(thisframe)
#define FRAME_CHAIN_VALID(chain, thisframe) \
(chain != 0 && (outside_startup_file (FRAME_SAVED_PC (thisframe))))
-#define FRAME_CHAIN_COMBINE(chain, thisframe) (chain)
-
/* Define other aspects of the stack frame. */
-/* Copyright (C) 1986, 1987, 1988, 1989, 1990 Free Software Foundation, Inc.
+/* Target machine description for generic Motorola 88000, for GDB.
+ Copyright 1986, 1987, 1988, 1989, 1990, 1991 Free Software Foundation, Inc.
This file is part of GDB.
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
-/* This is currently for a 88000 running DGUX. If other 88k ports are
- done, OS-specific stuff should be moved (see tm-68k.h, for example). */
/* g++ support is not yet included. */
-#include "tdesc.h"
-
-#if !defined (DGUX)
-#define DGUX 1
-#endif
-
#define TARGET_BYTE_ORDER BIG_ENDIAN
-#define EXTRA_SYMTAB_INFO int coffsem;
-
-/* This is not a CREATE_INFERIOR_HOOK because it also applies to
- remote debugging. */
-#define START_INFERIOR_HOOK() \
- { \
- extern int safe_to_init_tdesc_context; \
- extern dc_handle_t tdesc_handle; \
- \
- safe_to_init_tdesc_context = 0; \
- if (tdesc_handle) \
- { \
- dc_terminate (tdesc_handle); \
- tdesc_handle = 0; \
- } \
- }
-
-dc_dcontext_t get_prev_context ();
-extern int stack_error;
-
-#define EXTRA_FRAME_INFO dc_dcontext_t frame_context;
-#define INIT_EXTRA_FRAME_INFO(fromleaf, fci) \
- { \
- if (fci->next_frame != NULL) \
- { \
- extern jmp_buf stack_jmp; \
- struct frame_info *next_frame = fci->next; \
- /* The call to get_prev_context */ \
- /* will update current_context for us. */ \
- stack_error = 1; \
- if (!setjmp (stack_jmp)) \
- { \
- fci->frame_context \
- = get_prev_context (next_frame->frame_context); \
- stack_error = 0; \
- } \
- else \
- { \
- stack_error = 0; \
- next_frame->prev = 0; \
- return 0; \
- } \
- if (!fci->frame_context) \
- { \
- next_frame->prev = 0; \
- return 0; \
- } \
- } \
- else \
- { \
- /* We are creating an arbitrary frame */ \
- /* (i.e. we are in create_new_frame). */ \
- extern dc_dcontext_t current_context; \
- \
- fci->frame_context = current_context; \
- } \
- }
-
-#define INIT_FRAME_PC(fromleaf, prev) \
- { \
- prev->pc = dc_location (prev->frame_context); \
- prev->frame = get_frame_base (prev->pc); \
- }
+/* We cache information about saved registers in the frame structure,
+ to save us from having to re-scan function prologues every time
+ a register in a non-current frame is accessed. */
-#define IEEE_FLOAT
+#define EXTRA_FRAME_INFO \
+ struct frame_saved_regs *fsr; \
+ CORE_ADDR locals_pointer; \
+ CORE_ADDR args_pointer;
+
+/* Zero the frame_saved_regs pointer when the frame is initialized,
+ so that FRAME_FIND_SAVED_REGS () will know to allocate and
+ initialize a frame_saved_regs struct the first time it is called.
+ Set the arg_pointer to -1, which is not valid; 0 and other values
+ indicate real, cached values. */
-/* Text Description (TDESC) is used by m88k to maintain stack & reg info */
+#define INIT_EXTRA_FRAME_INFO(fromleaf, fi) \
+ init_extra_frame_info (fromleaf, fi)
+extern void init_extra_frame_info ();
-#define TDESC
+#define IEEE_FLOAT
/* Define this if the C compiler puts an underscore at the front
of external names before giving them to the linker. */
#define NAMES_HAVE_UNDERSCORE
-/* Hook for read_relative_register_raw_bytes */
-
-#define READ_RELATIVE_REGISTER_RAW_BYTES
-
/* Offset from address of function to start of its code.
Zero on most machines. */
/* Advance PC across any function entry prologue instructions
to reach some "real" code. */
-#define SKIP_PROLOGUE(frompc) 0
+#define SKIP_PROLOGUE(frompc) \
+ skip_prologue (frompc)
+extern CORE_ADDR skip_prologue ();
/* The m88k kernel aligns all instructions on 4-byte boundaries. The
kernel also uses the least significant two bits for its own hocus
some instructions. */
#define SAVED_PC_AFTER_CALL(frame) \
- (read_register (SRP_REGNUM) & (~3))
-
-/* Address of end of stack space. */
-
-#define STACK_END_ADDR 0xF0000000
-
-/* Stack grows downward. */
-
-#define INNER_THAN <
-
-/* Sequence of bytes for breakpoint instruction. */
-
-/* instruction 0xF000D1FF is 'tb0 0,r0,511'
- If Bit bit 0 of r0 is clear (always true),
- initiate exception processing (trap).
- */
-#define BREAKPOINT {0xF0, 0x00, 0xD1, 0xFF}
-
-/* Address of end of stack space. */
-
-#define STACK_END_ADDR 0xF0000000
+ (ADDR_BITS_REMOVE (read_register (SRP_REGNUM)))
/* Stack grows downward. */
#define ABOUT_TO_RETURN(pc) (read_memory_integer (pc, 2) == 0xF800)
/* Return 1 if P points to an invalid floating point value.
- LEN is the length in bytes -- not relevant on the 386. */
+ LEN is the length in bytes. */
#define INVALID_FLOAT(p, len) IEEE_isNAN(p,len)
#define SRP_REGNUM 1 /* Contains subroutine return pointer */
#define RV_REGNUM 2 /* Contains simple return values */
#define SRA_REGNUM 12 /* Contains address of struct return values */
-#define FP_REGNUM 30 /* Contains address of executing stack frame */
+#define FP_REGNUM 31 /* Reg fetched to locate frame when pgm stops */
#define SP_REGNUM 31 /* Contains address of top of stack */
#define SXIP_REGNUM 35 /* Contains Shadow Execute Instruction Pointer */
#define SNIP_REGNUM 36 /* Contains Shadow Next Instruction Pointer */
#define BELIEVE_PCC_PROMOTION 1
-/* We provide our own get_saved_register in m88k-tdep.c. */
-#define GET_SAVED_REGISTER
-
/* Describe the pointer in each stack frame to the previous stack frame
(its caller). */
/* FRAME_CHAIN takes a frame's nominal address
and produces the frame's chain-pointer.
- FRAME_CHAIN_COMBINE takes the chain pointer and the frame's nominal address
- and produces the nominal address of the caller frame.
-
However, if FRAME_CHAIN_VALID returns zero,
- it means the given frame is the outermost one and has no caller.
- In that case, FRAME_CHAIN_COMBINE is not used. */
+ it means the given frame is the outermost one and has no caller. */
-/* These are just dummies for the 88k because INIT_FRAME_PC sets prev->frame
- instead. */
+extern CORE_ADDR frame_chain ();
+extern int frame_chain_valid ();
+extern int frameless_function_invocation ();
-#define FRAME_CHAIN(thisframe) (0)
+#define FRAME_CHAIN(thisframe) \
+ frame_chain (thisframe)
-#define FRAME_CHAIN_VALID(chain, thisframe) (1)
+#define FRAME_CHAIN_VALID(chain, thisframe) \
+ frame_chain_valid (chain, thisframe)
-#define FRAME_CHAIN_COMBINE(chain, thisframe) (0)
+#define FRAMELESS_FUNCTION_INVOCATION(frame, fromleaf) \
+ fromleaf = frameless_function_invocation (frame)
/* Define other aspects of the stack frame. */
-#define FRAME_SAVED_PC(FRAME) (read_memory_integer ((FRAME)->frame+4, 4))
+#define FRAME_SAVED_PC(FRAME) \
+ frame_saved_pc (FRAME)
+extern CORE_ADDR frame_saved_pc ();
-#define FRAME_ARGS_ADDRESS(fi) ((fi)->frame)
+#define FRAME_ARGS_ADDRESS(fi) \
+ frame_args_address (fi)
+extern CORE_ADDR frame_args_address ();
-#define FRAME_LOCALS_ADDRESS(fi) ((fi)->frame)
+#define FRAME_LOCALS_ADDRESS(fi) \
+ frame_locals_address (fi)
+extern CORE_ADDR frame_locals_address ();
/* Return number of args passed to a frame.
Can return -1, meaning no way to tell. */
calling function only expects to have the "preserved" registers restored.
Thus, those are the only ones that we even try to restore here. */
-extern void pop_frame ();
-
#define POP_FRAME pop_frame ()
-
-/* BCS is a standard for binary compatibility. This machine uses it. */
-#if !defined (BCS)
-#define BCS 1
-#endif
+extern void pop_frame ();
/* FRAME_CHAIN takes a frame's nominal address
and produces the frame's chain-pointer.
- FRAME_CHAIN_COMBINE takes the chain pointer and the frame's nominal address
- and produces the nominal address of the caller frame.
-
However, if FRAME_CHAIN_VALID returns zero,
- it means the given frame is the outermost one and has no caller.
- In that case, FRAME_CHAIN_COMBINE is not used. */
+ it means the given frame is the outermost one and has no caller. */
/* In the case of the Merlin, the frame's nominal address is the FP value,
and at that address is saved previous FP value as a 4-byte word. */
#define FRAME_CHAIN_VALID(chain, thisframe) \
(chain != 0 && (outside_startup_file (FRAME_SAVED_PC (thisframe))))
-#define FRAME_CHAIN_COMBINE(chain, thisframe) (chain)
-
/* Define other aspects of the stack frame. */
#define FRAME_SAVED_PC(FRAME) (read_memory_integer ((FRAME)->frame + 4, 4))
/* FRAME_CHAIN takes a frame's nominal address
and produces the frame's chain-pointer.
- FRAME_CHAIN_COMBINE takes the chain pointer and the frame's nominal address
- and produces the nominal address of the caller frame.
-
However, if FRAME_CHAIN_VALID returns zero,
- it means the given frame is the outermost one and has no caller.
- In that case, FRAME_CHAIN_COMBINE is not used. */
+ it means the given frame is the outermost one and has no caller. */
#define FRAME_CHAIN(thisframe) (FRAME_ADDR)mips_frame_chain(thisframe)
#define FRAME_CHAIN_VALID(chain, thisframe) \
(chain != 0 && (outside_startup_file (FRAME_SAVED_PC (thisframe))))
-#define FRAME_CHAIN_COMBINE(chain, thisframe) (chain)
-
/* Define other aspects of the stack frame. */
#define STACK_END_ADDR (0xfe000000)
/* FRAME_CHAIN_VALID returns zero if the given frame is the outermost one
- and has no caller. In that case, FRAME_CHAIN_COMBINE is not used.
+ and has no caller.
On the i960, each various target system type defines FRAME_CHAIN_VALID,
since it differs between NINDY and VxWorks, the two currently supported
/* FRAME_CHAIN takes a frame's nominal address
and produces the frame's chain-pointer.
- FRAME_CHAIN_COMBINE takes the chain pointer and the frame's nominal address
- and produces the nominal address of the caller frame.
-
However, if FRAME_CHAIN_VALID returns zero,
- it means the given frame is the outermost one and has no caller.
- In that case, FRAME_CHAIN_COMBINE is not used. */
+ it means the given frame is the outermost one and has no caller. */
/* In the case of the NPL, the frame's norminal address is Br2 and the
previous routines frame is up the stack X bytes, where X is the
#define FRAME_CHAIN_VALID(chain, thisframe) \
(chain != 0 && chain != (thisframe)->frame)
-#define FRAME_CHAIN_COMBINE(chain, thisframe) \
- (chain)
-
/* Define other aspects of the stack frame on NPL. */
#define FRAME_SAVED_PC(FRAME) \
(read_memory_integer ((FRAME)->frame + 8, 4))
/* FRAME_CHAIN takes a frame's nominal address
and produces the frame's chain-pointer.
- FRAME_CHAIN_COMBINE takes the chain pointer and the frame's nominal address
- and produces the nominal address of the caller frame.
-
However, if FRAME_CHAIN_VALID returns zero,
- it means the given frame is the outermost one and has no caller.
- In that case, FRAME_CHAIN_COMBINE is not used. */
+ it means the given frame is the outermost one and has no caller. */
/* In the case of the NPL, the frame's norminal address is Br2 and the
previous routines frame is up the stack X bytes, where X is the
#define FRAME_CHAIN_VALID(chain, thisframe) \
(chain != 0 && chain != (thisframe)->frame)
-#define FRAME_CHAIN_COMBINE(chain, thisframe) \
- (chain)
-
/* Define other aspects of the stack frame on NPL. */
#define FRAME_SAVED_PC(frame) \
(read_memory_integer ((frame)->frame + 8, 4))
/* FRAME_CHAIN takes a frame's nominal address
and produces the frame's chain-pointer.
- FRAME_CHAIN_COMBINE takes the chain pointer and the frame's nominal address
- and produces the nominal address of the caller frame.
-
However, if FRAME_CHAIN_VALID returns zero,
- it means the given frame is the outermost one and has no caller.
- In that case, FRAME_CHAIN_COMBINE is not used. */
+ it means the given frame is the outermost one and has no caller. */
/* In the case of the pyr, the frame's nominal address is the address
of parameter register 0. The previous frame is found 32 words up. */
/*((thisframe) >= CONTROL_STACK_ADDR))*/
-#define FRAME_CHAIN_COMBINE(chain, thisframe) (chain)
-
/* Define other aspects of the stack frame. */
/* A macro that tells us whether the function invocation represented
/* FRAME_CHAIN takes a frame's nominal address
and produces the frame's chain-pointer.
- FRAME_CHAIN_COMBINE takes the chain pointer and the frame's nominal address
- and produces the nominal address of the caller frame.
-
However, if FRAME_CHAIN_VALID returns zero,
- it means the given frame is the outermost one and has no caller.
- In that case, FRAME_CHAIN_COMBINE is not used. */
+ it means the given frame is the outermost one and has no caller. */
/* In the case of the RS6000, the frame's nominal address
is the address of a 4-byte word containing the calling frame's address. */
#define FRAME_CHAIN_VALID(chain, thisframe) \
(chain != 0 && (outside_startup_file (FRAME_SAVED_PC (thisframe))))
-#define FRAME_CHAIN_COMBINE(chain, thisframe) (chain)
-
/* Define other aspects of the stack frame. */
/* A macro that tells us whether the function invocation represented
/* FRAME_CHAIN takes a frame's nominal address
and produces the frame's chain-pointer.
- FRAME_CHAIN_COMBINE takes the chain pointer and the frame's nominal address
- and produces the nominal address of the caller frame.
-
However, if FRAME_CHAIN_VALID returns zero,
- it means the given frame is the outermost one and has no caller.
- In that case, FRAME_CHAIN_COMBINE is not used. */
+ it means the given frame is the outermost one and has no caller. */
/* In the case of the Sun 4, the frame-chain's nominal address
is held in the frame pointer register.
#define FRAME_CHAIN_VALID(chain, thisframe) \
(chain != 0 && (outside_startup_file (FRAME_SAVED_PC (thisframe))))
-#define FRAME_CHAIN_COMBINE(chain, thisframe) (chain)
-
/* Define other aspects of the stack frame. */
/* A macro that tells us whether the function invocation represented
/* FRAME_CHAIN takes a frame's nominal address
and produces the frame's chain-pointer.
- FRAME_CHAIN_COMBINE takes the chain pointer and the frame's nominal address
- and produces the nominal address of the caller frame.
-
However, if FRAME_CHAIN_VALID returns zero,
- it means the given frame is the outermost one and has no caller.
- In that case, FRAME_CHAIN_COMBINE is not used. */
+ it means the given frame is the outermost one and has no caller. */
#define FRAME_CHAIN(thisframe) \
(outside_startup_file ((thisframe)->pc) ? \
#define FRAME_CHAIN_VALID(chain, thisframe) \
(chain != 0 && (outside_startup_file (FRAME_SAVED_PC (thisframe))))
-#define FRAME_CHAIN_COMBINE(chain, thisframe) (chain)
-
/* Define other aspects of the stack frame. */
/* A macro that tells us whether the function invocation represented
/* FRAME_CHAIN takes a frame's nominal address
and produces the frame's chain-pointer.
- FRAME_CHAIN_COMBINE takes the chain pointer and the frame's nominal address
- and produces the nominal address of the caller frame.
-
However, if FRAME_CHAIN_VALID returns zero,
- it means the given frame is the outermost one and has no caller.
- In that case, FRAME_CHAIN_COMBINE is not used. */
+ it means the given frame is the outermost one and has no caller. */
/* On Symmetry, %ebp points to caller's %ebp, and the return address
- is right on top of that.
-*/
+ is right on top of that. */
#define FRAME_CHAIN(thisframe) \
(outside_startup_file ((thisframe)->pc) ? \
#define FRAME_CHAIN_VALID(chain, thisframe) \
(chain != 0)
-#define FRAME_CHAIN_COMBINE(chain, thisframe) (chain)
-
/* Define other aspects of the stack frame. */
/* A macro that tells us whether the function invocation represented
FRAME_CHAIN takes a frame's nominal address
and produces the frame's chain-pointer.
- FRAME_CHAIN_COMBINE takes the chain pointer and the frame's nominal address
- and produces the nominal address of the caller frame.
-
However, if FRAME_CHAIN_VALID returns zero,
- it means the given frame is the outermost one and has no caller.
- In that case, FRAME_CHAIN_COMBINE is not used. */
+ it means the given frame is the outermost one and has no caller. */
/* In the case of the Tahoe, the frame's nominal address is the FP value,
and it points to the old FP */
#define FRAME_CHAIN_VALID(chain, thisframe) \
(chain != 0 && (outside_startup_file (FRAME_SAVED_PC (thisframe))))
-#define FRAME_CHAIN_COMBINE(chain, thisframe) (chain)
-
/* Define other aspects of the stack frame. */
/* Saved PC */
/* FRAME_CHAIN takes a frame's nominal address
and produces the frame's chain-pointer.
- FRAME_CHAIN_COMBINE takes the chain pointer and the frame's nominal address
- and produces the nominal address of the caller frame.
-
However, if FRAME_CHAIN_VALID returns zero,
- it means the given frame is the outermost one and has no caller.
- In that case, FRAME_CHAIN_COMBINE is not used. */
+ it means the given frame is the outermost one and has no caller. */
/* In the case of the ns32000 series, the frame's nominal address is the FP
value, and at that address is saved previous FP value as a 4-byte word. */
#define FRAME_CHAIN_VALID(chain, thisframe) \
(chain != 0 && (outside_startup_file (FRAME_SAVED_PC (thisframe))))
-#define FRAME_CHAIN_COMBINE(chain, thisframe) (chain)
-
/* Define other aspects of the stack frame. */
#define FRAME_SAVED_PC(FRAME) (read_memory_integer ((FRAME)->frame + 4, 4))
/* FRAME_CHAIN takes a frame's nominal address
and produces the frame's chain-pointer.
- FRAME_CHAIN_COMBINE takes the chain pointer and the frame's nominal address
- and produces the nominal address of the caller frame.
-
However, if FRAME_CHAIN_VALID returns zero,
- it means the given frame is the outermost one and has no caller.
- In that case, FRAME_CHAIN_COMBINE is not used. */
+ it means the given frame is the outermost one and has no caller. */
/* In the case of the Vax, the frame's nominal address is the FP value,
and 12 bytes later comes the saved previous FP value as a 4-byte word. */
#define FRAME_CHAIN_VALID(chain, thisframe) \
(chain != 0 && (outside_startup_file (FRAME_SAVED_PC (thisframe))))
-#define FRAME_CHAIN_COMBINE(chain, thisframe) (chain)
-
/* Define other aspects of the stack frame. */
/* A macro that tells us whether the function invocation represented
-/* Copyright (C) 1986, 1987, 1988, 1989, 1990 Free Software Foundation, Inc.
+/* Host machine description for Motorola Delta 88 system, for GDB.
+ Copyright 1986, 1987, 1988, 1989, 1990, 1991 Free Software Foundation, Inc.
This file is part of GDB.
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
-/* This is currently for a 88000 running DGUX. If other 88k ports are
- done, OS-specific stuff should be moved (see tm-68k.h, for example). */
-/* g++ support is not yet included. */
-
#define HOST_BYTE_ORDER BIG_ENDIAN
#if !defined (USG)
#endif
#define MAXPATHLEN 1024
-/* delta 88 doesn't have bcopy(), etc. */
-#define USG_UTILS 1
#include <sys/param.h>
#include <sys/time.h>
-#define vfork() fork()
-#define index strchr
-#define rindex strrchr
-#define getwd(BUF) getcwd(BUF,MAXPATHLEN);
-#define bzero(ptr,count) (memset((ptr),0,(count)))
-#define bcopy(src,dst,count) (memcpy((dst),(src),(count)))
-#define bcmp(left,right,count) (memcmp((right),(left),(count)))
-#if 0
-#ifdef __GNUC__
-#define memcpy __builtin_memcpy
-/* gcc doesn't have this, at least not gcc 1.92. */
-/* #define memset __builtin_memset */
-#define strcmp __builtin_strcmp
-#endif
-#endif
-
#define HAVE_TERMIO
-
/*#define USIZE 2048*/
#define NBPG NBPC
#define UPAGES USIZE
-#define HAVE_GETPAGESIZE
-
/* Get rid of any system-imposed stack limit if possible. */
/*#define SET_STACK_LIMIT_HUGE*/
-/* number of traps that happen between exec'ing the shell
- * to run an inferior, and when we finally get to
- * the inferior code. This is 2 on most implementations.
- */
-#define START_INFERIOR_TRAPS_EXPECTED 2
-
/* This is the amount to subtract from u.u_ar0
to get the offset in the core file of the register values. */
#define REGISTER_U_ADDR(addr, blockend, regno) \
(addr) = m88k_register_u_addr ((blockend),(regno));
-#define HAVE_WAIT_STRUCT
-
#define FETCH_INFERIOR_REGISTERS
-\f
-/* Interface definitions for kernel debugger KDB. */
-
-/* Map machine fault codes into signal numbers.
- First subtract 0, divide by 4, then index in a table.
- Faults for which the entry in this table is 0
- are not handled by KDB; the program's own trap handler
- gets to handle then. */
-
-#define FAULT_CODE_ORIGIN 0
-#define FAULT_CODE_UNITS 4
-#define FAULT_TABLE \
-{ 0, 0, 0, 0, 0, 0, 0, 0, \
- 0, 0, 0, 0, 0, 0, 0, 0, \
- 0, 0, 0, 0, 0, 0, 0, 0}
-
-/* Start running with a stack stretching from BEG to END.
- BEG and END should be symbols meaningful to the assembler.
- This is used only for kdb. */
-
-#define INIT_STACK(beg, end) {}
-
-/* Push the frame pointer register on the stack. */
-#define PUSH_FRAME_PTR {}
-
-/* Copy the top-of-stack to the frame pointer register. */
-#define POP_FRAME_PTR {}
-
-/* After KDB is entered by a fault, push all registers
- that GDB thinks about (all NUM_REGS of them),
- so that they appear in order of ascending GDB register number.
- The fault code will be on the stack beyond the last register. */
-
-#define PUSH_REGISTERS {}
-/* Assuming the registers (including processor status) have been
- pushed on the stack in order of ascending GDB register number,
- restore them and return to the address in the saved PC register. */
+/* Address of end of stack space (in core files). */
-#define POP_REGISTERS {}
+#define STACK_END_ADDR 0xF0000000
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
-/* This is currently for a 88000 running DGUX. If other 88k ports are
- done, OS-specific stuff should be moved (see tm-68k.h, for example). */
-/* g++ support is not yet included. */
-
#define HOST_BYTE_ORDER BIG_ENDIAN
#if !defined (USG)
#define NBPG NBPC
#define UPAGES USIZE
-#define HAVE_GETPAGESIZE
-
/* Get rid of any system-imposed stack limit if possible. */
#define SET_STACK_LIMIT_HUGE
-/* number of traps that happen between exec'ing the shell
- * to run an inferior, and when we finally get to
- * the inferior code. This is 2 on most implementations.
- */
-#define START_INFERIOR_TRAPS_EXPECTED 2
-
/* This is the amount to subtract from u.u_ar0
to get the offset in the core file of the register values. */
#define REGISTER_U_ADDR(addr, blockend, regno) \
(addr) = m88k_register_u_addr ((blockend),(regno));
-#define HAVE_WAIT_STRUCT
-
#define FETCH_INFERIOR_REGISTERS