aboutsummaryrefslogtreecommitdiff
path: root/gdb/remote-e7000.c
diff options
context:
space:
mode:
authorStu Grossman <grossman@cygnus>1996-01-05 00:42:36 +0000
committerStu Grossman <grossman@cygnus>1996-01-05 00:42:36 +0000
commit0fe1522ad05f27e4ef3528f5cf0b63c75b755fe4 (patch)
treec874e9aa1af63828135236fad7fc1e40f2c226ea /gdb/remote-e7000.c
parented1f99e770af88041b29edf6c4caddceb9fb56e9 (diff)
downloadgdb-0fe1522ad05f27e4ef3528f5cf0b63c75b755fe4.zip
gdb-0fe1522ad05f27e4ef3528f5cf0b63c75b755fe4.tar.gz
gdb-0fe1522ad05f27e4ef3528f5cf0b63c75b755fe4.tar.bz2
* breakpoint.c (remove_breakpoint): Change error to warning so
that hardware watchpoint removal problems won't leave breakpoint traps in the target. * configure configure.in: Make --enable-gdbtk be the default. * remote-e7000.c (e7000_insert_breakpoint, e7000_remove_breakpoint): Use e7000 based breakpoints, not memory breakpoints. * (e7000_wait): Adjust PC back by two when we see a breakpoint to compensate for e7000 maladjustment. * sparcl-tdep.c (sparclite_check_watch_resources): Fix logic bug which prevented hardware watchpoints from working.
Diffstat (limited to 'gdb/remote-e7000.c')
-rw-r--r--gdb/remote-e7000.c23
1 files changed, 8 insertions, 15 deletions
diff --git a/gdb/remote-e7000.c b/gdb/remote-e7000.c
index b4aaaed..105ae83 100644
--- a/gdb/remote-e7000.c
+++ b/gdb/remote-e7000.c
@@ -18,7 +18,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* The E7000 is an in-circuit emulator for the Hitachi H8/300-H and
Hitachi-SH processor. It has serial port and a lan port.
@@ -43,7 +43,7 @@
#include <sys/types.h>
#include "serial.h"
#include "remote-utils.h"
-
+#include "symfile.h"
#if 0
#define HARD_BREAKPOINTS
#define BC_BREAKPOINTS 0
@@ -1426,8 +1426,10 @@ e7000_insert_breakpoint (addr, shadow)
puts_e7000debug (buf);
}
#else
+#if 0
e7000_read_inferior_memory (addr, shadow, 2);
e7000_write_inferior_memory (addr, nop, 2);
+#endif
sprintf (buf, "B %x\r", addr);
puts_e7000debug (buf);
@@ -1470,9 +1472,11 @@ e7000_remove_breakpoint (addr, shadow)
puts_e7000debug (buf);
expect_prompt ();
+#if 0
/* Replace the insn under the break */
e7000_write_inferior_memory (addr, shadow, 2);
#endif
+#endif
return 0;
}
@@ -1517,13 +1521,6 @@ e7000_command (args, fromtty)
registers_changed ();
}
-static void
-e7000_load (args, fromtty)
- char *args;
- int fromtty;
-{
- gr_load_image (args, fromtty);
-}
static void
e7000_drain_command (args, fromtty)
@@ -1776,6 +1773,7 @@ e7000_wait (pid, status)
switch (stop_reason)
{
case 1: /* Breakpoint */
+ write_pc (read_pc () - 2); /* PC is always off by 2 for breakpoints */
status->value.sig = TARGET_SIGNAL_TRAP;
break;
case 0: /* Single step */
@@ -1840,20 +1838,15 @@ target e7000 foobar",
e7000_prepare_to_store, /* to_prepare_to_store */
e7000_xfer_inferior_memory, /* to_xfer_memory */
e7000_files_info, /* to_files_info */
-#ifdef HARD_BREAKPOINTS
e7000_insert_breakpoint, /* to_insert_breakpoint */
e7000_remove_breakpoint, /* to_remove_breakpoint */
-#else
- memory_insert_breakpoint, /* to_insert_breakpoint */
- memory_remove_breakpoint, /* to_remove_breakpoint */
-#endif
0, /* to_terminal_init */
0, /* to_terminal_inferior */
0, /* to_terminal_ours_for_output */
0, /* to_terminal_ours */
0, /* to_terminal_info */
e7000_kill, /* to_kill */
- e7000_load, /* to_load */
+ generic_load, /* to_load */
0, /* to_lookup_symbol */
e7000_create_inferior, /* to_create_inferior */
e7000_mourn_inferior, /* to_mourn_inferior */