fix incorrect parsing of "at foo.so" and empty function name
ClosedPublic

Authored by sitter on Thu, Jan 30, 4:35 PM.

Details

Summary

for unknown reasons gdb seems to behave inconsistently here. usually
'at' denotes a file, but there are backtraces where it doesn't
e.g. https://bugs.kde.org/show_bug.cgi?id=416923

I've add a trivial suffix check to ensure parsing of these lines works
correctly even when 'at' is used in combination with a library name.

this is a bit hackish, but in reality this entire parsing tech should
probably be replaced by a python plugin for gdb so we can get interactive
access to the frames and serialize them in a well defined format instead of
having to parse "random" text

on top of that our regex assumed we'd always have a function name, which is
also not true as that bug report shows. to mitigate this the matching group
has been made optional.

this commit also adds a test for the gdb line parsing unit with some
obvious line samples I could find just now

Test Plan

all tests pass

Diff Detail

Repository
R871 DrKonqi
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
sitter created this revision.Thu, Jan 30, 4:35 PM
Restricted Application added a project: Plasma. · View Herald TranscriptThu, Jan 30, 4:35 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
sitter requested review of this revision.Thu, Jan 30, 4:35 PM
ngraham accepted this revision.Fri, Jan 31, 1:17 PM
ngraham added a subscriber: ngraham.

Nice find.

This revision is now accepted and ready to land.Fri, Jan 31, 1:17 PM
This revision was automatically updated to reflect the committed changes.