[Lldb-commits] [lldb] [lldb-server] Add type info for qMemoryinfo reponse (PR #209235)
David Spickett via lldb-commits
lldb-commits at lists.llvm.org
Tue Jul 14 01:52:24 PDT 2026
================
@@ -114,8 +114,15 @@ ParseMemoryRegionInfoFromProcMapsLine(llvm::StringRef maps_line,
line_extractor.SkipSpaces();
const char *name = line_extractor.Peek();
- if (name)
+ if (name) {
region.SetName(name);
+ // /proc/maps labels only the main thread's stack; thread stacks are
+ // anonymous and the default MemoryRegionInfo::eDontKnow is kept.
+ if (llvm::StringRef(name) == "[stack]")
+ region.SetIsStackMemory(eLazyBoolYes);
+ else if (llvm::StringRef(name) == "[heap]")
+ region.SetIsStackMemory(eLazyBoolNo);
----------------
DavidSpickett wrote:
It's a few cycles, but I'd put an explicit else here. That's a stronger signal than a comment.
https://github.com/llvm/llvm-project/pull/209235
More information about the lldb-commits
mailing list