[PATCH] D127101: [Dexter] Catch value error when encountering invalid address

Stephen Tozer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 8 08:06:11 PDT 2022


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG2a156f605805: [Dexter] Catch value error when encountering invalid address (authored by StephenTozer).

Changed prior to commit:
  https://reviews.llvm.org/D127101?vs=434428&id=435167#toc

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D127101/new/

https://reviews.llvm.org/D127101

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


Index: cross-project-tests/debuginfo-tests/dexter/dex/command/commands/DexDeclareAddress.py
===================================================================
--- cross-project-tests/debuginfo-tests/dexter/dex/command/commands/DexDeclareAddress.py
+++ cross-project-tests/debuginfo-tests/dexter/dex/command/commands/DexDeclareAddress.py
@@ -51,8 +51,10 @@
                 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


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D127101.435167.patch
Type: text/x-patch
Size: 929 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220608/b1f72aa2/attachment.bin>


More information about the llvm-commits mailing list