Try again. Cvs core dumped.
This commit is contained in:
parent
c7cb90647b
commit
a493d9a667
3 changed files with 28 additions and 48 deletions
|
@ -241,7 +241,7 @@ sparclite*-*-*) gdb_target=sparclite ;;
|
||||||
tahoe-*-*) gdb_target=tahoe ;;
|
tahoe-*-*) gdb_target=tahoe ;;
|
||||||
vax-*-*) gdb_target=vax ;;
|
vax-*-*) gdb_target=vax ;;
|
||||||
|
|
||||||
z8k-unknown-sim) gdb_target=z8ksim ;;
|
z8k-*-sim) gdb_target=z8ksim ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
if [ ! -f ${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt ]; then
|
if [ ! -f ${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt ]; then
|
||||||
|
|
|
@ -659,7 +659,7 @@ h8500_is_trapped_internalvar (name)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
PTR
|
value
|
||||||
h8500_value_of_trapped_internalvar (var)
|
h8500_value_of_trapped_internalvar (var)
|
||||||
struct internalvar *var;
|
struct internalvar *var;
|
||||||
{
|
{
|
||||||
|
|
|
@ -32,6 +32,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||||
#include "terminal.h"
|
#include "terminal.h"
|
||||||
#include "target.h"
|
#include "target.h"
|
||||||
#include "gdbcore.h"
|
#include "gdbcore.h"
|
||||||
|
#include "serial.h"
|
||||||
|
|
||||||
/* External data declarations */
|
/* External data declarations */
|
||||||
extern int stop_soon_quietly; /* for wait_for_inferior */
|
extern int stop_soon_quietly; /* for wait_for_inferior */
|
||||||
|
@ -49,6 +50,9 @@ extern struct target_ops hms_ops;
|
||||||
|
|
||||||
static int quiet = 1;
|
static int quiet = 1;
|
||||||
|
|
||||||
|
|
||||||
|
serial_t desc;
|
||||||
|
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* Caching stuff stolen from remote-nindy.c */
|
/* Caching stuff stolen from remote-nindy.c */
|
||||||
|
|
||||||
|
@ -251,9 +255,9 @@ readchar ()
|
||||||
{
|
{
|
||||||
int buf;
|
int buf;
|
||||||
|
|
||||||
buf = serial_readchar (timeout);
|
buf = SERIAL_READCHAR (desc, timeout);
|
||||||
|
|
||||||
if (buf < 0)
|
if (buf == SERIAL_TIMEOUT)
|
||||||
error ("Timeout reading from remote system.");
|
error ("Timeout reading from remote system.");
|
||||||
|
|
||||||
if (!quiet)
|
if (!quiet)
|
||||||
|
@ -267,8 +271,8 @@ readchar_nofail ()
|
||||||
{
|
{
|
||||||
int buf;
|
int buf;
|
||||||
|
|
||||||
buf = serial_readchar (timeout);
|
buf = SERIAL_READCHAR (desc, timeout);
|
||||||
if (buf < 0)
|
if (buf == SERIAL_TIMEOUT)
|
||||||
buf = 0;
|
buf = 0;
|
||||||
if (!quiet)
|
if (!quiet)
|
||||||
printf ("%c", buf);
|
printf ("%c", buf);
|
||||||
|
@ -541,7 +545,7 @@ is_baudrate_right ()
|
||||||
|
|
||||||
while (1)
|
while (1)
|
||||||
{
|
{
|
||||||
ok = serial_readchar (timeout);
|
ok = SERIAL_READCHAR (desc, timeout);
|
||||||
if (ok < 0)
|
if (ok < 0)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -557,35 +561,16 @@ is_baudrate_right ()
|
||||||
static void
|
static void
|
||||||
set_rate ()
|
set_rate ()
|
||||||
{
|
{
|
||||||
if (!serial_setbaudrate (baudrate))
|
if (!SERIAL_SETBAUDRATE (desc, baudrate))
|
||||||
error ("Can't set baudrate");
|
error ("Can't set baudrate");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
get_baudrate_right ()
|
|
||||||
{
|
|
||||||
#if 0
|
|
||||||
while (!is_baudrate_right ())
|
|
||||||
{
|
|
||||||
baudrate = serial_nextbaudrate (baudrate);
|
|
||||||
if (baudrate == 0)
|
|
||||||
{
|
|
||||||
printf_filtered ("Board not yet in sync\n");
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
printf_filtered ("Board not responding, trying %d baud\n", baudrate);
|
|
||||||
QUIT;
|
|
||||||
serial_setbaudrate (baudrate);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
hms_open (name, from_tty)
|
hms_open (name, from_tty)
|
||||||
char *name;
|
char *name;
|
||||||
int from_tty;
|
int from_tty;
|
||||||
{
|
{
|
||||||
|
|
||||||
unsigned int prl;
|
unsigned int prl;
|
||||||
char *p;
|
char *p;
|
||||||
|
|
||||||
|
@ -595,19 +580,18 @@ hms_open (name, from_tty)
|
||||||
}
|
}
|
||||||
if (is_open)
|
if (is_open)
|
||||||
hms_close (0);
|
hms_close (0);
|
||||||
if (name && strlen (name))
|
dev_name = strdup (name);
|
||||||
dev_name = strdup (name);
|
|
||||||
if (!serial_open (dev_name))
|
if (!(desc = SERIAL_OPEN (dev_name)))
|
||||||
perror_with_name ((char *) dev_name);
|
perror_with_name ((char *) dev_name);
|
||||||
serial_raw ();
|
|
||||||
|
SERIAL_RAW (desc);
|
||||||
is_open = 1;
|
is_open = 1;
|
||||||
|
|
||||||
dcache_init ();
|
dcache_init ();
|
||||||
|
|
||||||
get_baudrate_right ();
|
|
||||||
|
|
||||||
/* Hello? Are you there? */
|
/* Hello? Are you there? */
|
||||||
serial_write ("\r", 1);
|
SERIAL_WRITE (desc, "\r", 1);
|
||||||
expect_prompt ();
|
expect_prompt ();
|
||||||
|
|
||||||
/* Clear any break points */
|
/* Clear any break points */
|
||||||
|
@ -625,10 +609,11 @@ hms_close (quitting)
|
||||||
/* Clear any break points */
|
/* Clear any break points */
|
||||||
hms_clear_breakpoints ();
|
hms_clear_breakpoints ();
|
||||||
sleep (1); /* Let any output make it all the way back */
|
sleep (1); /* Let any output make it all the way back */
|
||||||
if (is_open) {
|
if (is_open)
|
||||||
serial_write ("R\r", 2);
|
{
|
||||||
serial_close ();
|
SERIAL_WRITE (desc, "R\r", 2);
|
||||||
}
|
SERIAL_CLOSE (desc);
|
||||||
|
}
|
||||||
is_open = 0;
|
is_open = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -849,7 +834,6 @@ timed_read (buf, n, timeout)
|
||||||
|
|
||||||
}
|
}
|
||||||
return i;
|
return i;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
hms_write (a, l)
|
hms_write (a, l)
|
||||||
|
@ -857,7 +841,7 @@ hms_write (a, l)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
serial_write (a, l);
|
SERIAL_WRITE (desc, a, l);
|
||||||
|
|
||||||
if (!quiet)
|
if (!quiet)
|
||||||
for (i = 0; i < l; i++)
|
for (i = 0; i < l; i++)
|
||||||
|
@ -937,8 +921,6 @@ static void
|
||||||
hms_store_register (regno)
|
hms_store_register (regno)
|
||||||
int regno;
|
int regno;
|
||||||
{
|
{
|
||||||
|
|
||||||
/* printf("hms_store_register() called.\n"); fflush(stdout); /* */
|
|
||||||
if (regno == -1)
|
if (regno == -1)
|
||||||
{
|
{
|
||||||
for (regno = 0; regno < NUM_REGS; regno++)
|
for (regno = 0; regno < NUM_REGS; regno++)
|
||||||
|
@ -1217,7 +1199,7 @@ hms_read_inferior_memory (memaddr, myaddr, len)
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
expect("emory>");
|
expect ("emory>");
|
||||||
hms_write_cr (" ");
|
hms_write_cr (" ");
|
||||||
expect_prompt ();
|
expect_prompt ();
|
||||||
return len;
|
return len;
|
||||||
|
@ -1386,13 +1368,11 @@ hms_speed (s)
|
||||||
int newrate = atoi (s);
|
int newrate = atoi (s);
|
||||||
int which = 0;
|
int which = 0;
|
||||||
|
|
||||||
if (!serial_setbaudrate (newrate))
|
if (SERIAL_SETBAUDRATE (desc, newrate))
|
||||||
error ("Can't use %d baud\n", newrate);
|
error ("Can't use %d baud\n", newrate);
|
||||||
|
|
||||||
printf_filtered ("Checking target is in sync\n");
|
printf_filtered ("Checking target is in sync\n");
|
||||||
|
|
||||||
get_baudrate_right ();
|
|
||||||
baudrate = newrate;
|
|
||||||
printf_filtered ("Sending commands to set target to %d\n",
|
printf_filtered ("Sending commands to set target to %d\n",
|
||||||
baudrate);
|
baudrate);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue