aboutsummaryrefslogtreecommitdiff
path: root/gdb/doc
diff options
context:
space:
mode:
authorYao Qi <yao.qi@linaro.org>2017-07-26 12:03:47 +0100
committerYao Qi <yao.qi@linaro.org>2017-07-26 12:03:47 +0100
commit8e2141c6fba6daea1555e042da9de49ec8b1977d (patch)
treed273c1f083bb0c1814017320201269bf22c59c9d /gdb/doc
parentb468ff4cbf14744d512e464b4be9681d3e0302ad (diff)
downloadgdb-8e2141c6fba6daea1555e042da9de49ec8b1977d.zip
gdb-8e2141c6fba6daea1555e042da9de49ec8b1977d.tar.gz
gdb-8e2141c6fba6daea1555e042da9de49ec8b1977d.tar.bz2
Add optional argument to command "maint prints c-tdesc"
Nowadays, we need two steps to print c files for xml target description, that is, 1) read xml target description in, update the current tdesc, 2) visit the current tdesc, print the c file. It is unnecessary to involve in current tdesc, and some validations in each gdbarch are performed unnecessarily, which will reject some target descriptions if they are missing some mandatory feature. This patch adds an optional argument to "maint print c-tdesc", which is an XML file target description, so that we can combine the two steps above into one step, and don't have to involve in global current tdesc. gdb: 2017-07-26 Yao Qi <yao.qi@linaro.org> * NEWS: Mention it. * features/Makefile (%.c: %.xml): Pass the xml file name to command "maint print c-tdesc". * target-descriptions.c (maint_print_c_tdesc_cmd): Get file name from 'arg'. gdb/doc: 2017-07-26 Yao Qi <yao.qi@linaro.org> * gdb.texinfo (Maintenance Commands): Document optional argument of "maint print c-tdesc".
Diffstat (limited to 'gdb/doc')
-rw-r--r--gdb/doc/ChangeLog5
-rw-r--r--gdb/doc/gdb.texinfo14
2 files changed, 14 insertions, 5 deletions
diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog
index 2a4330b..e3a68d3 100644
--- a/gdb/doc/ChangeLog
+++ b/gdb/doc/ChangeLog
@@ -1,3 +1,8 @@
+2017-07-26 Yao Qi <yao.qi@linaro.org>
+
+ * gdb.texinfo (Maintenance Commands): Document optional
+ argument of "maint print c-tdesc".
+
2017-07-18 Yao Qi <yao.qi@linaro.org>
* gdb.texinfo (Maintenance Commands): Improve the doc to
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index 5f55a67..08a7681 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -34687,12 +34687,16 @@ checksum.
Print the entire architecture configuration. The optional argument
@var{file} names the file where the output goes.
-@kindex maint print c-tdesc
+@kindex maint print c-tdesc @r{[}@var{file}@r{]}
@item maint print c-tdesc
-Print the current target description (@pxref{Target Descriptions}) as
-a C source file. The created source file is built into @value{GDBN}
-when @value{GDBN} is built again. This command is used by developers
-after they add or modify XML target descriptions.
+Print the target description (@pxref{Target Descriptions}) as
+a C source file. By default, the target description is for the current
+target, but if the optional argument @var{file} is provided, that file
+is used to produce the description. The @var{file} should be an XML
+document, of the form described in @ref{Target Description Format}.
+The created source file is built into @value{GDBN} when @value{GDBN} is
+built again. This command is used by developers after they add or
+modify XML target descriptions.
@kindex maint print dummy-frames
@item maint print dummy-frames