aboutsummaryrefslogtreecommitdiff
path: root/gdb/infrun.c
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2013-11-14 19:43:27 +0000
committerPedro Alves <palves@redhat.com>2013-11-14 19:51:15 +0000
commit47591c29add16c520c7bc2c7ace227deeb08f4a5 (patch)
tree2e29df0efaa19bfe74dfb8028c2552304c4e737f /gdb/infrun.c
parentbac7d97b66867e7654a1c27b00e7164e24243da0 (diff)
downloadgdb-47591c29add16c520c7bc2c7ace227deeb08f4a5.zip
gdb-47591c29add16c520c7bc2c7ace227deeb08f4a5.tar.gz
gdb-47591c29add16c520c7bc2c7ace227deeb08f4a5.tar.bz2
Eliminate enum bpstat_signal_value, simplify random signal checks further.
After the previous patch, there's actually no breakpoint type that returns BPSTAT_SIGNAL_HIDE, so we can go back to having bpstat_explains_signal return a boolean. The signal hiding actually disappears. gdb/ 2013-11-14 Pedro Alves <palves@redhat.com> * break-catch-sig.c (signal_catchpoint_explains_signal): Adjust to return a boolean. * breakpoint.c (bpstat_explains_signal): Adjust to return a boolean. (explains_signal_watchpoint, base_breakpoint_explains_signal): Adjust to return a boolean. * breakpoint.h (enum bpstat_signal_value): Delete. (struct breakpoint_ops) <explains_signal>: New returns a boolean. (bpstat_explains_signal): Likewise. * infrun.c (handle_inferior_event) <random signal checks>: bpstat_explains_signal now returns a boolean - adjust. No longer consider hiding signals.
Diffstat (limited to 'gdb/infrun.c')
-rw-r--r--gdb/infrun.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/gdb/infrun.c b/gdb/infrun.c
index 8eb2ddd..4d26e37 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -3154,7 +3154,6 @@ handle_inferior_event (struct execution_control_state *ecs)
int stepped_after_stopped_by_watchpoint = 0;
enum stop_kind stop_soon;
int random_signal;
- enum bpstat_signal_value sval;
if (ecs->ws.kind == TARGET_WAITKIND_IGNORE)
{
@@ -4226,9 +4225,8 @@ Cannot fill $_exitsignal with the correct signal number.\n"));
if (debug_infrun
&& ecs->event_thread->suspend.stop_signal == GDB_SIGNAL_TRAP
- && (bpstat_explains_signal (ecs->event_thread->control.stop_bpstat,
+ && !bpstat_explains_signal (ecs->event_thread->control.stop_bpstat,
GDB_SIGNAL_TRAP)
- == BPSTAT_SIGNAL_NO)
&& stopped_by_watchpoint)
fprintf_unfiltered (gdb_stdlog,
"infrun: no user watchpoint explains "
@@ -4255,9 +4253,9 @@ Cannot fill $_exitsignal with the correct signal number.\n"));
SPARC. */
/* See if the breakpoints module can explain the signal. */
- sval = bpstat_explains_signal (ecs->event_thread->control.stop_bpstat,
- ecs->event_thread->suspend.stop_signal);
- random_signal = (sval == BPSTAT_SIGNAL_NO);
+ random_signal
+ = !bpstat_explains_signal (ecs->event_thread->control.stop_bpstat,
+ ecs->event_thread->suspend.stop_signal);
/* If not, perhaps stepping/nexting can. */
if (random_signal)
@@ -4268,9 +4266,6 @@ Cannot fill $_exitsignal with the correct signal number.\n"));
if (random_signal)
random_signal = !stopped_by_watchpoint;
- if (sval == BPSTAT_SIGNAL_HIDE)
- ecs->event_thread->suspend.stop_signal = GDB_SIGNAL_0;
-
/* For the program's own signals, act according to
the signal handling tables. */