From 0e3a4b1e8e1a70001f793e8070da38c791e58851 Mon Sep 17 00:00:00 2001 From: Jackie Smith Cashion Date: Mon, 23 Oct 1995 16:09:58 +0000 Subject: The revision 2.48 change (grossman 1995/10/16) had unfortunately broken the prompt spotting for the variant of the IDT monitor. Also took this opportunity to add the vr4300 configure.in options. --- gdb/ChangeLog | 10 ++++++++++ gdb/configure | 2 ++ gdb/configure.in | 2 ++ gdb/remote-mips.c | 40 +++++++++++++++++----------------------- 4 files changed, 31 insertions(+), 23 deletions(-) (limited to 'gdb') diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 86a1e45..01ac370 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,13 @@ +Mon Oct 23 16:03:33 1995 James G. Smith + + * configure.in (configdirs): Added support for the VR4300 default + builds (mips64*vr4300*el-*-elf*, mips64*vr4300*-*-elf*). + + * configure: Regenerated. + + * remote-mips.c (mips_load): Updated the prompt spotting code to + make use of the TARGET_MONITOR_PROMPT manifest. + Sat Oct 21 06:11:49 1995 Peter Schauer (pes@regent.e-technik.tu-muenchen.de) * alpha-tdep.c, mips-tdep.c (init_extra_frame_info): diff --git a/gdb/configure b/gdb/configure index b21ee8a..994818b 100755 --- a/gdb/configure +++ b/gdb/configure @@ -2289,6 +2289,8 @@ mips*-dec-mach3*) gdb_target=mach3 ;; mips*-dec-*) gdb_target=decstation ;; mips64*el-*-ecoff*) gdb_target=idtl64 ;; mips64*-idt-ecoff*) gdb_target=idt64 ;; +mips64*vr4300*el-*-elf*) gdb_target=vr4300el ;; +mips64*vr4300*-*-elf*) gdb_target=vr4300 ;; mips64*el-*-elf*) gdb_target=idtl64 ;; mips64*-*-elf*) gdb_target=idt64 ;; mips*el-*-ecoff*) gdb_target=idtl ;; diff --git a/gdb/configure.in b/gdb/configure.in index a70d31f..bc3220a 100644 --- a/gdb/configure.in +++ b/gdb/configure.in @@ -370,6 +370,8 @@ mips*-dec-mach3*) gdb_target=mach3 ;; mips*-dec-*) gdb_target=decstation ;; mips64*el-*-ecoff*) gdb_target=idtl64 ;; mips64*-idt-ecoff*) gdb_target=idt64 ;; +mips64*vr4300*el-*-elf*) gdb_target=vr4300el ;; +mips64*vr4300*-*-elf*) gdb_target=vr4300 ;; mips64*el-*-elf*) gdb_target=idtl64 ;; mips64*-*-elf*) gdb_target=idt64 ;; mips*el-*-ecoff*) gdb_target=idtl ;; diff --git a/gdb/remote-mips.c b/gdb/remote-mips.c index 8761cbf..fde8f23 100644 --- a/gdb/remote-mips.c +++ b/gdb/remote-mips.c @@ -330,7 +330,7 @@ mips_expect (string) { /* Must use SERIAL_READCHAR here cuz mips_readchar would get confused if we - were waiting for ""... */ + were waiting for the TARGET_MONITOR_PROMPT... */ c = SERIAL_READCHAR (mips_desc, 2); @@ -357,31 +357,25 @@ mips_expect (string) /* Read a character from the remote, aborting on error. Returns SERIAL_TIMEOUT on timeout (since that's what SERIAL_READCHAR - returns). FIXME: If we see the string "" from the board, then - we are debugging on the main console port, and we have somehow - dropped out of remote debugging mode. In this case, we - automatically go back in to remote debugging mode. This is a hack, - put in because I can't find any way for a program running on the - remote board to terminate without also ending remote debugging + returns). FIXME: If we see the string TARGET_MONITOR_PROMPT from + the board, then we are debugging on the main console port, and we + have somehow dropped out of remote debugging mode. In this case, + we automatically go back in to remote debugging mode. This is a + hack, put in because I can't find any way for a program running on + the remote board to terminate without also ending remote debugging mode. I assume users won't have any trouble with this; for one thing, the IDT documentation generally assumes that the remote debugging port is not the console port. This is, however, very convenient for DejaGnu when you only have one connected serial port. */ -/* CYGNUS LOCAL jsmith */ -/* The old code assumed a 5 character identification string, making it - a chore to change the string value. However, we need to ensure - that the method of ascertaining the length of the string is - completely portable, without resorting to calling strlen(). */ - static int mips_readchar (timeout) int timeout; { int ch; static int state = 0; - static char nextstate[] = TARGET_MONITOR_PROMPT; /* CYGNUS LOCAL jsmith */ + static char nextstate[] = TARGET_MONITOR_PROMPT; #ifdef MAINTENANCE_CMDS int i; @@ -390,7 +384,7 @@ mips_readchar (timeout) i = watchdog; #endif - if (state == (sizeof(nextstate) / sizeof(char))) /* CYGNUS LOCAL jsmith */ + if (state == (sizeof(nextstate) / sizeof(char))) timeout = 1; ch = SERIAL_READCHAR (mips_desc, timeout); #ifdef MAINTENANCE_CMDS @@ -414,13 +408,13 @@ mips_readchar (timeout) printf_unfiltered ("Timed out in read\n"); } - /* If we have seen and we either time out, or we see a @ - (which was echoed from a packet we sent), reset the board as - described above. The first character in a packet after the SYN - (which is not echoed) is always an @ unless the packet is more - than 64 characters long, which ours never are. */ + /* If we have seen TARGET_MONITOR_PROMPT and we either time out, or + we see a @ (which was echoed from a packet we sent), reset the + board as described above. The first character in a packet after + the SYN (which is not echoed) is always an @ unless the packet is + more than 64 characters long, which ours never are. */ if ((ch == SERIAL_TIMEOUT || ch == '@') - && state == (sizeof(nextstate) / sizeof(char)) /* CYGNUS LOCAL jsmith */ + && state == (sizeof(nextstate) / sizeof(char)) && ! mips_initializing) { if (sr_get_debug () > 0) @@ -1788,14 +1782,14 @@ mips_load (file, from_tty) int from_tty; { int err; + static char prompt[] = TARGET_MONITOR_PROMPT; /* Get the board out of remote debugging mode. */ mips_request ('x', (unsigned int) 0, (unsigned int) 0, &err, mips_receive_wait); - - if (!mips_expect ("\015\012")) + if (!mips_expect ("\015\012") || !mips_expect (prompt)) error ("mips_load: Couldn't get into monitor mode."); mips_load_srec (file); -- cgit v1.1