forked from OSchip/llvm-project
[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
This commit is contained in:
parent
f0d2a55d3a
commit
2a156f6058
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue