This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug breakpoints/22569] Internal error when using "break -source test.c main"


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.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]