diff options
author | Stu Grossman <grossman@cygnus> | 1996-01-05 00:42:36 +0000 |
---|---|---|
committer | Stu Grossman <grossman@cygnus> | 1996-01-05 00:42:36 +0000 |
commit | 0fe1522ad05f27e4ef3528f5cf0b63c75b755fe4 (patch) | |
tree | c874e9aa1af63828135236fad7fc1e40f2c226ea /gdb | |
parent | ed1f99e770af88041b29edf6c4caddceb9fb56e9 (diff) | |
download | gdb-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')
-rw-r--r-- | gdb/ChangeLog | 14 | ||||
-rw-r--r-- | gdb/breakpoint.c | 6 | ||||
-rwxr-xr-x | gdb/configure | 44 | ||||
-rw-r--r-- | gdb/configure.in | 27 | ||||
-rw-r--r-- | gdb/remote-e7000.c | 23 | ||||
-rw-r--r-- | gdb/sparcl-tdep.c | 24 |
6 files changed, 94 insertions, 44 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index dc2ab8f..d9a494d 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,17 @@ +Thu Jan 4 16:04:54 1996 Stu Grossman (grossman@cygnus.com) + + * 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. + Thu Jan 4 10:44:17 1996 Fred Fish <fnf@cirdan.cygnus.com> * infptrace.c (udot_info): New function. diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index aebc62a..f2babaa 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -652,8 +652,8 @@ remove_breakpoint (b) } /* Failure to remove any of the hardware watchpoints comes here. */ if (b->inserted) - error ("Hardware watchpoint %d: Could not remove watchpoint\n", - b->number); + warning ("Hardware watchpoint %d: Could not remove watchpoint\n", + b->number); /* Free the saved value chain. We will construct a new one the next time the watchpoint is inserted. */ @@ -3427,7 +3427,7 @@ breakpoint_re_set () #endif #if 0 - /* Took this out (temporaliy at least), since it produces an extra + /* Took this out (temporarily at least), since it produces an extra blank line at startup. This messes up the gdbtests. -PB */ /* Blank line to finish off all those mention() messages we just printed. */ printf_filtered ("\n"); diff --git a/gdb/configure b/gdb/configure index 7e86a4d..3e72ddb 100755 --- a/gdb/configure +++ b/gdb/configure @@ -1427,14 +1427,34 @@ ENABLE_GDBTK= if test "${enable_gdbtk+set}" = set; then enableval="$enable_gdbtk" case "${enableval}" in -yes) enable_gdbtk=yes ;; -no) enable_gdbtk=no ;; -*) { echo "configure: error: bad value ${enableval} given for gdbtk option" 1>&2; exit 1; } ;; + yes) + case "$host" in + *go32*) + echo "configure: warning: GDB does not support GDBtk on host ${host}. GDBtk will be disabled." 1>&2 + enable_gdbtk=no ;; + *) + enable_gdbtk=yes ;; + esac ;; + no) + enable_gdbtk=no ;; + *) + { echo "configure: error: bad value ${enableval} given for gdbtk option" 1>&2; exit 1; } ;; esac +else + +# Default is on for everything but go32 +case "$host" in + *go32*) + ;; + *) + enable_gdbtk=yes ;; + esac + fi if test "${enable_gdbtk}" = "yes"; then + # If we find X, set shell vars x_includes and x_libraries to the # paths, otherwise set no_x=yes. # Uses ac_ vars as temps to allow command line to override cache and checks. @@ -1496,7 +1516,7 @@ test -z "$x_direct_test_library" && x_direct_test_library=Xt test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h cat > conftest.$ac_ext <<EOF -#line 1500 "configure" +#line 1520 "configure" #include "confdefs.h" #include <$x_direct_test_include> EOF @@ -1559,7 +1579,7 @@ rm -f conftest* ac_save_LIBS="$LIBS" LIBS="-l$x_direct_test_library $LIBS" cat > conftest.$ac_ext <<EOF -#line 1563 "configure" +#line 1583 "configure" #include "confdefs.h" int main() { return 0; } @@ -1678,7 +1698,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lICE $LIBS" cat > conftest.$ac_ext <<EOF -#line 1682 "configure" +#line 1702 "configure" #include "confdefs.h" int main() { return 0; } @@ -1722,7 +1742,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldnet $LIBS" cat > conftest.$ac_ext <<EOF -#line 1726 "configure" +#line 1746 "configure" #include "confdefs.h" int main() { return 0; } @@ -1757,7 +1777,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldnet_stub $LIBS" cat > conftest.$ac_ext <<EOF -#line 1761 "configure" +#line 1781 "configure" #include "confdefs.h" int main() { return 0; } @@ -1797,7 +1817,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <<EOF -#line 1801 "configure" +#line 1821 "configure" #include "confdefs.h" int main() { return 0; } @@ -1836,7 +1856,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsocket $LIBS" cat > conftest.$ac_ext <<EOF -#line 1840 "configure" +#line 1860 "configure" #include "confdefs.h" int main() { return 0; } @@ -1893,7 +1913,7 @@ if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1897 "configure" +#line 1917 "configure" #include "confdefs.h" #include <tk.h> EOF @@ -1995,7 +2015,7 @@ if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1999 "configure" +#line 2019 "configure" #include "confdefs.h" #include <tclInt.h> EOF diff --git a/gdb/configure.in b/gdb/configure.in index bcc88f5..4e4e969 100644 --- a/gdb/configure.in +++ b/gdb/configure.in @@ -67,12 +67,31 @@ ENABLE_GDBTK= AC_ARG_ENABLE(gdbtk, [ --enable-gdbtk ], [case "${enableval}" in -yes) enable_gdbtk=yes ;; -no) enable_gdbtk=no ;; -*) AC_MSG_ERROR(bad value ${enableval} given for gdbtk option) ;; -esac]) + yes) + case "$host" in + *go32*) + AC_MSG_WARN([GDB does not support GDBtk on host ${host}. GDBtk will be disabled.]) + enable_gdbtk=no ;; + *) + enable_gdbtk=yes ;; + esac ;; + no) + enable_gdbtk=no ;; + *) + AC_MSG_ERROR(bad value ${enableval} given for gdbtk option) ;; +esac], +[ +# Default is on for everything but go32 +case "$host" in + *go32*) + ;; + *) + enable_gdbtk=yes ;; + esac +]) if test "${enable_gdbtk}" = "yes"; then + AC_PATH_X AC_PATH_XTRA 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 */ diff --git a/gdb/sparcl-tdep.c b/gdb/sparcl-tdep.c index b97496d..37465ce 100644 --- a/gdb/sparcl-tdep.c +++ b/gdb/sparcl-tdep.c @@ -239,17 +239,21 @@ sparclite_check_watch_resources (type, cnt, ot) int ot; { if (type == bp_hardware_breakpoint) - if (TARGET_HW_BREAK_LIMIT == 0) - return 0; - else if (cnt <= TARGET_HW_BREAK_LIMIT) - return 1; + { + if (TARGET_HW_BREAK_LIMIT == 0) + return 0; + else if (cnt <= TARGET_HW_BREAK_LIMIT) + return 1; + } else - if (TARGET_HW_WATCH_LIMIT == 0) - return 0; - else if (ot) - return -1; - else if (cnt <= TARGET_HW_WATCH_LIMIT) - return 1; + { + if (TARGET_HW_WATCH_LIMIT == 0) + return 0; + else if (ot) + return -1; + else if (cnt <= TARGET_HW_WATCH_LIMIT) + return 1; + } return -1; } |