[PATCH] D35422: Add MemoryMappedSection struct for two-level memory map iteration

Aleksey Shlyapnikov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 14 13:57:40 PDT 2017


alekseyshl added inline comments.


================
Comment at: lib/sanitizer_common/sanitizer_procmaps.h:67
   u8 uuid[kModuleUUIDSize];
+  bool has_sections;
 };
----------------
Is it possible to drop has_sections and MemoryMappedSection, and add the current section info right here, under #if MAC? No other but Mac specific code will need to be changed.

If it turns out to be beneficial to have MemoryMappedSection defined, well, maybe define it inside the MemoryMappedSegment, under the same #if and call it just Segment?

That would lead to a platform specific function AddSegmentAddressRange(MemoryMappedSegment *segment, LoadedModule *module); and all the Mac specific stuff will be contained in _mac files.

What do you think? It's totally possible I miss some details precluding us from doing so.


https://reviews.llvm.org/D35422





More information about the llvm-commits mailing list