Skip to content

feat(parser): try_item / encoded_catch_handler parsing (1)#5

Open
haeter525 wants to merge 1 commit into
mainfrom
pr-a/parser-try-catch
Open

feat(parser): try_item / encoded_catch_handler parsing (1)#5
haeter525 wants to merge 1 commit into
mainfrom
pr-a/parser-try-catch

Conversation

@haeter525
Copy link
Copy Markdown
Member

@haeter525 haeter525 commented May 21, 2026

Summary

Adds DEX try_item and encoded_catch_handler decoding to the existing DexParser, exposed as new TryItem and CatchHandler dataclasses. Purely additive — no existing parser behaviour changes, no consumers in this PR.

Scope

File Change
src/dextrace/core/dex_parser.py Add TryItem, CatchHandler, try-item parsing (~180 LoC, additive)
tests/test_dex_catch.py Parser-level coverage
tools/gen_try_catch_fixture.py Generator for the .dex fixture
tests/conftest.py pytest_configure auto-runs every tools/gen_*_fixture.py at session start
.gitignore Ignore tests/fixtures/samples/*.dex (they are deterministic outputs of the generators)

One-line verification

pytest tests/test_dex_catch.py -q

Adds DEX try_item and encoded_catch_handler decoding to the existing
DexParser, exposed as new TryItem and CatchHandler dataclasses. No
existing parser behaviour changes.

Includes:
- src/dextrace/core/dex_parser.py: TryItem, CatchHandler, parse_try_items
- tests/test_dex_catch.py: parser-level coverage against the try_catch fixture
- tools/gen_try_catch_fixture.py: generator for the .dex fixture
- tests/conftest.py: pytest_configure auto-runs every tools/gen_*_fixture.py
  at session start so .dex files don't need to be committed
- .gitignore: tests/fixtures/samples/*.dex

Verification (one-liner):
    pytest tests/test_dex_catch.py -q

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@haeter525 haeter525 marked this pull request as ready for review May 21, 2026 13:57
@haeter525 haeter525 changed the title feat(parser): additive try_item / encoded_catch_handler parsing feat(parser): try_item / encoded_catch_handler parsing (1) May 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant