mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2025-03-07 13:39:43 +08:00
Currently, with:
(gdb) catch catch
Catchpoint 1 (catch)
(gdb) catch throw
Catchpoint 2 (throw)
(gdb) catch rethrow
Catchpoint 3 (rethrow)
You get:
(gdb) info breakpoints
Num Type Disp Enb Address What
1 breakpoint keep y 0x0000000000b122af exception catch
2 breakpoint keep y 0x0000000000b1288d exception throw
3 breakpoint keep y 0x0000000000b12931 exception rethrow
I think it doesn't make much sense usability-wise, to show a
catchpoint as a breakpoint. The fact that GDB sets a breakpoint at
some magic address in the C++ run time is an implementation detail,
IMO. And as seen in the previous patch, such a catchpoint can end up
with more than one location/address even, so showing a single address
isn't entirely accurate.
This commit hides the addresses from view, and makes GDB show
"catchpoint" for type as well:
(gdb) info breakpoints
Num Type Disp Enb Address What
1 catchpoint keep y exception catch
2 catchpoint keep y exception throw
3 catchpoint keep y exception rethrow
This comment in the code seems telling:
/* We need to reset 'type' in order for code in breakpoint.c to do
the right thing. */
cp->type = bp_breakpoint;
It kind of suggests that the reason catchpoints end up shown as
breakpoints was that it was easier to implement them that way, rather
than a desired property.
This commit fixes things up to make it possible to have bp_catch
breakpoints have software/hardware breakpoint locations, thus
eliminating the need for that hack:
- redo breakpoint_address_is_meaningful in terms of the location's
type rather than breakpoint type.
- teach bpstat_what about stepping over the catchpoint locations.
- install a allocate_location method for "catch catch/throw/rethrow",
one that forces the location type.
Note that this also reverts the gdb hunk from:
commit
|
||
---|---|---|
.. | ||
amd64-py-framefilter-invalidarg.S | ||
lib-types.cc | ||
lib-types.exp | ||
py-arch.c | ||
py-arch.exp | ||
py-as-string.c | ||
py-as-string.exp | ||
py-bad-printers.c | ||
py-bad-printers.exp | ||
py-bad-printers.py | ||
py-block.c | ||
py-block.exp | ||
py-breakpoint-create-fail.c | ||
py-breakpoint-create-fail.exp | ||
py-breakpoint-create-fail.py | ||
py-breakpoint.c | ||
py-breakpoint.exp | ||
py-caller-is.c | ||
py-caller-is.exp | ||
py-cmd.c | ||
py-cmd.exp | ||
py-completion.exp | ||
py-completion.py | ||
py-error.exp | ||
py-error.py | ||
py-events-shlib.c | ||
py-events.c | ||
py-events.exp | ||
py-events.py | ||
py-evsignal.exp | ||
py-evthreads.c | ||
py-evthreads.exp | ||
py-explore-cc.exp | ||
py-explore.c | ||
py-explore.cc | ||
py-explore.exp | ||
py-finish-breakpoint2.cc | ||
py-finish-breakpoint2.exp | ||
py-finish-breakpoint2.py | ||
py-finish-breakpoint.c | ||
py-finish-breakpoint.exp | ||
py-finish-breakpoint.py | ||
py-format-string.c | ||
py-format-string.exp | ||
py-format-string.py | ||
py-frame-args.c | ||
py-frame-args.exp | ||
py-frame-args.py | ||
py-frame-inline.c | ||
py-frame-inline.exp | ||
py-frame.c | ||
py-frame.exp | ||
py-framefilter-gdb.py.in | ||
py-framefilter-invalidarg-gdb.py.in | ||
py-framefilter-invalidarg.exp | ||
py-framefilter-invalidarg.py | ||
py-framefilter-mi.c | ||
py-framefilter-mi.exp | ||
py-framefilter.c | ||
py-framefilter.exp | ||
py-framefilter.py | ||
py-function.exp | ||
py-inferior.c | ||
py-inferior.exp | ||
py-infthread.c | ||
py-infthread.exp | ||
py-lazy-string.c | ||
py-lazy-string.exp | ||
py-linetable.c | ||
py-linetable.exp | ||
py-linetable.S | ||
py-lookup-type.exp | ||
py-mi-events-gdb.py | ||
py-mi-events.c | ||
py-mi-events.exp | ||
py-mi-objfile-gdb.py | ||
py-mi-objfile.c | ||
py-mi-objfile.exp | ||
py-mi-var-info-path-expression.c | ||
py-mi-var-info-path-expression.exp | ||
py-mi-var-info-path-expression.py | ||
py-mi.exp | ||
py-nested-maps.c | ||
py-nested-maps.exp | ||
py-nested-maps.py | ||
py-objfile-script-gdb.py | ||
py-objfile-script.c | ||
py-objfile-script.exp | ||
py-objfile.c | ||
py-objfile.exp | ||
py-parameter.exp | ||
py-pp-integral.c | ||
py-pp-integral.exp | ||
py-pp-integral.py | ||
py-pp-maint.c | ||
py-pp-maint.exp | ||
py-pp-maint.py | ||
py-pp-re-notag.c | ||
py-pp-re-notag.exp | ||
py-pp-re-notag.py | ||
py-pp-registration.c | ||
py-pp-registration.exp | ||
py-pp-registration.py | ||
py-prettyprint.c | ||
py-prettyprint.exp | ||
py-prettyprint.py | ||
py-progspace.c | ||
py-progspace.exp | ||
py-prompt.c | ||
py-prompt.exp | ||
py-rbreak-func2.c | ||
py-rbreak.c | ||
py-rbreak.exp | ||
py-record-btrace-threads.c | ||
py-record-btrace-threads.exp | ||
py-record-btrace.c | ||
py-record-btrace.exp | ||
py-record-full.c | ||
py-record-full.exp | ||
py-recurse-unwind.c | ||
py-recurse-unwind.exp | ||
py-recurse-unwind.py | ||
py-rvalue-ref-value-cc.cc | ||
py-rvalue-ref-value-cc.exp | ||
py-section-script.c | ||
py-section-script.exp | ||
py-section-script.py | ||
py-shared-sl.c | ||
py-shared.c | ||
py-shared.exp | ||
py-strfns.c | ||
py-strfns.exp | ||
py-symbol.c | ||
py-symbol.exp | ||
py-symtab.exp | ||
py-sync-interp.c | ||
py-sync-interp.exp | ||
py-template.cc | ||
py-template.exp | ||
py-thrhandle.c | ||
py-thrhandle.exp | ||
py-type.c | ||
py-type.exp | ||
py-typeprint.cc | ||
py-typeprint.exp | ||
py-typeprint.py | ||
py-unwind-maint.c | ||
py-unwind-maint.exp | ||
py-unwind-maint.py | ||
py-unwind.c | ||
py-unwind.exp | ||
py-unwind.py | ||
py-value-cc.cc | ||
py-value-cc.exp | ||
py-value.c | ||
py-value.exp | ||
py-xmethods.cc | ||
py-xmethods.exp | ||
py-xmethods.py | ||
python-1.c | ||
python.c | ||
python.exp | ||
source1 | ||
source2.py |