This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug breakpoints/22569] Internal error when using "break -source test.c main"
- From: "keiths at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Thu, 07 Dec 2017 19:25:53 +0000
- Subject: [Bug breakpoints/22569] Internal error when using "break -source test.c main"
- Auto-submitted: auto-generated
- References: <bug-22569-4717@http.sourceware.org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=22569
Keith Seitz <keiths at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |keiths at redhat dot com
Assignee|unassigned at sourceware dot org |keiths at redhat dot com
--- Comment #1 from Keith Seitz <keiths at redhat dot com> ---
This is happening because convert_explicit_location_to_linespec (or some
caller?) doesn't check whether the resultant explicit location is
valid/fully-specified.
The original input string parses as "-source", "test.cpp", and "main". The
first two tokens are converted to the explicit (under-specified) source
filename. "main" is passed to create_breakpoint as the EXTRA_STRING argument
(used for dprtinf conditions or thread/condition/task parsing).
However once this explicit location is converted into SaLs, nothing apparently
validates the explicit location (or at least this particular (mis)usage).
convert_explicit_location_to_linespec does some checking for valid input, e.g.,
if a -label is specified but doesn't exit, it will error.
I think that it should also check this case, where the input is underspecified.
--
You are receiving this mail because:
You are on the CC list for the bug.