History log of /llvm-project/lldb/examples/python/crashlog.py (Results 76 – 100 of 162)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# f8d889a7 07-Feb-2022 Dave Lee <davelee.com@gmail.com>

[lldb] Print message after loading 'crashlog' command

Previously, importing `crashlog` resulted in a message being printed. The
message was about other commands (those in heap.py), not `crashlog`. T

[lldb] Print message after loading 'crashlog' command

Previously, importing `crashlog` resulted in a message being printed. The
message was about other commands (those in heap.py), not `crashlog`. The
changes in D117237 made it so that the heap.py messages were printed only when
importing `lldb.macosx.heap`, not when importing `lldb.macosx.crashlog`. Some
users may see no output and think `crashlog` wasn't successfully loaded. This
ensures users see that `crashlog` is loaded.

rdar://88283132

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

show more ...


Revision tags: llvmorg-15-init
# e1cad130 31-Jan-2022 Jonas Devlieghere <jonas@devlieghere.com>

[lldb] Support Rosetta registers in crashlog.py

Rosetta crashlogs can have their own thread register state. Unlike the
other registers which ware directly listed under "threadState", the
Rosetta reg

[lldb] Support Rosetta registers in crashlog.py

Rosetta crashlogs can have their own thread register state. Unlike the
other registers which ware directly listed under "threadState", the
Rosetta registers are nested under their own key in the JSON, as
illustrated below:

{
"threadState":
{
"rosetta":
{
"tmp2":
{
"value": 4935057216
},
"tmp1":
{
"value": 4365863188
},
"tmp0":
{
"value": 18446744073709551615
}
}
}
}

show more ...


Revision tags: llvmorg-13.0.1, llvmorg-13.0.1-rc3
# cb5ea132 12-Jan-2022 Dave Lee <davelee.com@gmail.com>

[lldb] Add long help to `crashlog`

Convert the `crashlog` command to be implemented as a class. The `Symbolicate`
function is switched to a class, to implement `get_long_help`. The text for the
long

[lldb] Add long help to `crashlog`

Convert the `crashlog` command to be implemented as a class. The `Symbolicate`
function is switched to a class, to implement `get_long_help`. The text for the
long help comes from the help output generated by `OptionParser`. That is, the
output of `help crashlog` is the same as `crashlog --help`.

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

show more ...


Revision tags: llvmorg-13.0.1-rc2, llvmorg-13.0.1-rc1
# b225c5f7 07-Oct-2021 Jonas Devlieghere <jonas@devlieghere.com>

[lldb] Parse and display reporting errors from JSON crashlogs

JSON crashlogs have an optional field named reportNotes that contains
any potential errors encountered by the crash reporter when genera

[lldb] Parse and display reporting errors from JSON crashlogs

JSON crashlogs have an optional field named reportNotes that contains
any potential errors encountered by the crash reporter when generating
the crashlog. Parse and display them in LLDB.

Differential revision: https://reviews.llvm.org/D111339

show more ...


# b913065b 07-Oct-2021 Jonas Devlieghere <jonas@devlieghere.com>

[lldb] Support missing threadState in JSON crashlogs

Gracefully deal with JSON crashlogs that don't have thread state
available and print an error saying as much: "No thread state (register
informat

[lldb] Support missing threadState in JSON crashlogs

Gracefully deal with JSON crashlogs that don't have thread state
available and print an error saying as much: "No thread state (register
information) available".

rdar://83955858

Differential revision: https://reviews.llvm.org/D111341

show more ...


# 730fca46 05-Oct-2021 Jonas Devlieghere <jonas@devlieghere.com>

[lldb] Improve meta data stripping from JSON crashlogs

JSON crashlogs normally start with a single line of meta data that we
strip unconditionally. Some producers started omitting the meta data
whic

[lldb] Improve meta data stripping from JSON crashlogs

JSON crashlogs normally start with a single line of meta data that we
strip unconditionally. Some producers started omitting the meta data
which tripped up crashlog. Be more resilient by only removing the first
line when we know it really is meta data.

rdar://82641662

show more ...


Revision tags: llvmorg-13.0.0, llvmorg-13.0.0-rc4, llvmorg-13.0.0-rc3
# 4da5a446 07-Sep-2021 Jonas Devlieghere <jonas@devlieghere.com>

[lldb] Update crashlog.py to accept multiple results from mdfind

mdfind can return multiple results, some of which are not even dSYM
bundles, but Xcode archives (.xcrachive).

Currently, we end up c

[lldb] Update crashlog.py to accept multiple results from mdfind

mdfind can return multiple results, some of which are not even dSYM
bundles, but Xcode archives (.xcrachive).

Currently, we end up concatenating the paths, which is obviously bogus.
This patch not only fixes that, but now also skips paths that don't have
a Contents/Resources/DWARF subdirectory.

rdar://81270312

Differential revision: https://reviews.llvm.org/D109263

show more ...


# 05cdd294 03-Sep-2021 Jonas Devlieghere <jonas@devlieghere.com>

[lldb] Adjust parse_frames for unnamed images

Follow up to 2cbd3b04feaaaff7fab4c6500476839a23180886 which added
support for unnamed images but missed the use case in parse_frames.


Revision tags: llvmorg-13.0.0-rc2, llvmorg-13.0.0-rc1, llvmorg-14-init
# a5c3f10b 02-Jul-2021 Jonas Devlieghere <jonas@devlieghere.com>

[lldb] Update shebang in heap.py and crashlog.py


Revision tags: llvmorg-12.0.1, llvmorg-12.0.1-rc4, llvmorg-12.0.1-rc3, llvmorg-12.0.1-rc2, llvmorg-12.0.1-rc1
# 91d3f739 22-Apr-2021 Jonas Devlieghere <jonas@devlieghere.com>

[lldb] Update register state parsing for JSON crashlogs

- The register encoding state in the JSON crashlog format changes.
Update the parser accordingly.
- Print the register state when printin

[lldb] Update register state parsing for JSON crashlogs

- The register encoding state in the JSON crashlog format changes.
Update the parser accordingly.
- Print the register state when printing the symbolicated thread.

show more ...


# a62cbd9a 22-Apr-2021 Jonas Devlieghere <jonas@devlieghere.com>

[lldb] Include thread name in crashlog.py output

Update the JSON parser to include the thread name in the Thread object.

rdar://76677320


# 2cbd3b04 19-Apr-2021 Jonas Devlieghere <jonas@devlieghere.com>

[lldb] Support "absolute memory address" images in crashlog.py

The binary image list contains the following entry when a frame is not
found in any know binary image:

{
"size" : 0,
"source

[lldb] Support "absolute memory address" images in crashlog.py

The binary image list contains the following entry when a frame is not
found in any know binary image:

{
"size" : 0,
"source" : "A",
"base" : 0,
"uuid" : "00000000-0000-0000-0000-000000000000"
}

Note that this object is missing the name and path keys. This patch
makes the JSON parser resilient against their absence.

show more ...


# 8639e2aa 15-Apr-2021 Jonas Devlieghere <jonas@devlieghere.com>

[lldb] Raise a CrashLogParseException when failing to parse JSON crashlog

Throw an exception with an actually helpful message when we fail to
parse a JSON crashlog.


Revision tags: llvmorg-12.0.0, llvmorg-12.0.0-rc5, llvmorg-12.0.0-rc4
# cc52ea30 09-Mar-2021 Jonas Devlieghere <jonas@devlieghere.com>

[lldb] Update crashlog script for JSON changes

Update the crashlog script for changes to the JSON schema.

rdar://75122914

Differential revision: https://reviews.llvm.org/D98219


Revision tags: llvmorg-12.0.0-rc3, llvmorg-12.0.0-rc2, llvmorg-11.1.0, llvmorg-11.1.0-rc3, llvmorg-12.0.0-rc1, llvmorg-13-init, llvmorg-11.1.0-rc2, llvmorg-11.1.0-rc1, llvmorg-11.0.1, llvmorg-11.0.1-rc2, llvmorg-11.0.1-rc1
# c7cbf32f 16-Nov-2020 Jonas Devlieghere <jonas@devlieghere.com>

[crashlog] Implement parser for JSON encoded crashlogs

Add a parser for JSON crashlogs. The CrashLogParser now defers to either
the JSONCrashLogParser or the TextCrashLogParser. It first tries to
in

[crashlog] Implement parser for JSON encoded crashlogs

Add a parser for JSON crashlogs. The CrashLogParser now defers to either
the JSONCrashLogParser or the TextCrashLogParser. It first tries to
interpret the input as JSON, and if that fails falling back to the
textual parser.

Differential revision: https://reviews.llvm.org/D91130

show more ...


# c29c24be 04-Nov-2020 Jonas Devlieghere <jonas@devlieghere.com>

[crashlog] Pass the debugger around instead of relying on lldb.debugger

The lldb.debugger et al convenience variables are only available from
the interactive script interpreter. In all other scenari

[crashlog] Pass the debugger around instead of relying on lldb.debugger

The lldb.debugger et al convenience variables are only available from
the interactive script interpreter. In all other scenarios, they are
None (since fc1fd6bf9fcfac412b10b4193805ec5de0e8df57) before that they
were default initialized.

The crashlog script was hacking around that by setting the lldb.debugger
to a newly created debugger instance when running outside of the script
interpreter, which works fine until lldb creates a script interpreter
instance under the hood and clears the variables. This was resulting in
an AttributeError when invoking the script directly (from outside of
lldb):

AttributeError: 'NoneType' object has no attribute 'GetSourceManager'

This patch fixes that by passing around the debugger instance.

rdar://64775776

Differential revision: https://reviews.llvm.org/D90706

show more ...


# f0fd4349 03-Nov-2020 Jonas Devlieghere <jonas@devlieghere.com>

[crashlog] Print the actual exception in the CommandReturnObject

Before:

error: python exception <class 'AttributeError'>

After:

error: python exception: 'DarwinImage' object has no attribute

[crashlog] Print the actual exception in the CommandReturnObject

Before:

error: python exception <class 'AttributeError'>

After:

error: python exception: 'DarwinImage' object has no attribute 'debugger'

show more ...


# 16dd6934 03-Nov-2020 Jonas Devlieghere <jonas@devlieghere.com>

[crashlog] Modularize parser

Instead of parsing the crashlog in one big loop, use methods that
correspond to the different parsing modes.

Differential revision: https://reviews.llvm.org/D90665


# 4b846820 03-Nov-2020 Jonas Devlieghere <jonas@devlieghere.com>

[crashlog] Move crash log parsing into its own class

Move crash log parsing out of the CrashLog class and into its own class
and add more tests.

Differential revision: https://reviews.llvm.org/D906

[crashlog] Move crash log parsing into its own class

Move crash log parsing out of the CrashLog class and into its own class
and add more tests.

Differential revision: https://reviews.llvm.org/D90664

show more ...


# 66009a19 03-Nov-2020 Jonas Devlieghere <jonas@devlieghere.com>

[crashlog] Remove commented out code (NFC)

Remove commented out code and print statements.


# 6c9f3fe9 03-Nov-2020 Jonas Devlieghere <jonas@devlieghere.com>

[crashlog] Turn crash log parsing modes into a Python 'enum' (NFC)

Python doesn't support enums before PEP 435, but using a class with
constants is how it's commonly emulated. It can be converted in

[crashlog] Turn crash log parsing modes into a Python 'enum' (NFC)

Python doesn't support enums before PEP 435, but using a class with
constants is how it's commonly emulated. It can be converted into a real
Enum (in Python 3.4 and later) by extending the Enum class:

class CrashLogParseMode(Enum):
NORMAL = 0
THREAD = 1
IMAGES = 2
THREGS = 3
SYSTEM = 4
INSTRS = 5

show more ...


# fb6d1c02 03-Nov-2020 Jonas Devlieghere <jonas@devlieghere.com>

[crashlog] Fix and simplify the way we import lldb

Don't try to guess the location of LLDB.framework but use xcrun to ask
the command line driver for the location of the lldb module.


# 5b17b6d9 30-Oct-2020 Jonas Devlieghere <jonas@devlieghere.com>

[lldb] Ignore binary data in crashlog

Skip the instruction stream section in the crashlog section.

Differential revision: https://reviews.llvm.org/D90414


Revision tags: llvmorg-11.0.0, llvmorg-11.0.0-rc6, llvmorg-11.0.0-rc5, llvmorg-11.0.0-rc4, llvmorg-11.0.0-rc3, llvmorg-11.0.0-rc2, llvmorg-11.0.0-rc1, llvmorg-12-init
# 515bc8c1 15-Jul-2020 serge-sans-paille <sguelton@redhat.com>

Harmonize Python shebang

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


Revision tags: llvmorg-10.0.1, llvmorg-10.0.1-rc4, llvmorg-10.0.1-rc3, llvmorg-10.0.1-rc2
# 723a1caa 28-May-2020 Jim Ingham <jingham@apple.com>

Fix the crashlog.py script's use of the load_address property.

This property is explicitly for use only in the interactive editor,
and NOT in commands. It's use worked until we got more careful abo

Fix the crashlog.py script's use of the load_address property.

This property is explicitly for use only in the interactive editor,
and NOT in commands. It's use worked until we got more careful about
not leaving lldb.target lying around in the script interpreter.

I also added a quick sniff test for the save_crashlog command.

<rdar://problem/60350620>
Differential Revision: https://reviews.llvm.org/D80680

show more ...


1234567