[all-commits] [llvm/llvm-project] f043e6: [lldb/crashlog] Make register output match lldb or...

Med Ismail Bennani via All-commits all-commits at lists.llvm.org
Sat Aug 12 00:00:33 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f043e66e98836e3acf3c978fd0dc429f74b228da
      https://github.com/llvm/llvm-project/commit/f043e66e98836e3acf3c978fd0dc429f74b228da
  Author: Med Ismail Bennani <ismail at bennani.ma>
  Date:   2023-08-11 (Fri, 11 Aug 2023)

  Changed paths:
    M lldb/examples/python/crashlog.py

  Log Message:
  -----------
  [lldb/crashlog] Make register output match lldb ordering in legacy mode

This patch changes the way we dump the registers from the legacy
crashlog command to make sure that the ordering matches the one from lldb.

rdar://109172073

Differential Revision: https://reviews.llvm.org/D156919

Signed-off-by: Med Ismail Bennani <ismail at bennani.ma>


  Commit: 8f75c4d01eff3c65d7ae40bfd05582de7dffa590
      https://github.com/llvm/llvm-project/commit/8f75c4d01eff3c65d7ae40bfd05582de7dffa590
  Author: Med Ismail Bennani <ismail at bennani.ma>
  Date:   2023-08-11 (Fri, 11 Aug 2023)

  Changed paths:
    M lldb/examples/python/crashlog.py

  Log Message:
  -----------
  [lldb/crashlog] Make TextCrashLogParser more resilient to new lines

This patch changes the parsing logic for the legacy crash report format
to avoid interrupting the parsing if there are new lines in the middle
of a section.

To do, the parser starts to skip all consecutive empty lines. If the
number of lines skipped is greater than 1, the parser considers that it
reached a new setion of the report and should reset the parsing mode to
back to normal.

Otherwise, it tries to parse the next line in the current parsing mode.
If it succeeds, the parser will also skip that line since it has already
been parsed and continue the parsing.

rdar://107022595

Differential Revision: https://reviews.llvm.org/D157043

Signed-off-by: Med Ismail Bennani <ismail at bennani.ma>


  Commit: 4677041d61dbe929e886649a97e4d3f49572b0ca
      https://github.com/llvm/llvm-project/commit/4677041d61dbe929e886649a97e4d3f49572b0ca
  Author: Med Ismail Bennani <ismail at bennani.ma>
  Date:   2023-08-11 (Fri, 11 Aug 2023)

  Changed paths:
    M lldb/examples/python/crashlog.py

  Log Message:
  -----------
  [lldb/crashlog] Move CrashLogParseMode into TextCrashLogParser (NFC)

This patch moves CrashLogParseMode into TextCrashLogParser since it's
the only class using it.

Signed-off-by: Med Ismail Bennani <ismail at bennani.ma>


  Commit: 75bed9655a54c82e0485b28026605cb8e1f7c78a
      https://github.com/llvm/llvm-project/commit/75bed9655a54c82e0485b28026605cb8e1f7c78a
  Author: Med Ismail Bennani <ismail at bennani.ma>
  Date:   2023-08-11 (Fri, 11 Aug 2023)

  Changed paths:
    M lldb/examples/python/crashlog.py
    M lldb/examples/python/symbolication.py

  Log Message:
  -----------
  [lldb/crashlog] Fix sticky image parsing logic

Prior to this patch, when a user loaded multiple crash report in lldb,
they could get in a situation where all the targets would keep the same
architecture and executable path as the first one that we've created.

The reason behind this was that even if we created a new CrashLog
object, which is derived from a Symbolicator class that has a newly
constructoted image list as a default argument, because that default
argument is only created once when the function is defined, every CrashLog
object would share the same list.

That will cause use to append newly parsed  images to the same
Symbolicator image list accross multiple CrashLog objects.

To address this, this patch changes the default argument value for the
image parameter to `None` and only initialize it as an empty list when
no argument was passed.

This also removes the image list stored in each CrashLog parsers since
they shouldn't have any state and should be re-usable. So now, the only
source of truth is stored in the CrashLog object.

rdar://84984949

Differential Revision: https://reviews.llvm.org/D157044

Signed-off-by: Med Ismail Bennani <ismail at bennani.ma>


  Commit: 706e875da3a21f2d6ba612ca991dbdbccb339327
      https://github.com/llvm/llvm-project/commit/706e875da3a21f2d6ba612ca991dbdbccb339327
  Author: Med Ismail Bennani <ismail at bennani.ma>
  Date:   2023-08-11 (Fri, 11 Aug 2023)

  Changed paths:
    M lldb/examples/python/symbolication.py

  Log Message:
  -----------
  [lldb/crashlog] Skip images with empty path and 0 UUID from loading

This patch skips images with an empty path or a 0 UUID from loading as a
SymbolFileJSON.

rdar://112107986

Differential Revision: https://reviews.llvm.org/D157137

Signed-off-by: Med Ismail Bennani <ismail at bennani.ma>


Compare: https://github.com/llvm/llvm-project/compare/c053345b059b...706e875da3a2


More information about the All-commits mailing list