================ @@ -105,6 +105,21 @@ protocol::Source CreateSource(lldb::SBAddress address, lldb::SBTarget &target) { return CreateSource(line_entry.GetFileSpec()); } +protocol::Source CreateSource(lldb::SBFrame frame) { + if (!frame.IsValid()) + return {}; + + const lldb::SBTarget target = frame.GetThread().GetProcess().GetTarget(); + lldb::SBDebugger debugger = target.GetDebugger(); + lldb::StopDisassemblyType stop_disassembly_display = + GetStopDisassemblyDisplay(debugger); + const lldb::SBAddress frame_pc = frame.GetPCAddress(); + if (ShouldDisplayAssemblySource(frame_pc, stop_disassembly_display)) + return CreateAssemblySource(target, frame_pc); + + return CreateSource(frame.GetLineEntry().GetFileSpec()); ---------------- da-viper wrote:
I am thinking maybe I move this refactor to a different PR so it is easier to review the main issue ? https://github.com/llvm/llvm-project/pull/143644 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits