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.2.tar.gz
(30.9 kB
view hashes)
Built Distribution
Close
Hashes for pykdebugparser-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5394bf5fbf626d7caa10bf4bb5e59d1c4b0543ebaba1e9e91fbbb1a3facdac93 |
|
MD5 | 1eb3047c6e9fc9b422ff09a7281a041c |
|
BLAKE2b-256 | c4c1360607b4e0758f81598da6bcee806384bf6490d50f25537dab569acb46aa |