[Lldb-commits] [PATCH] D87442: [lldb] Show flags for memory regions
Pavel Labath via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Fri Oct 16 05:59:51 PDT 2020
labath added a comment.
In D87442#2332244 <https://reviews.llvm.org/D87442#2332244>, @DavidSpickett wrote:
> If you are wondering, the average number of flags for a Linux hello world's memory regions is 8 so 8 lines of output. Here's an example I had that does madvise.
>
> (lldb) memory region addr
> [0x00007ffff7ed5000-0x00007ffff7fd5000) rw- /dev/zero (deleted)
> flags:
> readable
> writeable
> shared
> may read
> may write
> may execute
> may share
> soft-dirty
> (lldb) n
> (lldb) n (over madvise(addr, len, MADV_DONTFORK);)
> (lldb) memory region addr
> [0x00007ffff7ed5000-0x00007ffff7fd5000) rw- /dev/zero (deleted)
> flags:
> readable
> writeable
> shared
> may read
> may write
> may execute
> may share
> do not copy area on fork
> soft-dirty
>
> I could add this as a test case but it only really adds checking that the region cache is updated which I think is covered already.
Woa, back up. I though you were just going to add the one flag you need right now... :(
I'd like to avoid adding flags we don't have any use for. That way we can decide the best course of action on a per-flag basis, and avoid overfitting any particular platform. Having a flag for whether a region supports memory tagging (and calling that flag `mt`) sounds pretty platform-neutral, but some of the other flags seem very linux specific, and are unlikely to be useful elsewhere...
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D87442/new/
https://reviews.llvm.org/D87442
More information about the lldb-commits
mailing list