[llvm-branch-commits] [llvm] [Dexter] add get_pc (PR #152719)

Orlando Cazalet-Hyams via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Mon Aug 11 06:13:28 PDT 2025


================
@@ -233,6 +233,16 @@ def frames_below_main(self):
     def evaluate_expression(self, expression, frame_idx=0) -> ValueIR:
         pass
 
+    def get_pc(self, frame_idx: int = 0) -> str:
+        """Get the current PC in frame at frame_idx depth.
+        frame_idx 0 is the current function.
+        """
+        r = self.evaluate_expression("$pc", frame_idx)
----------------
OCHyams wrote:

Define supported debugger - it works for our debugger and LLDB.

I suppose the failure mode could be more user friendly. An exception explaining the feature isn't supported by the debugger might be better than these asserts.

https://github.com/llvm/llvm-project/pull/152719


More information about the llvm-branch-commits mailing list