Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions lldb/test/API/tools/lldb-dap/coreFile/TestDAP_coreFile.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ def test_core_file(self):
"column": 0,
"id": 524288,
"line": 4,
"moduleId": "01DF54A6-045E-657D-3F8F-FB9CE1118789-14F8BD6D",
"name": "bar",
"source": {"name": "main.c", "path": "/home/labath/test/main.c"},
"instructionPointerReference": "0x40011C",
Expand All @@ -34,6 +35,7 @@ def test_core_file(self):
"column": 0,
"id": 524289,
"line": 10,
"moduleId": "01DF54A6-045E-657D-3F8F-FB9CE1118789-14F8BD6D",
"name": "foo",
"source": {"name": "main.c", "path": "/home/labath/test/main.c"},
"instructionPointerReference": "0x400142",
Expand All @@ -42,6 +44,7 @@ def test_core_file(self):
"column": 0,
"id": 524290,
"line": 16,
"moduleId": "01DF54A6-045E-657D-3F8F-FB9CE1118789-14F8BD6D",
"name": "_start",
"source": {"name": "main.c", "path": "/home/labath/test/main.c"},
"instructionPointerReference": "0x40015F",
Expand Down
9 changes: 9 additions & 0 deletions lldb/tools/lldb-dap/JSONUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -550,6 +550,15 @@ llvm::json::Value CreateStackFrame(DAP &dap, lldb::SBFrame &frame,
if (frame.IsArtificial() || frame.IsHidden())
object.try_emplace("presentationHint", "subtle");

lldb::SBModule module = frame.GetModule();
if (module.IsValid()) {
std::string uuid = module.GetUUIDString();
if (!uuid.empty())
object.try_emplace("moduleId", uuid);
else
object.try_emplace("moduleId", module.GetFileSpec().GetFilename());
}

return llvm::json::Value(std::move(object));
}

Expand Down
Loading