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.