aboutsummaryrefslogtreecommitdiff
path: root/gdb/remote-mips.c
diff options
context:
space:
mode:
authorMichael Snyder <msnyder@vmware.com>2010-05-16 21:11:14 +0000
committerMichael Snyder <msnyder@vmware.com>2010-05-16 21:11:14 +0000
commit123f5f96b6f084af89436ac1efaf7b77ab66bbe5 (patch)
tree1a1404dc4f92f1e55533e57584b9f35aa43628b0 /gdb/remote-mips.c
parenta744cf537ec1cf2e102bc63b83b820cd4dd48783 (diff)
downloadgdb-123f5f96b6f084af89436ac1efaf7b77ab66bbe5.zip
gdb-123f5f96b6f084af89436ac1efaf7b77ab66bbe5.tar.gz
gdb-123f5f96b6f084af89436ac1efaf7b77ab66bbe5.tar.bz2
2010-05-16 Michael Snyder <msnyder@vmware.com>
* record.c: White space. * regcache.c: White space. * reggroups.c: White space. * remote-fileio.c: White space. * remote-m32r-sdi.c: White space. * remote-mips.c: White space. * remote-sim.c: White space.
Diffstat (limited to 'gdb/remote-mips.c')
-rw-r--r--gdb/remote-mips.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/gdb/remote-mips.c b/gdb/remote-mips.c
index 3da1042..28d2ecb 100644
--- a/gdb/remote-mips.c
+++ b/gdb/remote-mips.c
@@ -648,7 +648,7 @@ mips_readchar (int timeout)
static int state = 0;
int mips_monitor_prompt_len = strlen (mips_monitor_prompt);
- {
+ { /* FIXME this whole block is dead code! */
int i;
i = timeout;
@@ -1348,6 +1348,7 @@ mips_enter_debug (void)
{
char buff[DATA_MAXLEN + 1];
+
if (mips_receive_packet (buff, 1, 3) < 0)
mips_error ("Failed to initialize (didn't receive packet).");
}
@@ -2014,6 +2015,7 @@ mips_fetch_registers (struct target_ops *ops,
/* If PMON doesn't support this register, don't waste serial
bandwidth trying to read it. */
int pmon_reg = mips_map_regno (gdbarch, regno);
+
if (regno != 0 && pmon_reg == 0)
val = 0;
else
@@ -2182,6 +2184,7 @@ mips_xfer_memory (CORE_ADDR memaddr, gdb_byte *myaddr, int len, int write,
for (i = 0; i < count; i++, addr += 4)
{
int word;
+
word = extract_unsigned_integer (&buffer[i * 4], 4, byte_order);
status = mips_store_word (addr, word, NULL);
/* Report each kilobyte (we download 32-bit words at a time) */
@@ -2467,6 +2470,7 @@ mips_check_lsi_error (CORE_ADDR addr, int rerrflg)
if (monitor_warnings)
{
int found = 0;
+
for (err = lsi_warning_table; err->code != 0; err++)
{
if ((err->code & rerrflg) == err->code)
@@ -2657,6 +2661,7 @@ mips_common_breakpoint: Bad response from remote board: %s",
if (set) /* set a breakpoint */
{
char *flags;
+
switch (type)
{
case BREAK_WRITE: /* write */
@@ -3095,6 +3100,7 @@ pmon_make_fastrec (char **outbuf, unsigned char *inbuf, int *inptr,
else
{
unsigned int value = ((inbuf[*inptr + 0] << 16) | (inbuf[*inptr + 1] << 8) | inbuf[*inptr + 2]);
+
/* Simple check for zero data. TODO: A better check would be
to check the last, and then the middle byte for being zero
(if the first byte is not). We could then check for
@@ -3203,6 +3209,7 @@ static void
pmon_check_entry_address (char *entry_address, int final)
{
char hexnumber[9]; /* includes '\0' space */
+
mips_expect_timeout (entry_address, tftp_in_use ? 15 : remote_timeout);
sprintf (hexnumber, "%x", final);
mips_expect (hexnumber);
@@ -3217,6 +3224,7 @@ static int
pmon_check_total (int bintotal)
{
char hexnumber[9]; /* includes '\0' space */
+
mips_expect ("\r\ntotal = 0x");
sprintf (hexnumber, "%x", bintotal);
mips_expect (hexnumber);