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

Authored by sitter on Jan 30 2020, 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
Branch
Plasma/5.18
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 21865
Build 21883: arc lint + arc unit
sitter created this revision.Jan 30 2020, 4:35 PM
Restricted Application added a project: Plasma. · View Herald TranscriptJan 30 2020, 4:35 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
sitter requested review of this revision.Jan 30 2020, 4:35 PM
ngraham accepted this revision.Jan 31 2020, 1:17 PM
ngraham added a subscriber: ngraham.

Nice find.

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