]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
Add "maint check xml-descriptions" to test builtin xml target descriptions
authorYao Qi <yao.qi@linaro.org>
Thu, 25 May 2017 20:55:32 +0000 (21:55 +0100)
committerYao Qi <yao.qi@linaro.org>
Mon, 10 Jul 2017 11:02:48 +0000 (12:02 +0100)
commitc7a8fd91b89bdd79f831b6b42bb7e2aa0423d425
tree63a512d2c3f5b75ba00e1ea06394a6347b74c08d
parentd1d97c5b3c16038dc4c53cc2eca3dffd6810cc80
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.

v3:
 - Update doc, swap the implementation of operator == and !=,
 - Use filename_completer,
 - Use tilde_expand,

gdb:

2017-07-10  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-10  Yao Qi  <yao.qi@linaro.org>

* gdb.gdb/unittest.exp: Invoke command
"maintenance check xml-descriptions".

gdb/doc:

2017-06-06  Yao Qi  <yao.qi@linaro.org>

* gdb.texinfo (Maintenance Commands): Document command
"maint check xml-descriptions".
gdb/cli/cli-cmds.c
gdb/doc/gdb.texinfo
gdb/gdbcmd.h
gdb/i386-linux-tdep.c
gdb/maint.c
gdb/target-descriptions.c
gdb/target-descriptions.h
gdb/testsuite/gdb.gdb/unittest.exp