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

Jason Molenda via lldb-commits lldb-commits at lists.llvm.org
Thu Nov 9 12:55:10 PST 2023


jasonmolenda 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? 

Another good idea.  Do we get page permissions like that on Linux?  I'm curious what system it would work on.

I tried a full memory coredump on darwin and there ARE some regions that are marked `r` or `rx` and yet have a dirty page.  Some of them are tagged as malloc-metadata so maybe the page protections were flipped to avoid buggy overwriting by the process or something, I didn't look too closely into them, it was only a dozen pages of memory total.  So at least on darwin, if debugserver didn't provide the dirty-pages list for each memory region, it'd probably be indistinguishable by developers who are mostly wanting to get stack+heap with these things.

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


More information about the lldb-commits mailing list