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

Harald Sitter noreply at phabricator.kde.org
Thu Jan 30 16:35:37 GMT 2020


sitter created this revision.
Herald added a project: Plasma.
Herald added a subscriber: plasma-devel.
sitter requested review of this revision.

REVISION 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

REPOSITORY
  R871 DrKonqi

BRANCH
  Plasma/5.18

REVISION DETAIL
  https://phabricator.kde.org/D27041

AFFECTED FILES
  src/parser/backtraceparsergdb.cpp
  src/parser/backtraceparsergdb.h
  src/tests/CMakeLists.txt
  src/tests/gdbbacktracelinetest.cpp

To: sitter
Cc: plasma-devel, Orage, LeGast00n, The-Feren-OS-Dev, jraleigh, zachus, fbampaloukas, GB_2, ragreen, ZrenBot, ngraham, alexeymin, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, ahiemstra, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20200130/a7b41a30/attachment-0001.html>


More information about the Plasma-devel mailing list