1. 17 Aug, 2020 1 commit
    • Ahmad Samir's avatar
      Fix the port to QRegularExpression · 7d2cfbe4
      Ahmad Samir authored
      I made some mistakes when porting from QRegExp to QRegularExpression:
      - With QRegularExpression::DotMatchesEverythingOption enabled, better use
        QRegularExpression::anchoredPattern and not rely on "^" and "$" to anchor
        the pattern (anchoredPattern uses "\A" and "\z" which is more accurate/precise)
      - Disable QRegularExpression::DotMatchesEverythingOption before subsequent
        setPattern calls, it's only needed for the first matching
      - When calling setPattern, obviously the previous QRegularExpression::anchoredPattern
        isn't going to be in effect, call it again if you want the pattern to be
        anchored
      
      Thanks to sitter for the unit tests that exposed the issue, and for
      spotting the issue with needing to anchor the pattern.
      
      All unit tests pass.
      7d2cfbe4
  2. 06 Apr, 2020 2 commits
    • Harald Sitter's avatar
      fix line rating for new format when function name is missing · 113b91bf
      Harald Sitter authored
      Summary:
      previously this supposedly was
      
      `#2  0x00007fefe9ef79e8 in ?? () at /usr/lib/dri/i965_dri.so`
      
      nowadays the ?? is simply empty. the rating mechanism wasn't properly
      handling this. treat an empty function name to mean the same as ?? and
      rate the line as MissingFunction/Everything depending on whether
      libraryName is also missing.
      
      also update test expectations accordingly (could have actually seen that
      discrepancy if one had paid attention to the outcoming rating :S)
      
      CCBUG: 418538
      
      Test Plan:
      test passes. most lines from 417435 now rate `MissingFunction` and the whole trace is considered useless
      
      ```
      Rating: 128 out of 364 Usefulness: Useless
      90%: 327.6 70%: 254.8 40%: 145.6
      ```
      
      Reviewers: cfeck, ngraham
      
      Reviewed By: ngraham
      
      Subscribers: ahmadsamir, plasma-devel
      
      Tags: #plasma
      
      Differential Revision: https://phabricator.kde.org/D28027
      113b91bf
    • Harald Sitter's avatar
      further constrict line parsing of .so files · dd180bb4
      Harald Sitter authored
      Summary:
      As seen in https://bugs.kde.org/show_bug.cgi?id=417435 the previous fix
      for .so detection actually falls flat on the face for most things
      other than glib2. The original test here was flawed as libglib-2.0.so.0
      has the complete suffix '0.so.0' which matched the original parsing
      condition. most libraries however are libfoo.so.0 and for that the suffix
      would be 'so.0' which did not match the original condition.
      
      extend the condition to properly cover files without so-version, files with
      awkward suffix (such as glib) and files with normal names and normal
      versioning.
      also extend test case accordingly
      
      CCBUG: 418538
      
      Test Plan: test passes. all lines from 417435 score less than `Good`
      
      Reviewers: cfeck, ngraham
      
      Subscribers: plasma-devel
      
      Tags: #plasma
      
      Differential Revision: https://phabricator.kde.org/D28026
      dd180bb4
  3. 27 Mar, 2020 1 commit
  4. 19 Mar, 2020 1 commit
    • Ahmad Samir's avatar
      [DrKonqi] Port QRegExp to QRegularExpression · 8d8062fe
      Ahmad Samir authored
      Summary:
      Port QRegExp::exactMatch() by using QRegularExpression::anchoredPattern(),
      unless the pattern is already anchored by "^" and "$".
      
      BacktraceLineGdb::parse():
       - set QRegularExpression::DotMatchesEverythingOption, since gdb breaks
         some stack frame lines to mulitple lines for readability, e.g.:
         "#5  0x00007f50e99f776f in QWidget::testAttribute_helper (this=0x6e6440,\n
          attribute=Qt::WA_WState_Created) at kernel/qwidget.cpp:9081\n"
         this matches QRegExp behaviour where a "." char matches new lines by
         default.
       - Use clustering parentheses (?:) so as not to capture groups that aren't
         needed, less bookkeeping for QRegularExpression/PCRE
      
      Replace QRegularExpression with QString comparison, the latter is usually
      faster.
      
      All unit tests still pass.
      
      Reviewers: #plasma, davidedmundson, sitter, apol
      
      Reviewed By: sitter
      
      Subscribers: plasma-devel
      
      Tags: #plasma
      
      Differential Revision: https://phabricator.kde.org/D28042
      8d8062fe
  5. 31 Jan, 2020 1 commit
    • Harald Sitter's avatar
      fix incorrect parsing of "at foo.so" and empty function name · a90e3b38
      Harald Sitter authored
      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
      
      Reviewers: ngraham
      
      Reviewed By: ngraham
      
      Subscribers: ngraham, plasma-devel
      
      Tags: #plasma
      
      Differential Revision: https://phabricator.kde.org/D27041
      a90e3b38
  6. 04 Sep, 2019 1 commit
  7. 09 Jul, 2019 1 commit
  8. 08 Feb, 2018 1 commit
  9. 07 Feb, 2018 1 commit
  10. 16 Jan, 2018 2 commits
  11. 01 Nov, 2015 1 commit
  12. 20 Oct, 2014 1 commit
  13. 08 Apr, 2014 1 commit
    • Aleix Pol Gonzalez's avatar
      Initial import from the monolithic kde-runtime. · 81c1985e
      Aleix Pol Gonzalez authored
      This is the beginning of revision history for this module. If you
      want to look at revision history older than this, please refer to the
      techbase wiki for how to use Git history grafting. At the time of
      writing, this wiki is located here:
      
      http://community.kde.org/Frameworks/GitOldHistory
      
      If you have already performed the grafting and you don't see any
      history beyond this commit, try running "git log" with the "--follow"
      argument.
      
      Branched from the monolithic repo kde-runtime, frameworks  branch, at commit
      85b1a18736650e28d8addd441f83083987298233
      81c1985e