This is an archive of the discontinued LLVM Phabricator instance.

[Dexter] Catch value error when encountering invalid address
ClosedPublic

Authored by StephenTozer on Jun 6 2022, 4:28 AM.

Details

Summary

The DexDeclareAddress command checks the value of a variable at a certain point in the debugged program, and saves that value to be used in other commands. If the value at that point is not a valid address however, it currently causes an error in Dexter when we try to cast it - this is fixed in this patch by catching the error and leaving the address value unresolved.

Diff Detail

Event Timeline

StephenTozer created this revision.Jun 6 2022, 4:28 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 6 2022, 4:28 AM
StephenTozer requested review of this revision.Jun 6 2022, 4:28 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 6 2022, 4:28 AM

I've added an inline suggestion but I'm happy with or without that change, LGTM.

cross-project-tests/debuginfo-tests/dexter/dex/command/commands/DexDeclareAddress.py
54

Changing the pass here to continue, then dropping the else: may improve readability now that the additional try block is required.

Orlando accepted this revision.Jun 8 2022, 6:12 AM
This revision is now accepted and ready to land.Jun 8 2022, 6:12 AM
This revision was landed with ongoing or failed builds.Jun 8 2022, 8:06 AM
This revision was automatically updated to reflect the committed changes.