* monitor.h (init_monitor_ops): Declare.
* rom68k-rom.c: Clarify some comments. (rom68k_open): Define as static, to match decl.
This commit is contained in:
parent
56b73ad2e3
commit
d108166fde
3 changed files with 58 additions and 49 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
Wed Apr 12 16:40:20 1995 Stan Shebs <shebs@andros.cygnus.com>
|
||||||
|
|
||||||
|
* monitor.h (init_monitor_ops): Declare.
|
||||||
|
* rom68k-rom.c: Clarify some comments.
|
||||||
|
(rom68k_open): Define as static, to match decl.
|
||||||
|
|
||||||
Wed Apr 12 16:36:44 1995 Jim Kingdon (kingdon@lioth.cygnus.com)
|
Wed Apr 12 16:36:44 1995 Jim Kingdon (kingdon@lioth.cygnus.com)
|
||||||
|
|
||||||
* gdb.gdb: New file.
|
* gdb.gdb: New file.
|
||||||
|
|
|
@ -167,5 +167,8 @@ extern struct monitor_ops *current_monitor;
|
||||||
#define MEM_DIS_CMD (current_monitor->getmem)
|
#define MEM_DIS_CMD (current_monitor->getmem)
|
||||||
#define REG_DELIM (current_monitor->regset.delim)
|
#define REG_DELIM (current_monitor->regset.delim)
|
||||||
|
|
||||||
extern void monitor_open PARAMS ((char *args, struct monitor_ops *ops, int from_tty));
|
extern void init_monitor_ops PARAMS ((struct target_ops *));
|
||||||
extern char *monitor_supply_register PARAMS ((int regno, char *valstr));
|
|
||||||
|
extern void monitor_open PARAMS ((char *, struct monitor_ops *, int));
|
||||||
|
|
||||||
|
extern char *monitor_supply_register PARAMS ((int, char *));
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
/* Remote target glue for the rom68k ROM monitor. This was running on a
|
/* Remote target glue for the ROM68K ROM monitor.
|
||||||
Motorola IDP board.
|
Copyright 1988, 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
|
||||||
|
|
||||||
Copyright 1988, 1991, 1992, 1993, 1994 Free Software Foundation, Inc.
|
|
||||||
|
|
||||||
This file is part of GDB.
|
This file is part of GDB.
|
||||||
|
|
||||||
|
@ -25,7 +23,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||||
#include "monitor.h"
|
#include "monitor.h"
|
||||||
#include "serial.h"
|
#include "serial.h"
|
||||||
|
|
||||||
static void rom68k_open PARAMS ((char *args, int from_tty));
|
static void rom68k_open PARAMS ((char *, int));
|
||||||
|
|
||||||
static void
|
static void
|
||||||
rom68k_supply_register (regname, regnamelen, val, vallen)
|
rom68k_supply_register (regname, regnamelen, val, vallen)
|
||||||
|
@ -41,6 +39,7 @@ rom68k_supply_register (regname, regnamelen, val, vallen)
|
||||||
regno = -1;
|
regno = -1;
|
||||||
|
|
||||||
if (regnamelen == 2)
|
if (regnamelen == 2)
|
||||||
|
{
|
||||||
switch (regname[0])
|
switch (regname[0])
|
||||||
{
|
{
|
||||||
case 'S':
|
case 'S':
|
||||||
|
@ -64,35 +63,35 @@ rom68k_supply_register (regname, regnamelen, val, vallen)
|
||||||
numregs = 7;
|
numregs = 7;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else if (regnamelen == 3)
|
else if (regnamelen == 3)
|
||||||
|
{
|
||||||
switch (regname[0])
|
switch (regname[0])
|
||||||
{
|
{
|
||||||
case 'I':
|
case 'I':
|
||||||
if (regname[1] == 'S' && regname[2] == 'P')
|
if (regname[1] == 'S' && regname[2] == 'P')
|
||||||
regno = SP_REGNUM;
|
regno = SP_REGNUM;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (regno >= 0)
|
if (regno >= 0)
|
||||||
while (numregs-- > 0)
|
while (numregs-- > 0)
|
||||||
val = monitor_supply_register (regno++, val);
|
val = monitor_supply_register (regno++, val);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/* This array of registers need to match the indexes used by GDB.
|
||||||
* this array of registers need to match the indexes used by GDB. The
|
This exists because the various ROM monitors use different strings
|
||||||
* whole reason this exists is cause the various ROM monitors use
|
than does GDB, and don't necessarily support all the registers
|
||||||
* different strings than GDB does, and doesn't support all the
|
either. So, typing "info reg sp" becomes a "r30". */
|
||||||
* registers either. So, typing "info reg sp" becomes a "r30".
|
|
||||||
*/
|
|
||||||
static char *rom68k_regnames[NUM_REGS] = {
|
static char *rom68k_regnames[NUM_REGS] = {
|
||||||
"D0", "D1", "D2", "D3", "D4", "D5", "D6", "D7",
|
"D0", "D1", "D2", "D3", "D4", "D5", "D6", "D7",
|
||||||
"A0", "A1", "A2", "A3", "A4", "A5", "A6", "ISP",
|
"A0", "A1", "A2", "A3", "A4", "A5", "A6", "ISP",
|
||||||
"SR", "PC" };
|
"SR", "PC" };
|
||||||
|
|
||||||
/*
|
/* Define the monitor command strings. Since these are passed directly
|
||||||
* Define the monitor command strings. Since these are passed directly
|
through to a printf style function, we may include formatting
|
||||||
* through to a printf style function, we need can include formatting
|
strings. We also need a CR or LF on the end. */
|
||||||
* strings. We also need a CR or LF on the end.
|
|
||||||
*/
|
|
||||||
|
|
||||||
static struct target_ops rom68k_ops;
|
static struct target_ops rom68k_ops;
|
||||||
|
|
||||||
|
@ -158,10 +157,10 @@ static struct monitor_ops rom68k_cmds =
|
||||||
SERIAL_1_STOPBITS, /* number of stop bits */
|
SERIAL_1_STOPBITS, /* number of stop bits */
|
||||||
rom68k_regnames, /* registers names */
|
rom68k_regnames, /* registers names */
|
||||||
MONITOR_OPS_MAGIC /* magic */
|
MONITOR_OPS_MAGIC /* magic */
|
||||||
};
|
};
|
||||||
|
|
||||||
void
|
static void
|
||||||
rom68k_open(args, from_tty)
|
rom68k_open (args, from_tty)
|
||||||
char *args;
|
char *args;
|
||||||
int from_tty;
|
int from_tty;
|
||||||
{
|
{
|
||||||
|
@ -181,6 +180,7 @@ Specify the serial device it is connected to (e.g. /dev/ttya).";
|
||||||
|
|
||||||
add_target (&rom68k_ops);
|
add_target (&rom68k_ops);
|
||||||
|
|
||||||
/* this is the default, since it's the only baud rate supported by the hardware */
|
/* This is the default, since it's the only baud rate supported by
|
||||||
|
the hardware. */
|
||||||
baud_rate = 9600;
|
baud_rate = 9600;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue