This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 0/7 V2] Trust readonly sections if target has memory protection


On Mon, Sep 30, 2013 at 10:50 AM, Pedro Alves <palves@redhat.com> wrote:
> [...]
> We have similar infrastructure already, in dcache.c -- we use
> it for stack memory nowadays, and if the memory region is marked as
> cacheable.  We used to support caching more than just stack, but
> that was never enabled by default because it may not be safe to
> read memory outside of the range the caller is specifying, because of
> things like memory mapped registers, etc.  (In the case of stack, we assume
> stack is allocated in page chunks, so that dcache never steps on memory is
> should not).  But in cases like disassembly, we're being driven by debug
> info or user input.  As GDB knows upfront the whole range of memory it'll
> be fetching, accessing a bigger chunk upfront, as long as it doesn't
> step out of the range we read piecemeal anyway, should have no effect
> on correctness.

For reference sake,
ISTR prologue parsing being another place where we saw pain (not
often, but painful when it happens).

We also saw paradoxical slowdowns from using trust-readonly.
The culprit was target_section_by_addr.
Should be fixable of course, but heads up.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]