This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 2/3] Trust readonly sections if target has memory protection
- From: Yao Qi <yao at codesourcery dot com>
- To: Eli Zaretskii <eliz at gnu dot org>
- Cc: <gdb-patches at sourceware dot org>
- Date: Fri, 6 Sep 2013 17:06:27 +0800
- Subject: Re: [PATCH 2/3] 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> <1378432920-7731-3-git-send-email-yao at codesourcery dot com> <83siximqmk dot fsf at gnu dot org>
On 09/06/2013 02:05 PM, Eli Zaretskii wrote:
> 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.
>
OK. I re-org the patches and move all doc-related changes into one
patch.
>> > *** 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.
>
The patch below addresses all your comments on doc.
--
Yao (éå)
gdb:
2013-09-06 Yao Qi <yao@codesourcery.com>
* 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 (File): Mention that user has
'set trust-readonly-sections off' to get updated contents if
they are modified. Explain the default option of
"trust-readonly-sections" is "auto".
---
gdb/NEWS | 5 +++++
gdb/doc/gdb.texinfo | 11 +++++++++--
2 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/gdb/NEWS b/gdb/NEWS
index ad97f6f..e60a553 100644
--- a/gdb/NEWS
+++ b/gdb/NEWS
@@ -3,6 +3,11 @@
*** Changes since GDB 7.6
+* The default value of option "trust-readonly-sections" 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.
+
* The "maintenance print objfiles" command now takes an optional regexp.
* The "catch syscall" command now works on arm*-linux* targets.
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index 21250fe..cd7859a 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -16673,12 +16673,19 @@ out of the object file, rather than from the target program.
For some targets (notably embedded ones), this can be a significant
enhancement to debugging performance.
-The default is off.
+@item set trust-readonly-sections auto
+This is the default mode. @value{GDBN} will decide based on the
+target memory protection features whether to read readonly sections
+from object file instead of from the inferior's memory, because the
+contents of the section in the inferior can't change.
@item set trust-readonly-sections off
Tell @value{GDBN} not to trust readonly sections. This means that
the contents of the section might change while the program is running,
-and must therefore be fetched from the target when needed.
+and must therefore be fetched from the target when needed. If you
+modified the code in the target program, you have to
+@code{set trust-readonly-sections off} to guarantee @value{GDBN} reads
+updated contents from the target program instead of object file.
@item show trust-readonly-sections
Show the current setting of trusting readonly sections.
--
1.7.7.6