From: Eli Zaretskii <eliz@gnu.org>
To: Yao Qi <yao@codesourcery.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH 2/3] Trust readonly sections if target has memory protection
Date: Fri, 06 Sep 2013 06:05:00 -0000 [thread overview]
Message-ID: <83siximqmk.fsf@gnu.org> (raw)
In-Reply-To: <1378432920-7731-3-git-send-email-yao@codesourcery.com>
> From: Yao Qi <yao@codesourcery.com>
> Date: Fri, 6 Sep 2013 10:01:59 +0800
>
> This patch first changes command "trust-readonly-sections" to an
> auto_boolean command, so "auto" means that GDB trusts read-only
> sections if the target has memory protection. Then, this patch adds a
> gdbarch hook method "has_memory_protection". Patch 2/2 is to
> implement the hook method for linux target.
>
> gdb:
>
> 2013-09-06 Yao Qi <yao@codesourcery.com>
>
> * arch-utils.c (default_has_memory_protection): New function.
> * arch-utils.h (default_has_memory_protection): Declaration.
> * gdbarch.sh (has_memory_protection): New hook method.
> * gdbarch.c: Re-generated.
> * gdbarch.h: Re-generated.
> * target.c (trust_readonly): Change type to 'enum auto_boolean'
> and initialize it to 'AUTO_BOOLEAN_AUTO'.
> (trust_readonly_p): New function.
> (memory_xfer_partial_1): Call trust_readonly_p.
> (initialize_targets): Register command
> "trust-readonly-sections" as add_setshow_auto_boolean_cmd.
>
> * NEWS: Describe the default option of
> "trust-readonly-sections" becomes "auto" and the related
> changes.
>
> gdb/doc:
>
> 2013-09-06 Yao Qi <yao@codesourcery.com>
>
> * gdb.texinfo (Files): Explain the default option of
> "trust-readonly-sections" is "auto".
Is it possible NOT to split documentation changes between changesets,
when they are all parts of the same patch series? Reviewing changes
piecemeal like that is extremely inconvenient and error-prone,
especially since you never tell in the beginning that the
documentation changes are split. TIA.
> *** Changes since GDB 7.6
>
> +* The default value of option "trust-readonly-sections" is "auto". GDB
> + trusts the contents of read-only sections from the object file on the
> + GNU/Linux targets.
The second sentence is in contradiction with the first. "Auto" means
GDB decides automatically whether to trust these section; it does not
mean the decision is YES for GNU/Linux and NO otherwise.
> +@item set trust-readonly-sections auto
> +This is the default mode. Tell @value{GDBN} to trust read-only
> +sections on some targets which have memory protection, such as
> +GNU/Linux, because the contents of the section in the target program
> +can't change.
Again, no need to mention one platform here. Such references quickly
become obsolete with time.
> +When this mode is auto, memory reads from readonly sections will be\n\
> +read from the object file if the target has memory protection.\n"),
I would suggest
When this mode is auto, GDB will decide based on the target memory
protection features whether to read readonly sections from object file
instead of from the inferior's memory.
IOW, "auto" means GDB will decide by its own internal logic.
Thanks.
next prev parent reply other threads:[~2013-09-06 6:05 UTC|newest]
Thread overview: 62+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-06 2:03 [PATCH 0/3] " Yao Qi
2013-09-06 2:03 ` [PATCH 2/3] " Yao Qi
2013-09-06 6:05 ` Eli Zaretskii [this message]
2013-09-06 9:07 ` Yao Qi
2013-09-06 9:24 ` Eli Zaretskii
2013-09-06 2:03 ` [PATCH 1/3] set trust-readonly-sections off in test cases Yao Qi
2013-09-06 5:56 ` Eli Zaretskii
2013-09-06 17:23 ` Pedro Alves
2013-09-06 2:03 ` [PATCH 3/3] Linux has memory protection Yao Qi
2013-09-06 5:57 ` [PATCH 0/3] Trust readonly sections if target " Eli Zaretskii
2013-09-06 8:24 ` Yao Qi
2013-09-06 8:45 ` Eli Zaretskii
2013-09-06 13:03 ` Joel Brobecker
2013-09-06 13:27 ` Yao Qi
2013-09-06 13:32 ` Eli Zaretskii
2013-09-06 14:17 ` Pierre Muller
[not found] ` <"000d01ceab0b$d53ae600$7fb0b200$@muller"@ics-cnrs.unistra.fr>
2013-09-06 14:38 ` Eli Zaretskii
2013-09-06 14:52 ` Joel Brobecker
2013-09-06 15:56 ` Eli Zaretskii
2013-09-06 18:10 ` Joel Brobecker
2013-09-06 18:36 ` Eli Zaretskii
2013-09-06 13:00 ` Joel Brobecker
2013-09-08 12:04 ` [PATCH 0/7 V2] " Yao Qi
2013-09-08 12:04 ` [PATCH 1/7] Emit a warning when writing to a readonly section and trust_readonly is true Yao Qi
2013-09-08 15:10 ` Eli Zaretskii
2013-09-08 12:05 ` [PATCH 6/7] Linux has memory protection Yao Qi
2013-09-08 12:05 ` [PATCH 5/7] DOC and NEWS Yao Qi
2013-09-08 12:05 ` [PATCH 2/7] set trust-readonly-sections off in test cases Yao Qi
2013-09-08 12:05 ` [PATCH 7/7] Windows has memory protection Yao Qi
2013-09-08 12:05 ` [PATCH 4/7] Trust readonly sections if target " Yao Qi
2013-09-08 15:13 ` Eli Zaretskii
2013-09-09 7:49 ` Yao Qi
2013-09-09 16:25 ` Eli Zaretskii
2013-09-08 12:05 ` [PATCH 3/7] New function windows_init_abi Yao Qi
2013-09-09 19:16 ` [PATCH 0/7 V2] Trust readonly sections if target has memory protection Mark Kettenis
2013-09-10 4:06 ` Yao Qi
2013-09-12 8:30 ` Yao Qi
2013-09-12 9:49 ` Mark Kettenis
2013-09-13 8:17 ` Yao Qi
2013-09-30 17:50 ` Pedro Alves
2013-09-30 18:08 ` Pedro Alves
2013-10-07 22:29 ` Stan Shebs
2013-10-08 12:18 ` Pedro Alves
2013-10-08 12:47 ` Abid, Hafiz
2013-10-08 13:36 ` tmirza
2013-10-09 2:24 ` Doug Evans
2013-10-23 10:16 ` Yao Qi
2013-10-15 0:44 ` Yao Qi
2013-09-20 2:47 ` [PATCH 0/7 V3] " Yao Qi
2013-09-20 2:47 ` [PATCH 5/7] DOC and NEWS Yao Qi
2013-09-20 8:21 ` Eli Zaretskii
2013-09-20 2:47 ` [PATCH 6/7] Linux has memory protection Yao Qi
2013-09-20 2:47 ` [PATCH 2/7] set trust-readonly-sections off in test cases Yao Qi
2013-09-20 2:47 ` [PATCH 3/7] New function windows_init_abi Yao Qi
2013-09-30 18:23 ` Pedro Alves
2013-10-01 6:47 ` Yao Qi
2013-10-01 9:35 ` Pedro Alves
2013-10-01 13:23 ` Yao Qi
2013-09-20 2:47 ` [PATCH 7/7] Windows has memory protection Yao Qi
2013-09-20 2:47 ` [PATCH 1/7] Emit a query when writing to a readonly section and trust_readonly is true Yao Qi
2013-09-20 2:47 ` [PATCH 4/7] Trust readonly sections if target has memory protection and in remote debugging Yao Qi
2013-09-29 13:51 ` [PATCH 0/7 V3] Trust readonly sections if target has memory protection Yao Qi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83siximqmk.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=gdb-patches@sourceware.org \
--cc=yao@codesourcery.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox