Hello,
An issue exists where if 'break' command is issued while on a line that
underwent inlining by the compiler gdb asserts with
Assertion `sal.pspace != NULL'
I narrowed down the issue to frame.c:find_frame_sal, combined with
stack.c:set_last_displayed_sal and in the view of print_frame_info.
The fix proposed here would be to properly initialize 'sal' in
find_frmae_sal. Additional check is performed in set_last_displayed_sal
to make sure we do not set last_displayed_* vars and validate them if
pspace is NULL as, clearly, the rest of the code expects it to be
properly set.
I identified the same issue in 7.2, 7.3.1, 7.4 and HEAD. I have not
checked earlier versions.
Test suite did not show regressions, and new test passes where it would
fail without the patch.
ChangeLog:
2012-02-14 Aleksandar Ristovski <aristovski@qnx.com>
* frame.c (find_frame_sal): Initialise sal->pspace field from frame data.
* stack.c (set_last_displayed_sal): Perform sanity check of the data
passed in, in particular, validate that PSPACE is not NULL if requesting
valid last_displayed_* data.
Test suite ChangeLOg:
2012-02-14 Aleksandar Ristovski <aristovski@qnx.com>
* gdb.base/break-inline.exp: New test.
* gdb.base/break-inline.c: New test.
Attached are patch for the fix and tests.
Thank you,
Aleksandar Ristovski
QNX Software Systems