summaryrefslogtreecommitdiff
path: root/cross-project-tests
diff options
context:
space:
mode:
authorStephen Tozer <stephen.tozer@sony.com>2022-06-06 12:22:24 +0100
committerStephen Tozer <stephen.tozer@sony.com>2022-06-08 16:05:29 +0100
commit2a156f6058054e8eff27bfd3564fe19e1bc43024 (patch)
tree0460de643723fa8aee1a0d473bfce19f1ec0ea4b /cross-project-tests
parentf0d2a55d3aa68827ad708a16650bb0b341ca65bb (diff)
downloadllvm-2a156f6058054e8eff27bfd3564fe19e1bc43024.tar.gz
[Dexter] Catch value error when encountering invalid address
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. Differential Revision: https://reviews.llvm.org/D127101
Diffstat (limited to 'cross-project-tests')
-rw-r--r--cross-project-tests/debuginfo-tests/dexter/dex/command/commands/DexDeclareAddress.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/cross-project-tests/debuginfo-tests/dexter/dex/command/commands/DexDeclareAddress.py b/cross-project-tests/debuginfo-tests/dexter/dex/command/commands/DexDeclareAddress.py
index cf547601754f..708fc2760e03 100644
--- a/cross-project-tests/debuginfo-tests/dexter/dex/command/commands/DexDeclareAddress.py
+++ b/cross-project-tests/debuginfo-tests/dexter/dex/command/commands/DexDeclareAddress.py
@@ -51,8 +51,10 @@ class DexDeclareAddress(CommandBase):
try:
watch = step.program_state.frames[0].watches[self.expression]
except KeyError:
- pass
- else:
+ continue
+ try:
hex_val = int(watch.value, 16)
- self.address_resolutions[self.get_address_name()] = hex_val
- break
+ except ValueError:
+ hex_val = None
+ self.address_resolutions[self.get_address_name()] = hex_val
+ break