This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug breakpoints/19546] gdb crash calling exec in the inferior
- From: "keiths at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Sun, 07 Feb 2016 21:59:46 +0000
- Subject: [Bug breakpoints/19546] gdb crash calling exec in the inferior
- Auto-submitted: auto-generated
- References: <bug-19546-4717 at http dot sourceware dot org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=19546
--- Comment #3 from Keith Seitz <keiths at redhat dot com> ---
I think this is simply an oversight. It looks like momentary_breakpoint types
rely on b->location being unset and update_breakpoints_after_exec recognizing
this and deleting the breakpoint.
With the simple, obvious patch of adding a check for NULL in locations_empty_p,
the test in this bug works again. Of course, the trivial patch causes no
regressions and is pretty safe for the release.
WDYT?
diff --git a/gdb/location.c b/gdb/location.c
index e43ebf1..1762d59 100644
--- a/gdb/location.c
+++ b/gdb/location.c
@@ -690,6 +690,9 @@ string_to_event_location (char **stringp,
int
event_location_empty_p (const struct event_location *location)
{
+ if (location == NULL)
+ return 1;
+
switch (EL_TYPE (location))
{
case LINESPEC_LOCATION:
--
You are receiving this mail because:
You are on the CC list for the bug.