* monitor.c: Move all xmodem stuff into xmodem.[ch]. Remove

unnecessary remoteloadprotocol and remoteloadtype support.
	* (expect expect_prompt):  Change names to monitor_expect and
	monitor_expect_prompt.  Make them global.
	* (printf_monitor):  Change name to monitor_printf.  Make global.
	* (monitor_read_memory):  Flush command echo to avoid parsing
	ambiguity with CPU32Bug monitor.
	* (monitor_load):  Remove remoteloadprotocol and remoteloadtype
	support.  Call target_ops->load_routine, default to
	monitor_load_srec.
	* (monitor_load_srec):  Remove everything but S-record support.
	* monitor.h (monitor_ops):  Add load_routine to provide monitor
	specific download capability.
	* remote-est.c:  Clean up copyrights and comments.
	* w89k-rom.c:  Use new xmodem support.
	* xmodem.c xmodem.h:  New files to support xmodem downloads.
	* rom68k-rom.c remote-est.c:  Fix copyrights, add load_routine
	entry to monitor_ops.
	* cpu32bug-rom.c:  New file to support Moto BCC debuggers.
	* config/m68k/est.mt (TDEPFILES):  Add cpu32bug.o.
	* config/pa/hppapro.mt (TDEPFILES):  Add xmodem.o.
This commit is contained in:
Stu Grossman
1995-04-17 06:31:39 +00:00
parent 9ce0322db8
commit 5de0c6486d
10 changed files with 627 additions and 54 deletions

View File

@@ -23,7 +23,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#include "monitor.h"
#include "serial.h"
static void rom68k_open PARAMS ((char *, int));
static void rom68k_open PARAMS ((char *args, int from_tty));
static void
rom68k_supply_register (regname, regnamelen, val, vallen)
@@ -39,40 +39,36 @@ rom68k_supply_register (regname, regnamelen, val, vallen)
regno = -1;
if (regnamelen == 2)
{
switch (regname[0])
{
case 'S':
if (regname[1] == 'R')
regno = PS_REGNUM;
switch (regname[0])
{
case 'S':
if (regname[1] == 'R')
regno = PS_REGNUM;
break;
case 'P':
if (regname[1] == 'C')
regno = PC_REGNUM;
break;
case 'D':
if (regname[1] != 'R')
break;
case 'P':
if (regname[1] == 'C')
regno = PC_REGNUM;
regno = D0_REGNUM;
numregs = 8;
break;
case 'A':
if (regname[1] != 'R')
break;
case 'D':
if (regname[1] != 'R')
break;
regno = D0_REGNUM;
numregs = 8;
break;
case 'A':
if (regname[1] != 'R')
break;
regno = A0_REGNUM;
numregs = 7;
break;
}
}
regno = A0_REGNUM;
numregs = 7;
break;
}
else if (regnamelen == 3)
{
switch (regname[0])
{
case 'I':
if (regname[1] == 'S' && regname[2] == 'P')
regno = SP_REGNUM;
}
}
switch (regname[0])
{
case 'I':
if (regname[1] == 'S' && regname[2] == 'P')
regno = SP_REGNUM;
}
if (regno >= 0)
while (numregs-- > 0)
@@ -145,6 +141,7 @@ static struct monitor_ops rom68k_cmds =
/* register_pattern */
"\\(\\w+\\)=\\([0-9a-fA-F]+\\( +[0-9a-fA-F]+\\b\\)*\\)",
rom68k_supply_register, /* supply_register */
NULL, /* load_routine (defaults to SRECs) */
"dc\r", /* download command */
"Waiting for S-records from host... ", /* Load response */
"ROM68K :->", /* monitor command prompt */