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]

[PATCH 5/7] DOC and NEWS


 -V3: Mention "in remote debugging".

gdb:

2013-09-20  Yao Qi  <yao@codesourcery.com>

	* NEWS: Describe the default option of
	"trust-readonly-sections" becomes "auto" and the related
	changes.

gdb/doc:

2013-09-20  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 |   12 ++++++++++--
 2 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/gdb/NEWS b/gdb/NEWS
index 5eb046b..5a70adc 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".  In
+  remote debugging, 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 a8c854e..a26160e 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -16673,12 +16673,20 @@ 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.  In remote debugging, @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


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