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

Stephen Tozer via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Mon Aug 11 05:32:12 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)
----------------
SLTozer wrote:

Does `$pc` work for all supported debuggers?

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


More information about the llvm-branch-commits mailing list