Skip to content

Commit 33c9434

Browse files
committed
[lldb-dap] support moduleId in the stackTrace response
1 parent 84e689b commit 33c9434

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

lldb/tools/lldb-dap/JSONUtils.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -550,6 +550,15 @@ llvm::json::Value CreateStackFrame(DAP &dap, lldb::SBFrame &frame,
550550
if (frame.IsArtificial() || frame.IsHidden())
551551
object.try_emplace("presentationHint", "subtle");
552552

553+
lldb::SBModule module = frame.GetModule();
554+
if (module.IsValid()) {
555+
std::string uuid = module.GetUUIDString();
556+
if (!uuid.empty())
557+
object.try_emplace("moduleId", uuid);
558+
else
559+
object.try_emplace("moduleId", module.GetFileSpec().GetFilename());
560+
}
561+
553562
return llvm::json::Value(std::move(object));
554563
}
555564

0 commit comments

Comments
 (0)