================
@@ -316,6 +323,70 @@ void ProcessElfCore::UpdateBuildIdForNTFileEntries() {
   }
 }
 
+void ProcessElfCore::FinalizeMemoryRegionInfos() {
----------------
thechenli wrote:

Thanks for pointing this out. 

The finalization step is currently needed because program headers are processed 
in one pass, and a `PT_LOAD` can appear before the `PT_NOTE` containing 
`NT_FILE`. It also handles memory-tag information and `NT_FILE` ranges without 
a corresponding `PT_LOAD`.

The containment approach seems slightly different from the earlier @clayborg's 
suggestion to require matching start addresses?

I asked AI to check five production CPU cores containing 19,808 `NT_FILE` 
entries; each entry matched one `PT_LOAD` memory range, and I did not find an 
entry spanning multiple `PT_LOAD`s. Multiple mappings of the same file appeared 
as separate entries with the same pathname. Would you happen to have an example 
or producer where one `NT_FILE` entry spans multiple `PT_LOAD`s? 

https://github.com/llvm/llvm-project/pull/212666
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to