This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 1/3] set trust-readonly-sections off in test cases
- From: Pedro Alves <palves at redhat dot com>
- To: Yao Qi <yao at codesourcery dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Fri, 06 Sep 2013 18:23:21 +0100
- Subject: Re: [PATCH 1/3] set trust-readonly-sections off in test cases
- Authentication-results: sourceware.org; auth=none
- References: <1378432920-7731-1-git-send-email-yao at codesourcery dot com> <1378432920-7731-2-git-send-email-yao at codesourcery dot com>
On 09/06/2013 03:01 AM, Yao Qi wrote:
> In the test cases, if GDB modified code in the inferior, it should
> 'set trust-readonly-sections off' too. Similarly, users has to set it
> off if users modified code for some purpose.
Hmm, I think this is likely to confuse users that actually
do that, a lot.
One idea would be to either warn about, or even disallow user
initiated writes to readonly sections if trust-readonly-sections
is enabled.
But a better one would be to mark a written section (or memory
block/range) as "tainted", and then trust-readonly-sections would
not trust it anymore.
--
Pedro Alves