This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 0/7 V2] Trust readonly sections if target has memory protection
- From: Pedro Alves <palves at redhat dot com>
- To: Stan Shebs <stanshebs at earthlink dot net>
- Cc: gdb-patches at sourceware dot org
- Date: Tue, 08 Oct 2013 13:18:42 +0100
- Subject: Re: [PATCH 0/7 V2] Trust readonly sections if target has memory protection
- Authentication-results: sourceware.org; auth=none
- References: <1378432920-7731-1-git-send-email-yao at codesourcery dot com> <1378641807-24256-1-git-send-email-yao at codesourcery dot com> <201309091916 dot r89JGbpf009986 at glazunov dot sibelius dot xs4all dot nl> <522E9A8A dot 7040509 at codesourcery dot com> <52317B66 dot 3020602 at codesourcery dot com> <201309120949 dot r8C9nFsJ016506 at glazunov dot sibelius dot xs4all dot nl> <5232C9EC dot 2040707 at codesourcery dot com> <5249B9F9 dot 4030901 at redhat dot com> <5249BE1C dot 5050907 at redhat dot com> <525335C0 dot 8030004 at earthlink dot net>
On 10/07/2013 11:29 PM, Stan Shebs wrote:
> On 9/30/13 11:08 AM, Pedro Alves wrote:
>> On 09/30/2013 06:50 PM, Pedro Alves wrote:
>>
>>> 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.
>>
>> Hmm, wait, I'm having a a dÃjà vu experience. I recalled I have
>> once reviewed a patch that does exactly this. But, I'm not finding
>> it in the tree, or in the archives. Maybe it was a CS local patch
>> that was never pushed?
>>
>
> There are a couple possibilities - for instance there we had a request
> to check that the code underneath a breakpoint had not changed behind
> our backs, or something like that. There was also the check of readonly
> areas for memory_xfer_partial reading from a traceframe, but
> that was your code, and it went into FSF in February 2011. :-)
Hmm, yeah, but not, that's not really what I'm recalling.
I distinctly remember reviewing this for the disassemble command, exactly
as I was suggesting. I now recall better because I also hacked on the
patch while iterating on multiple iterations of patch reviews. The change
was contained to just gdb/disasm.c (or the gross of it at least), IIRC.
Bleh, if we can't find it, we can always rewrite it. :-P.
--
Pedro Alves