mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-10-17 21:03:55 +08:00
Fix Python gdb.Breakpoint.location crash
I noticed today that gdb.Breakpoint.location will crash when applied to a catchpoint made with "catch throw". The bug is that "catch throw" makes a breakpoint that is of type bp_breakpoint, but which does not have a location. Regression tested on x86-64 Fedora 28. gdb/ChangeLog 2018-10-06 Tom Tromey <tom@tromey.com> * python/py-breakpoint.c (bppy_get_location): Handle a bp_breakpoint without a location. gdb/testsuite/ChangeLog 2018-10-06 Tom Tromey <tom@tromey.com> * gdb.python/py-breakpoint.exp (check_last_event): Check location of a "throw" catchpoint.
This commit is contained in:
@ -616,6 +616,11 @@ proc_with_prefix test_bkpt_explicit_loc {} {
|
||||
gdb_test "python bp1 = gdb.Breakpoint (function=\"blah\")" \
|
||||
"Function \"blah\" not defined.*" \
|
||||
"set invalid explicit breakpoint by missing function"
|
||||
|
||||
delete_breakpoints
|
||||
gdb_test "catch throw" "Catchpoint .* \\(throw\\)"
|
||||
gdb_test "python print (gdb.breakpoints()\[0\].location)" None \
|
||||
"Examine location of catchpoint"
|
||||
}
|
||||
|
||||
proc_with_prefix test_bkpt_qualified {} {
|
||||
|
Reference in New Issue
Block a user