diff options
author | Yao Qi <yao.qi@linaro.org> | 2017-07-26 14:55:31 +0100 |
---|---|---|
committer | Yao Qi <yao.qi@linaro.org> | 2017-07-26 14:55:31 +0100 |
commit | 27d41eac62a6a1aa803dfcfba2be61431e7b3d13 (patch) | |
tree | caab5f884290aaeda3202b0795abdc7d0ed6f158 /gdb/doc | |
parent | ea03d0d3c32b22aeddfeb139a4a515f7e5961347 (diff) | |
download | gdb-27d41eac62a6a1aa803dfcfba2be61431e7b3d13.zip gdb-27d41eac62a6a1aa803dfcfba2be61431e7b3d13.tar.gz gdb-27d41eac62a6a1aa803dfcfba2be61431e7b3d13.tar.bz2 |
Add "maint check xml-descriptions" to test builtin xml target descriptions
Now, GDB is able to dynamically create i386-linux target descriptions
from features, instead of using pre-generated target descriptions. These
pre-generated target descriptions are no longer used by GDB (note that
they are still used by GDBserver).
This patch add a new maint command "maint check xml-descriptions" to test
dynamically generated tdesc are identical to these generated from xml files.
gdb:
2017-07-26 Yao Qi <yao.qi@linaro.org>
* cli/cli-cmds.c (maintenancechecklist): New variable.
* gdbcmd.h (maintenancechecklist): Declare it.
* i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
Call i386_linux_read_description with different masks.
* maint.c (maintenance_check_command): New function.
(_initialize_maint_cmds): Call add_prefix_cmd.
* target-descriptions.c (tdesc_reg): override operator != and ==.
(tdesc_type): Likewise.
(tdesc_feature): Likewise.
(target_desc): Likewise.
[GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
(maintenance_check_xml_descriptions): New function.
(_initialize_target_descriptions) Add command "xml-descriptions".
* target-descriptions.h (selftests::record_xml_tdesc): Declare.
gdb/testsuite:
2017-07-26 Yao Qi <yao.qi@linaro.org>
* gdb.gdb/unittest.exp: Invoke command
"maintenance check xml-descriptions".
gdb/doc:
2017-07-26 Yao Qi <yao.qi@linaro.org>
* gdb.texinfo (Maintenance Commands): Document command
"maint check xml-descriptions".
Diffstat (limited to 'gdb/doc')
-rw-r--r-- | gdb/doc/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/doc/gdb.texinfo | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog index e3a68d3..d43ae35 100644 --- a/gdb/doc/ChangeLog +++ b/gdb/doc/ChangeLog @@ -1,5 +1,10 @@ 2017-07-26 Yao Qi <yao.qi@linaro.org> + * gdb.texinfo (Maintenance Commands): Document command + "maint check xml-descriptions". + +2017-07-26 Yao Qi <yao.qi@linaro.org> + * gdb.texinfo (Maintenance Commands): Document optional argument of "maint print c-tdesc". diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index 08a7681..17b4c69 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -34698,6 +34698,11 @@ 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 check xml-descriptions +@item maint check xml-descriptions @var{dir} +Check that the target descriptions dynamically created by @value{GDBN} +equal the descriptions created from XML files found in @var{dir}. + @kindex maint print dummy-frames @item maint print dummy-frames Prints the contents of @value{GDBN}'s internal dummy-frame stack. |