diff options
author | Yao Qi <yao@codesourcery.com> | 2011-11-18 01:21:35 +0000 |
---|---|---|
committer | Yao Qi <yao@codesourcery.com> | 2011-11-18 01:21:35 +0000 |
commit | bfccc43c1218b6d89bb021381276ac742e7a9a9e (patch) | |
tree | 4cb5a36039810f966bf54f316a3123ade3e3d952 /gdb/breakpoint.c | |
parent | 3ea46bff735f66cca658e990155816c57cc194d3 (diff) | |
download | gdb-bfccc43c1218b6d89bb021381276ac742e7a9a9e.zip gdb-bfccc43c1218b6d89bb021381276ac742e7a9a9e.tar.gz gdb-bfccc43c1218b6d89bb021381276ac742e7a9a9e.tar.bz2 |
gdb/
* breakpoint.c (create_breakpoint): Produce query message according to
breakpoint's type.
Allocate tracepoint per correct type.
Don't check SALs for pending fast tracepoints.
* tracepoint.c (process_tracepoint_on_disconnect): New.
(disconnect_tracing): Call process_tracepoint_on_disconnect.
gdb/doc/
* gdb.texinfo (Create and Delete Tracepoints): Mention pending
tracepoint.
gdb/testsuite/
* gdb.trace/pending.exp: New.
* gdb.trace/pending.c: New.
* gdb.trace/pendshr1.c: New.
* gdb.trace/pendshr2.c: New.
* gdb.trace/change-loc.exp (tracepoint_change_loc_1): Check one
tracepoint location becomes pending.
(tracepoint_change_loc_2): New.
Diffstat (limited to 'gdb/breakpoint.c')
-rw-r--r-- | gdb/breakpoint.c | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index 2554337..dc891c0 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -7836,8 +7836,8 @@ create_breakpoint (struct gdbarch *gdbarch, /* If pending breakpoint support is auto query and the user selects no, then simply return the error code. */ if (pending_break_support == AUTO_BOOLEAN_AUTO - && !nquery (_("Make breakpoint pending on " - "future shared library load? "))) + && !nquery (_("Make %s pending on future shared library load? "), + bptype_string (type_wanted))) return 0; /* At this point, either the user was queried about setting @@ -7894,7 +7894,7 @@ create_breakpoint (struct gdbarch *gdbarch, breakpoint_sals_to_pc (&sals); /* Fast tracepoints may have additional restrictions on location. */ - if (type_wanted == bp_fast_tracepoint) + if (!pending && type_wanted == bp_fast_tracepoint) check_fast_tracepoint_sals (gdbarch, &sals); /* Verify that condition can be parsed, before setting any @@ -7981,9 +7981,18 @@ create_breakpoint (struct gdbarch *gdbarch, make_cleanup (xfree, copy_arg); - b = set_raw_breakpoint_without_location (gdbarch, type_wanted, ops); - set_breakpoint_number (internal, b); - b->thread = -1; + if (is_tracepoint_type (type_wanted)) + { + struct tracepoint *t; + + t = XCNEW (struct tracepoint); + b = &t->base; + } + else + b = XNEW (struct breakpoint); + + init_raw_breakpoint_without_location (b, gdbarch, type_wanted, ops); + b->addr_string = canonical.canonical[0]; b->cond_string = NULL; b->ignore_count = ignore_count; @@ -7991,18 +8000,13 @@ create_breakpoint (struct gdbarch *gdbarch, b->condition_not_parsed = 1; b->enable_state = enabled ? bp_enabled : bp_disabled; b->pspace = current_program_space; - b->py_bp_object = NULL; if (enabled && b->pspace->executing_startup && (b->type == bp_breakpoint || b->type == bp_hardware_breakpoint)) b->enable_state = bp_startup_disabled; - if (!internal) - /* Do not mention breakpoints with a negative number, - but do notify observers. */ - mention (b); - observer_notify_breakpoint_created (b); + install_breakpoint (internal, b, 0); } if (sals.nelts > 1) |