diff options
author | Tom Tromey <tromey@redhat.com> | 2010-03-25 20:48:53 +0000 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2010-03-25 20:48:53 +0000 |
commit | aa7d318d60c595f97230f45575c882c73f7bdcf7 (patch) | |
tree | c161b0a218a0050a1da51a3380ebc8d896b48dc2 /gdb/breakpoint.h | |
parent | 82ccf5a5777fc9fda05b4d107a476a69b66002dc (diff) | |
download | gdb-aa7d318d60c595f97230f45575c882c73f7bdcf7.zip gdb-aa7d318d60c595f97230f45575c882c73f7bdcf7.tar.gz gdb-aa7d318d60c595f97230f45575c882c73f7bdcf7.tar.bz2 |
PR gdb/11327, PR gdb/11328, PR breakpoints/11368:
* infrun.c (handle_inferior_event): Change initialization of
stop_stack_dummy.
(handle_inferior_event): Change assignment to stop_stack_dummy.
(normal_stop): Update use of stop_stack_dummy.
(struct inferior_status) <stop_stack_dummy>: Change type.
* inferior.h (stop_stack_dummy): Update.
* infcmd.c (stop_stack_dummy): Change type.
* infcall.c (cleanup_delete_std_terminate_breakpoint): New
function.
(call_function_by_hand): Call set_std_terminate_breakpoint.
Rewrite std::terminate handling.
* breakpoint.h (enum bptype) <bp_std_terminate,
bp_std_terminate_master>: New.
(enum stop_stack_kind): New.
(struct bpstat_what) <call_dummy>: Change type.
(set_std_terminate_breakpoint, delete_std_terminate_breakpoint):
Declare.
* breakpoint.c (create_std_terminate_master_breakpoint): New
function.
(update_breakpoints_after_exec): Handle bp_std_terminate_master.
Call create_std_terminate_master_breakpoint.
(print_it_typical): Handle new breakpoint kinds.
(bpstat_stop_status): Handle bp_std_terminate_master.
(bpstat_what): Correctly set call_dummy field. Handle
bp_std_terminate_master and bp_std_terminate.
(print_one_breakpoint_location): Update.
(allocate_bp_location): Update.
(set_std_terminate_breakpoint): New function.
(delete_std_terminate_breakpoint): Likewise.
(create_thread_event_breakpoint): Update.
(delete_command): Update.
(breakpoint_re_set_one): Update.
(breakpoint_re_set): Call create_std_terminate_master_breakpoint.
Diffstat (limited to 'gdb/breakpoint.h')
-rw-r--r-- | gdb/breakpoint.h | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/gdb/breakpoint.h b/gdb/breakpoint.h index 197bbc4..98a7157 100644 --- a/gdb/breakpoint.h +++ b/gdb/breakpoint.h @@ -83,6 +83,10 @@ enum bptype of scope (with hardware support for watchpoints)). */ bp_call_dummy, + /* A breakpoint set on std::terminate, that is used to catch + otherwise uncaught exceptions thrown during an inferior call. */ + bp_std_terminate, + /* Some dynamic linkers (HP, maybe Solaris) can arrange for special code in the inferior to run when significant events occur in the dynamic linker (for example a library is loaded or unloaded). @@ -118,6 +122,9 @@ enum bptype bp_longjmp_master, + /* Master copies of std::terminate breakpoints. */ + bp_std_terminate_master, + bp_catchpoint, bp_tracepoint, @@ -609,6 +616,20 @@ enum bpstat_what_main_action BPSTAT_WHAT_LAST }; +/* An enum indicating the kind of "stack dummy" stop. This is a bit + of a misnomer because only one kind of truly a stack dummy. */ +enum stop_stack_kind + { + /* We didn't stop at a stack dummy breakpoint. */ + STOP_NONE = 0, + + /* Stopped at a stack dummy. */ + STOP_STACK_DUMMY, + + /* Stopped at std::terminate. */ + STOP_STD_TERMINATE + }; + struct bpstat_what { enum bpstat_what_main_action main_action; @@ -617,7 +638,7 @@ struct bpstat_what of BPSTAT_WHAT_STOP_SILENT or BPSTAT_WHAT_STOP_NOISY (the concept of continuing from a call dummy without popping the frame is not a useful one). */ - int call_dummy; + enum stop_stack_kind call_dummy; }; /* The possible return values for print_bpstat, print_it_normal, @@ -865,6 +886,9 @@ extern void delete_longjmp_breakpoint (int thread); extern void enable_overlay_breakpoints (void); extern void disable_overlay_breakpoints (void); +extern void set_std_terminate_breakpoint (void); +extern void delete_std_terminate_breakpoint (void); + /* These functions respectively disable or reenable all currently enabled watchpoints. When disabled, the watchpoints are marked call_disabled. When reenabled, they are marked enabled. |