Python parser for kdebug events
Project description
Description
pykdebugparser
is a utility created in order to parse Darwin's (iOS and OSX) kdebug events.
The main difference between pykdebugparser
and other utilities like fs_usage and ktrace is the traces parsing and
formatting.
Installation
Install the last released version using pip
:
python3 -m pip install --user -U pykdebugparser
Or install the latest version from sources:
git clone git@github.com:matan1008/pykdebugparser.git
cd pykdebugparser
python3 -m pip install --user -U -e .
Usage
You can either use the CLI:
Usage: pykdebugparser [OPTIONS] KDEBUG_DUMP
Options:
-c, --count INTEGER Number of events to print. Omit to endless
sniff.
--tid INTEGER Thread ID to filter. Omit for all.
--show-tid / --no-show-tid Whether to print thread id or not.
--color / --no-color Whether to print with color or not.
--help Show this message and exit.
Or import and use the API yourself:
from pykdebugparser.pykdebugparser import PyKdebugParser
parser = PyKdebugParser()
parser.color = True
with open('kdebug.bin', 'rb') as fd:
for trace in parser.formatted_traces(fd):
print(trace)
Example
In order to produce an input file, you can use ktrace dump
, you can see an example here
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pykdebugparser-0.0.3.tar.gz
(30.9 kB
view hashes)
Built Distribution
Close
Hashes for pykdebugparser-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9f7425b0b27003b4e58bb6c9e9617e3834eea83e0087314e72e9055020bcc247 |
|
MD5 | 7b72214e163de3b431d2518662bb30c3 |
|
BLAKE2b-256 | 6d57afe30b0dee3b79450e824a7f0c54905e73d27fff5cc364d3451a21ecaa14 |