[Lldb-commits] [PATCH] D116419: [lldb] Display MachO seg, sec of memory region

Dave Lee via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Jan 10 09:24:00 PST 2022


kastiglione added inline comments.


================
Comment at: lldb/source/Commands/CommandObjectMemory.cpp:1695
+              section_sp = section_sp->GetParent();
+            section_name = section_sp->GetName();
+          }
----------------
aprantl wrote:
> Why did `section_sp->GetName();` return the Segment name in the original code? Is that a bug?
The original code is traversing the parent chain of sections, which for mach-o ends up on the segment. Now that I have learned the address range printed is for the segment, then it makes sense why the segment name alone is printed.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D116419/new/

https://reviews.llvm.org/D116419



More information about the lldb-commits mailing list