This is an archive of the discontinued LLVM Phabricator instance.

[Dexter] Allow DexUnreachable to be specified in supplementary .dex files
ClosedPublic

Authored by jmorse on Dec 9 2021, 8:28 AM.

Details

Summary

DexUnreachable is a useful tool for specifying that lines shouldn't be stepped on. Right now they have to be placed in the source file; lets allow them to be placed instead in a detached .dex file, by adding on_line and line-range keyword arguments to the command.

Diff Detail

Event Timeline

jmorse requested review of this revision.Dec 9 2021, 8:28 AM
jmorse created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptDec 9 2021, 8:28 AM
Orlando accepted this revision.Jan 5 2022, 12:00 AM

Please can you update Commands.md too? LGTM with nit, thanks.

cross-project-tests/debuginfo-tests/dexter/dex/debugger/DebuggerControllers/ControllerHelpers.py
22–23

Shouldn't this check come last? Otherwise IIUC this will return True when the positional line number of the command is hit, even when a line argument is specified.

This revision is now accepted and ready to land.Jan 5 2022, 12:00 AM
jmorse updated this revision to Diff 398567.Jan 10 2022, 3:55 AM

Fiddle with conditions for a line having been stepped upon; add a test to check that DexUnreachables with on_line etc specified don't trigger using the line they were declared at.

cross-project-tests/debuginfo-tests/dexter/dex/debugger/DebuggerControllers/ControllerHelpers.py
22–23

Good catch, I've updating this condition and added a test for that scenario (unreachable_not_cmd_lineno.cpp)

(Still LGTM)

This revision was automatically updated to reflect the committed changes.