summaryrefslogtreecommitdiff
path: root/gdb/breakpoint.c
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2011-05-26 14:59:18 +0000
committerPedro Alves <palves@redhat.com>2011-05-26 14:59:18 +0000
commit2c03e5bed3ac8158eaae4621f4b4550e4ab6d4ef (patch)
tree9ce0d9eff28c57a3e2883702ebafef3d51a48688 /gdb/breakpoint.c
parent51be5b68a5d97470c5f6e7ef1d43603a100c18f6 (diff)
downloadbinutils-gdb-2c03e5bed3ac8158eaae4621f4b4550e4ab6d4ef.tar.gz
2011-05-26 Pedro Alves <pedro@codesourcery.com>
gdb/ * breakpoint.h (enum bptype) <bp_hp_step_resume>: New. (enum bpstat_what_main_action): Move BPSTAT_WHAT_STEP_RESUME before BPSTAT_WHAT_STOP_SILENT. Add BPSTAT_WHAT_HP_STEP_RESUME at the end. * breakpoint.c (update_breakpoints_after_exec): Also delete hp step-resume breakpoints. (print_it_typical): Handle bp_hp_step_resume. (bpstat_what): Ditto. (bptype_string): Ditto. (print_one_breakpoint_location): Ditto. (allocate_bp_location): Ditto. (mention): Ditto. (breakpoint_re_set_one): Ditto. * infrun.c (handle_inferior_event): Adjust. Split BPSTAT_WHAT_STEP_RESUME handling in BPSTAT_WHAT_STEP_RESUME and BPSTAT_WHAT_HP_STEP_RESUME. (insert_step_resume_breakpoint_at_sal): Rename to ... (insert_step_resume_breakpoint_at_sal_1): ... this. Add bptype parameter. Handle it. (insert_step_resume_breakpoint_at_sal): Reimplement on top of insert_step_resume_breakpoint_at_sal_1. (insert_step_resume_breakpoint_at_frame): Rename to ... (insert_hp_step_resume_breakpoint_at_frame): ... this. Adjust to set a high-priority step-resume breakpoint. (insert_step_resume_breakpoint_at_frame): Adjust comment. (insert_step_resume_breakpoint_at_caller): Ditto. gdb/testsuite/ * gdb.reverse/next-reverse-bkpt-over-sr.exp: New test.
Diffstat (limited to 'gdb/breakpoint.c')
-rw-r--r--gdb/breakpoint.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index 5995c649ad0..fc30d265b21 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -2415,7 +2415,7 @@ update_breakpoints_after_exec (void)
}
/* Step-resume breakpoints are meaningless after an exec(). */
- if (b->type == bp_step_resume)
+ if (b->type == bp_step_resume || b->type == bp_hp_step_resume)
{
delete_breakpoint (b);
continue;
@@ -3503,6 +3503,7 @@ print_it_typical (bpstat bs)
case bp_exception:
case bp_exception_resume:
case bp_step_resume:
+ case bp_hp_step_resume:
case bp_watchpoint_scope:
case bp_call_dummy:
case bp_std_terminate:
@@ -4489,6 +4490,15 @@ bpstat_what (bpstat bs_head)
this_action = BPSTAT_WHAT_SINGLE;
}
break;
+ case bp_hp_step_resume:
+ if (bs->stop)
+ this_action = BPSTAT_WHAT_HP_STEP_RESUME;
+ else
+ {
+ /* It is for the wrong frame. */
+ this_action = BPSTAT_WHAT_SINGLE;
+ }
+ break;
case bp_watchpoint_scope:
case bp_thread_event:
case bp_overlay_event:
@@ -4757,6 +4767,7 @@ bptype_string (enum bptype type)
{bp_exception, "exception"},
{bp_exception_resume, "exception resume"},
{bp_step_resume, "step resume"},
+ {bp_hp_step_resume, "high-priority step resume"},
{bp_watchpoint_scope, "watchpoint scope"},
{bp_call_dummy, "call dummy"},
{bp_std_terminate, "std::terminate"},
@@ -4892,6 +4903,7 @@ print_one_breakpoint_location (struct breakpoint *b,
case bp_exception:
case bp_exception_resume:
case bp_step_resume:
+ case bp_hp_step_resume:
case bp_watchpoint_scope:
case bp_call_dummy:
case bp_std_terminate:
@@ -5701,6 +5713,7 @@ allocate_bp_location (struct breakpoint *bpt)
case bp_exception:
case bp_exception_resume:
case bp_step_resume:
+ case bp_hp_step_resume:
case bp_watchpoint_scope:
case bp_call_dummy:
case bp_std_terminate:
@@ -7227,6 +7240,7 @@ mention (struct breakpoint *b)
case bp_exception:
case bp_exception_resume:
case bp_step_resume:
+ case bp_hp_step_resume:
case bp_call_dummy:
case bp_std_terminate:
case bp_watchpoint_scope:
@@ -11459,6 +11473,7 @@ breakpoint_re_set_one (void *bint)
case bp_call_dummy:
case bp_std_terminate:
case bp_step_resume:
+ case bp_hp_step_resume:
case bp_longjmp:
case bp_longjmp_resume:
case bp_exception: