[Lldb-commits] [lldb] Centralize the code that figures out which memory ranges to save into core files (PR #71772)

Greg Clayton via lldb-commits lldb-commits at lists.llvm.org
Thu Nov 9 11:46:30 PST 2023


clayborg wrote:

@jasonmolenda I was wondering if we should modify `GetCoreFileSaveRangesDirtyOnly(...)` to try and add all dirty pages and see if any regions have the dirty page info, but if no memory region infos have the dirty pages information, then fall back to adding all memory regions with `write` access. What do you think? This would allow systems to not support dirty pages, but get a more minimal core file saved out. The other option is to add a new `lldb::SaveCoreStyle` enum like `lldb::SaveCoreStyle::eSaveCoreWriteOnly` to save only sections that have write permissions.

Right now we have `eSaveCoreFull` which saves all memory regions that have any valid permissions, `eSaveCoreDirtyOnly` which will currently only save dirty pages if it is supported by the process plugin (ProcessGDBRemove for most people, where `debugserver` supports the page stuff, but `lldb-server` doesn't), and `eSaveCoreStackOnly` which only emits the stacks (where it will use the dirty page info if available and fall back to saving the entire stack range if dirty page support is not available).

https://github.com/llvm/llvm-project/pull/71772


More information about the lldb-commits mailing list