File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
cross-project-tests/debuginfo-tests/dexter/dex/debugger Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -233,6 +233,17 @@ def frames_below_main(self):
233233 def evaluate_expression (self , expression , frame_idx = 0 ) -> ValueIR :
234234 pass
235235
236+ def get_pc (self , frame_idx : int = 0 ) -> str :
237+ """Get the current PC in frame at frame_idx depth.
238+ frame_idx 0 is the current function.
239+ """
240+ r = self .evaluate_expression ("$pc" , frame_idx )
241+ if not r .could_evaluate or r .is_optimized_away or r .is_irretrievable :
242+ raise DebuggerException (
243+ "evaluating '$pc' failed - possibly unsupported by the debugger"
244+ )
245+ return r .value
246+
236247 def _external_to_debug_path (self , path ):
237248 if not self .options .debugger_use_relative_paths :
238249 return path
You can’t perform that action at this time.
0 commit comments