diff options
author | Pedro Alves <palves@redhat.com> | 2013-11-14 19:43:27 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2013-11-14 19:51:15 +0000 |
commit | 47591c29add16c520c7bc2c7ace227deeb08f4a5 (patch) | |
tree | 2e29df0efaa19bfe74dfb8028c2552304c4e737f /gdb/breakpoint.h | |
parent | bac7d97b66867e7654a1c27b00e7164e24243da0 (diff) | |
download | gdb-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/breakpoint.h')
-rw-r--r-- | gdb/breakpoint.h | 32 |
1 files changed, 6 insertions, 26 deletions
diff --git a/gdb/breakpoint.h b/gdb/breakpoint.h index 4a25fb7..b2ff02c 100644 --- a/gdb/breakpoint.h +++ b/gdb/breakpoint.h @@ -470,22 +470,6 @@ struct bp_location struct symtab *symtab; }; -/* Return values for bpstat_explains_signal. Note that the order of - the constants is important here; they are compared directly in - bpstat_explains_signal. */ - -enum bpstat_signal_value - { - /* bpstat does not explain this signal. */ - BPSTAT_SIGNAL_NO = 0, - - /* bpstat explains this signal; signal should not be delivered. */ - BPSTAT_SIGNAL_HIDE, - - /* bpstat explains this signal; signal should be delivered. */ - BPSTAT_SIGNAL_PASS - }; - /* This structure is a collection of function pointers that, if available, will be called instead of the performing the default action for this bptype. */ @@ -600,12 +584,9 @@ struct breakpoint_ops void (*decode_linespec) (struct breakpoint *, char **, struct symtabs_and_lines *); - /* Return true if this breakpoint explains a signal, but the signal - should still be delivered to the inferior. This is used to make - 'catch signal' interact properly with 'handle'; see + /* Return true if this breakpoint explains a signal. See bpstat_explains_signal. */ - enum bpstat_signal_value (*explains_signal) (struct breakpoint *, - enum gdb_signal); + int (*explains_signal) (struct breakpoint *, enum gdb_signal); /* Called after evaluating the breakpoint's condition, and only if it evaluated true. */ @@ -1002,11 +983,10 @@ struct bpstat_what bpstat_what (bpstat); /* Find the bpstat associated with a breakpoint. NULL otherwise. */ bpstat bpstat_find_breakpoint (bpstat, struct breakpoint *); -/* Nonzero if a signal that we got in wait() was due to circumstances - explained by the bpstat; and the signal should therefore not be - delivered. */ -extern enum bpstat_signal_value bpstat_explains_signal (bpstat, - enum gdb_signal); +/* Nonzero if a signal that we got in target_wait() was due to + circumstances explained by the bpstat; the signal is therefore not + random. */ +extern int bpstat_explains_signal (bpstat, enum gdb_signal); /* Nonzero is this bpstat causes a stop. */ extern int bpstat_causes_stop (bpstat); |