* mon960-rom.c: New file; support mon960 rom monitor on i960.

* monitor.c (monitor_debug): Change remotedebug to buffer strings.
       * monitor.c (monitor_open): Add test for flag MO_NO_ECHO_ON_OPEN before
       epecting prompt and echo during open.
       * monitor.c (monitor_stop): Add test for flag MO_SEND_BREAK_ON_OPEN to
       determine if break should be sent as stop command.
       * monitor.h: Add flags MO_NO_ECHO_ON_OPEN and MO_SEND_BREAK_ON_OPEN.
       * i960-tdep.c (mon960_frame_chain_valid): New function for getting
       stack frame on mon960.
       * Makefile.in: Add mon960 files.
       * configure.in: Changed i960-*-coff* and i960-*-elf* to target mon960;
       added i960-nindy-coff* and i960-nindy-elf* for target nindy.
       * configure: Regenerated.
       * config/i960/mon960.mt, config/i960/tm-mon960.h: New files;
       support mon960 rom monitor on i960.
This commit is contained in:
Dawn Perchik
1996-03-11 23:49:22 +00:00
parent 5d06fa80b2
commit 2e665cd3ad
7 changed files with 425 additions and 4 deletions

View File

@@ -760,6 +760,53 @@ next_insn (memaddr, pword1, pword2)
return 0;
}
/* 'start_frame' is a variable in the MON960 runtime startup routine
that contains the frame pointer of the 'start' routine (the routine
that calls 'main'). By reading its contents out of remote memory,
we can tell where the frame chain ends: backtraces should halt before
they display this frame. */
int
mon960_frame_chain_valid (chain, curframe)
unsigned int chain;
struct frame_info *curframe;
{
struct symbol *sym;
struct minimal_symbol *msymbol;
/* crtmon960.o is an assembler module that is assumed to be linked
* first in an i80960 executable. It contains the true entry point;
* it performs startup up initialization and then calls 'main'.
*
* 'sf' is the name of a variable in crtmon960.o that is set
* during startup to the address of the first frame.
*
* 'a' is the address of that variable in 80960 memory.
*/
static char sf[] = "start_frame";
CORE_ADDR a;
chain &= ~0x3f; /* Zero low 6 bits because previous frame pointers
contain return status info in them. */
if ( chain == 0 ){
return 0;
}
sym = lookup_symbol(sf, 0, VAR_NAMESPACE, (int *)NULL,
(struct symtab **)NULL);
if ( sym != 0 ){
a = SYMBOL_VALUE (sym);
} else {
msymbol = lookup_minimal_symbol (sf, NULL, NULL);
if (msymbol == NULL)
return 0;
a = SYMBOL_VALUE_ADDRESS (msymbol);
}
return ( chain != read_memory_integer(a,4) );
}
void
_initialize_i960_tdep ()
{