diff options
author | Michael Snyder <msnyder@vmware.com> | 1996-11-01 00:41:21 +0000 |
---|---|---|
committer | Michael Snyder <msnyder@vmware.com> | 1996-11-01 00:41:21 +0000 |
commit | 8665f3dcfacb2b9fdb699978727a89172123645d (patch) | |
tree | f34dc99fb6824d788d944ee1cf0cce679862d574 /gdb/monitor.c | |
parent | 527dc0c9ed1e03719e115a7e938a42ba59324396 (diff) | |
download | gdb-8665f3dcfacb2b9fdb699978727a89172123645d.zip gdb-8665f3dcfacb2b9fdb699978727a89172123645d.tar.gz gdb-8665f3dcfacb2b9fdb699978727a89172123645d.tar.bz2 |
Thu Oct 31 16:37:17 1996 Michael Snyder <msnyder@cleaver.cygnus.com>
* m32r-tdep.c: Improved frame_chain and fn prologue analysis.
* configure.tgt: Add entry for m32r target.
* monitor.h: Add a flag to tell monitor_store_register to use
(val, regno) instead of (regno, val).
* monitor.c: Make monitor_store_register honor the above flag.
Make monitor_exp ignore DC1/DC3 for m32r.
Increase buf size in monitor_dump_regs.
Diffstat (limited to 'gdb/monitor.c')
-rw-r--r-- | gdb/monitor.c | 31 |
1 files changed, 25 insertions, 6 deletions
diff --git a/gdb/monitor.c b/gdb/monitor.c index 503930f..f343f98 100644 --- a/gdb/monitor.c +++ b/gdb/monitor.c @@ -353,6 +353,7 @@ monitor_expect (string, buf, buflen) char *p = string; int obuflen = buflen; int c; + extern struct target_ops *targ_ops; immediate_quit = 1; while (1) @@ -393,6 +394,11 @@ monitor_expect (string, buf, buflen) return 0; } } + else if ((c == '\021' || c == '\023') && + (strcmp(targ_ops->to_shortname, "m32r") == 0)) + { /* m32r monitor emits random DC1/DC3 chars */ + continue; + } else { p = string; @@ -954,11 +960,11 @@ monitor_fetch_register (regno) static void monitor_dump_regs () { + char buf[1024]; + int resp_len; + if (current_monitor->dump_registers) { - char buf[200]; - int resp_len; - monitor_printf (current_monitor->dump_registers); resp_len = monitor_expect_prompt (buf, sizeof (buf)); parse_register_dump (buf, resp_len); @@ -1004,7 +1010,10 @@ monitor_store_register (regno) /* send the register deposit command */ - monitor_printf (current_monitor->setreg.cmd, name, val); + if (current_monitor->flags & MO_REGISTER_VALUE_FIRST) + monitor_printf (current_monitor->setreg.cmd, val, name); + else + monitor_printf (current_monitor->setreg.cmd, name, val); /* It's possible that there are actually some monitors out there that will prompt you when you set a register. In that case, you may @@ -1080,12 +1089,16 @@ monitor_write_memory (memaddr, myaddr, len) } } +#if 0 + /* Can't actually use long longs if VAL is an int (nice idea, though). */ if ((memaddr & 0x7) == 0 && len >= 8 && current_monitor->setmem.cmdll) { len = 8; cmd = current_monitor->setmem.cmdll; } - else if ((memaddr & 0x3) == 0 && len >= 4 && current_monitor->setmem.cmdl) + else +#endif + if ((memaddr & 0x3) == 0 && len >= 4 && current_monitor->setmem.cmdl) { len = 4; cmd = current_monitor->setmem.cmdl; @@ -1128,12 +1141,18 @@ monitor_read_memory_single (memaddr, myaddr, len) char *cmd; int i; +#if 0 + /* Can't actually use long longs (nice idea, though). In fact, the + call to strtoul below will fail if it tries to convert a value + that's too big to fit in a long. */ if ((memaddr & 0x7) == 0 && len >= 8 && current_monitor->getmem.cmdll) { len = 8; cmd = current_monitor->getmem.cmdll; } - else if ((memaddr & 0x3) == 0 && len >= 4 && current_monitor->getmem.cmdl) + else +#endif + if ((memaddr & 0x3) == 0 && len >= 4 && current_monitor->getmem.cmdl) { len = 4; cmd = current_monitor->getmem.cmdl; |