This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[patch/rfc] Eliminate sim-break
- From: Andrew Cagney <ac131313 at redhat dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: Tue, 18 Feb 2003 17:43:58 -0500
- Subject: [patch/rfc] Eliminate sim-break
Hello,
(tug, tug, crash)
It turns out that all the attached is no longer used. I'll commit it in
a few days.
Andrew
Index: gdb/ChangeLog
2003-02-18 Andrew Cagney <cagney@redhat.com>
* remote-sim.c (gdbsim_insert_breakpoint)
(gdbsim_remove_breakpoint): Delete #ifdef SIM_HAS_BREAKPOINTS
code.
Index: include/gdb/ChangeLog
2003-02-18 Andrew Cagney <cagney@redhat.com>
* remote-sim.h (SIM_RC): Delete unused SIM_RC_UNKNOWN_BREAKPOINT,
SIM_RC_INSUFFICIENT_RESOURCES and SIM_RC_DUPLICATE_BREAKPOINT.
(sim_set_breakpoint, sim_clear_breakpoint): Delete declarations.
(sim_clear_all_breakpoints, sim_enable_breakpoint): Ditto.
(sim_enable_all_breakpoints, sim_disable_breakpoint): Ditto.
(sim_disable_all_breakpoints): Ditto.
Index: sim/common/ChangeLog
2003-02-18 Andrew Cagney <cagney@redhat.com>
* Make-common.in (SIM_NEW_COMMON_OBJS): Remove sim-break.o
(sim-break_h): Delete macro.
(sim-break.o): Delete rule.
* sim-break.c: Delete file.
* sim-break.h: Delete file.
* sim-base.h [SIM_HAVE_BREAKPOINTS]: Don't include "sim-break.h".
(STATE_BREAKPOINTS): Delete macro.
(sim_state_base): Delete field breakpoints.
* sim-module.c (modules) [SIM_HAVE_BREAKPOINTS]: Don't add
sim_break_install to array.
Index: gdb/remote-sim.c
===================================================================
RCS file: /cvs/src/src/gdb/remote-sim.c,v
retrieving revision 1.27
diff -u -r1.27 remote-sim.c
--- gdb/remote-sim.c 2 Feb 2003 05:46:14 -0000 1.27
+++ gdb/remote-sim.c 18 Feb 2003 22:22:30 -0000
@@ -814,46 +814,13 @@
static int
gdbsim_insert_breakpoint (CORE_ADDR addr, char *contents_cache)
{
-#ifdef SIM_HAS_BREAKPOINTS
- SIM_RC retcode;
-
- retcode = sim_set_breakpoint (gdbsim_desc, addr);
-
- switch (retcode)
- {
- case SIM_RC_OK:
- return 0;
- case SIM_RC_INSUFFICIENT_RESOURCES:
- return ENOMEM;
- default:
- return EIO;
- }
-#else
return memory_insert_breakpoint (addr, contents_cache);
-#endif
}
static int
gdbsim_remove_breakpoint (CORE_ADDR addr, char *contents_cache)
{
-#ifdef SIM_HAS_BREAKPOINTS
- SIM_RC retcode;
-
- retcode = sim_clear_breakpoint (gdbsim_desc, addr);
-
- switch (retcode)
- {
- case SIM_RC_OK:
- case SIM_RC_UNKNOWN_BREAKPOINT:
- return 0;
- case SIM_RC_INSUFFICIENT_RESOURCES:
- return ENOMEM;
- default:
- return EIO;
- }
-#else
return memory_remove_breakpoint (addr, contents_cache);
-#endif
}
/* Pass the command argument through to the simulator verbatim. The
Index: include/gdb/remote-sim.h
===================================================================
RCS file: /cvs/src/src/include/gdb/remote-sim.h,v
retrieving revision 1.2
diff -u -r1.2 remote-sim.h
--- include/gdb/remote-sim.h 17 Jul 2002 21:20:09 -0000 1.2
+++ include/gdb/remote-sim.h 18 Feb 2003 22:22:31 -0000
@@ -58,10 +58,7 @@
typedef enum {
SIM_RC_FAIL = 0,
- SIM_RC_OK = 1,
- SIM_RC_UNKNOWN_BREAKPOINT = 2,
- SIM_RC_INSUFFICIENT_RESOURCES = 3,
- SIM_RC_DUPLICATE_BREAKPOINT = 4
+ SIM_RC_OK = 1
} SIM_RC;
@@ -277,19 +274,6 @@
or empty CMD. */
void sim_do_command PARAMS ((SIM_DESC sd, char *cmd));
-
-/* Call these functions to set and clear breakpoints at ADDR. */
-
-SIM_RC sim_set_breakpoint PARAMS ((SIM_DESC sd, SIM_ADDR addr));
-SIM_RC sim_clear_breakpoint PARAMS ((SIM_DESC sd, SIM_ADDR addr));
-SIM_RC sim_clear_all_breakpoints PARAMS ((SIM_DESC sd));
-
-/* These functions are used to enable and disable breakpoints. */
-
-SIM_RC sim_enable_breakpoint PARAMS ((SIM_DESC sd, SIM_ADDR addr));
-SIM_RC sim_disable_breakpoint PARAMS ((SIM_DESC sd, SIM_ADDR addr));
-SIM_RC sim_enable_all_breakpoints PARAMS ((SIM_DESC sd));
-SIM_RC sim_disable_all_breakpoints PARAMS ((SIM_DESC sd));
#ifdef __cplusplus
}
Index: sim/common/Make-common.in
===================================================================
RCS file: /cvs/src/src/sim/common/Make-common.in,v
retrieving revision 1.10
diff -u -r1.10 Make-common.in
--- sim/common/Make-common.in 6 Nov 2002 18:40:25 -0000 1.10
+++ sim/common/Make-common.in 18 Feb 2003 22:22:32 -0000
@@ -161,7 +161,6 @@
SIM_NEW_COMMON_OBJS = \
sim-arange.o \
sim-bits.o \
- sim-break.o \
sim-config.o \
sim-core.o \
sim-endian.o \
@@ -335,7 +334,6 @@
sim-fpu_h = $(srccom)/sim-fpu.h
sim-io_h = $(srccom)/sim-io.h
sim-options_h = $(srccom)/sim-options.h
-sim-break_h = $(srccom)/sim-break.h
sim-signal_h = $(srccom)/sim-signal.h
hw-alloc_h = $(srccom)/hw-alloc.h
@@ -476,10 +474,6 @@
sim-load.o: $(srccom)/sim-load.c $(callback_h)
$(CC) -c $(srccom)/sim-load.c $(ALL_CFLAGS)
-
-sim-break.o: $(srccom)/sim-break.c $(sim_main_headers) \
- $(sim_break_h)
- $(CC) -c $(srccom)/sim-break.c $(ALL_CFLAGS)
# FIXME This is one very simple-minded way of generating the file hw-config.h
Index: sim/common/sim-base.h
===================================================================
RCS file: /cvs/src/src/sim/common/sim-base.h,v
retrieving revision 1.1.1.3
diff -u -r1.1.1.3 sim-base.h
--- sim/common/sim-base.h 22 Sep 1999 03:28:06 -0000 1.1.1.3
+++ sim/common/sim-base.h 18 Feb 2003 22:22:32 -0000
@@ -1,5 +1,7 @@
/* Simulator pseudo baseclass.
- Copyright (C) 1997-1998 Free Software Foundation, Inc.
+
+ Copyright 1997, 1998, 2003 Free Software Foundation, Inc.
+
Contributed by Cygnus Support.
This file is part of GDB, the GNU debugger.
@@ -90,9 +92,6 @@
#include "sim-engine.h"
#include "sim-watch.h"
#include "sim-memopt.h"
-#ifdef SIM_HAVE_BREAKPOINTS
-#include "sim-break.h"
-#endif
#include "sim-cpu.h"
/* Global pointer to current state while sim_resume is running.
@@ -226,10 +225,6 @@
/* generic watchpoint support */
sim_watchpoints watchpoints;
#define STATE_WATCHPOINTS(sd) (&(sd)->base.watchpoints)
-
- /* Pointer to list of breakpoints */
- struct sim_breakpoint *breakpoints;
-#define STATE_BREAKPOINTS(sd) ((sd)->base.breakpoints)
#if WITH_HW
struct sim_hw *hw;
Index: sim/common/sim-module.c
===================================================================
RCS file: /cvs/src/src/sim/common/sim-module.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 sim-module.c
--- sim/common/sim-module.c 16 Apr 1999 01:34:58 -0000 1.1.1.1
+++ sim/common/sim-module.c 18 Feb 2003 22:22:32 -0000
@@ -1,5 +1,7 @@
/* Module support.
- Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
+
+ Copyright 1996, 1997, 1998, 2003 Free Software Foundation, Inc.
+
Contributed by Cygnus Support.
This file is part of GDB, the GNU debugger.
@@ -55,9 +57,6 @@
#endif
#if WITH_SCACHE
scache_install,
-#endif
-#ifdef SIM_HAVE_BREAKPOINTS
- sim_break_install,
#endif
#if WITH_HW
sim_hw_install,