================
@@ -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
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits