diff options
Diffstat (limited to 'gdb/remote-mips.c')
-rw-r--r-- | gdb/remote-mips.c | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/gdb/remote-mips.c b/gdb/remote-mips.c index 3265599..9fdf82a 100644 --- a/gdb/remote-mips.c +++ b/gdb/remote-mips.c @@ -1076,22 +1076,21 @@ mips_initialize () the board. */ } break; - case 4: - mips_error ("Failed to initialize."); } - - if (mips_expect (TARGET_MONITOR_PROMPT)) - break; + case 4: + mips_error ("Failed to initialize."); } - SERIAL_WRITE (mips_desc, "db tty0\015", sizeof "db tty0\015" - 1); - mips_expect ("db tty0\015\012"); /* Eat the echo */ - - SERIAL_WRITE (mips_desc, "\015", sizeof "\015" - 1); - - if (mips_receive_packet (buff, 1, 3) < 0) - mips_error ("Failed to initialize (didn't receive packet)."); + if (mips_expect (TARGET_MONITOR_PROMPT)) + break; } + SERIAL_WRITE (mips_desc, "db tty0\015", sizeof "db tty0\015" - 1); + mips_expect ("db tty0\015\012"); /* Eat the echo */ + + SERIAL_WRITE (mips_desc, "\015", sizeof "\015" - 1); + + if (mips_receive_packet (buff, 1, 3) < 0) + mips_error ("Failed to initialize (didn't receive packet)."); if (common_breakpoint ('b', -1, 0, NULL)) /* Clear all breakpoints */ monitor_supports_breakpoints = 0; /* Failed, don't use it anymore */ @@ -2083,8 +2082,6 @@ mips_load (file, from_tty) mips_load_srec (file); - SERIAL_WRITE (mips_desc, "\015db tty0\015", sizeof "\015db tty0\015" - 1); - mips_initialize (); /* Finally, make the PC point at the start address */ |