* [PATCH 0/2] [gdb] xml linting
@ 2026-08-26 8:30 Tom de Vries
2026-08-26 8:30 ` [PATCH 1/2] [gdb] Fix xmllint namespace errors Tom de Vries
2026-08-26 8:30 ` [PATCH 2/2] [pre-commit] Check xml files Tom de Vries
0 siblings, 2 replies; 5+ messages in thread
From: Tom de Vries @ 2026-08-26 8:30 UTC (permalink / raw)
To: gdb-patches
This contains two patches.
The first patch fixes a problem found with xmllint [1].
The second patch adds a pre-commit check xml-check (not using xmllint).
[1] https://gnome.pages.gitlab.gnome.org/libxml2/xmllint.html
Tom de Vries (2):
[gdb] Fix xmllint namespace errors
[pre-commit] Check xml files
.pre-commit-config.yaml | 13 +++++++++++++
gdb/features/alpha.xml | 2 +-
gdb/features/microblaze-linux.xml | 2 +-
gdb/features/microblaze-with-stack-protect.xml | 2 +-
gdb/features/microblaze.xml | 2 +-
gdb/features/mips-dsp-linux.xml | 2 +-
gdb/features/mips-linux.xml | 2 +-
gdb/features/mips64-dsp-linux.xml | 2 +-
gdb/features/mips64-linux.xml | 2 +-
gdb/features/nds32.xml | 2 +-
gdb/features/or1k-linux.xml | 2 +-
gdb/features/or1k.xml | 2 +-
gdb/features/rs6000/powerpc-32.xml | 2 +-
gdb/features/rs6000/powerpc-32l.xml | 2 +-
gdb/features/rs6000/powerpc-403.xml | 2 +-
gdb/features/rs6000/powerpc-403gc.xml | 2 +-
gdb/features/rs6000/powerpc-405.xml | 2 +-
gdb/features/rs6000/powerpc-505.xml | 2 +-
gdb/features/rs6000/powerpc-601.xml | 2 +-
gdb/features/rs6000/powerpc-602.xml | 2 +-
gdb/features/rs6000/powerpc-603.xml | 2 +-
gdb/features/rs6000/powerpc-604.xml | 2 +-
gdb/features/rs6000/powerpc-64.xml | 2 +-
gdb/features/rs6000/powerpc-64l.xml | 2 +-
gdb/features/rs6000/powerpc-7400.xml | 2 +-
gdb/features/rs6000/powerpc-750.xml | 2 +-
gdb/features/rs6000/powerpc-860.xml | 2 +-
gdb/features/rs6000/powerpc-altivec32.xml | 2 +-
gdb/features/rs6000/powerpc-altivec32l.xml | 2 +-
gdb/features/rs6000/powerpc-altivec64.xml | 2 +-
gdb/features/rs6000/powerpc-altivec64l.xml | 2 +-
gdb/features/rs6000/powerpc-e500.xml | 2 +-
gdb/features/rs6000/powerpc-e500l.xml | 2 +-
gdb/features/rs6000/powerpc-isa205-32l.xml | 2 +-
gdb/features/rs6000/powerpc-isa205-64l.xml | 2 +-
gdb/features/rs6000/powerpc-isa205-altivec32l.xml | 2 +-
gdb/features/rs6000/powerpc-isa205-altivec64l.xml | 2 +-
.../rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml | 2 +-
.../rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml | 2 +-
gdb/features/rs6000/powerpc-isa205-vsx32l.xml | 2 +-
gdb/features/rs6000/powerpc-isa205-vsx64l.xml | 2 +-
gdb/features/rs6000/powerpc-isa207-htm-vsx32l.xml | 2 +-
gdb/features/rs6000/powerpc-isa207-htm-vsx64l.xml | 2 +-
gdb/features/rs6000/powerpc-isa207-vsx32l.xml | 2 +-
gdb/features/rs6000/powerpc-isa207-vsx64l.xml | 2 +-
gdb/features/rs6000/powerpc-vsx32.xml | 2 +-
gdb/features/rs6000/powerpc-vsx32l.xml | 2 +-
gdb/features/rs6000/powerpc-vsx64.xml | 2 +-
gdb/features/rs6000/powerpc-vsx64l.xml | 2 +-
gdb/features/rs6000/rs6000.xml | 2 +-
gdb/features/rx.xml | 2 +-
gdb/features/s390-gs-linux64.xml | 2 +-
gdb/features/s390-linux32.xml | 2 +-
gdb/features/s390-linux32v1.xml | 2 +-
gdb/features/s390-linux32v2.xml | 2 +-
gdb/features/s390-linux64.xml | 2 +-
gdb/features/s390-linux64v1.xml | 2 +-
gdb/features/s390-linux64v2.xml | 2 +-
gdb/features/s390-te-linux64.xml | 2 +-
gdb/features/s390-tevx-linux64.xml | 2 +-
gdb/features/s390-vx-linux64.xml | 2 +-
gdb/features/s390x-gs-linux64.xml | 2 +-
gdb/features/s390x-linux64.xml | 2 +-
gdb/features/s390x-linux64v1.xml | 2 +-
gdb/features/s390x-linux64v2.xml | 2 +-
gdb/features/s390x-te-linux64.xml | 2 +-
gdb/features/s390x-tevx-linux64.xml | 2 +-
gdb/features/s390x-vx-linux64.xml | 2 +-
gdb/features/sparc/sparc32-solaris.xml | 2 +-
gdb/features/sparc/sparc64-solaris.xml | 2 +-
gdb/features/tic6x-c62x-linux.xml | 2 +-
gdb/features/tic6x-c64x-linux.xml | 2 +-
gdb/features/tic6x-c64xp-linux.xml | 2 +-
gdb/features/z80.xml | 2 +-
gdb/testsuite/gdb.xml/bad-include.xml | 4 +++-
gdb/testsuite/gdb.xml/core-only.xml | 2 +-
gdb/testsuite/gdb.xml/extra-regs.xml | 2 +-
gdb/testsuite/gdb.xml/inc-2.xml | 4 +++-
gdb/testsuite/gdb.xml/includes.xml | 2 +-
gdb/testsuite/gdb.xml/loop.xml | 4 +++-
80 files changed, 98 insertions(+), 79 deletions(-)
base-commit: 63b85fe5d59d1eee20f177b4b6e653ddabdeebf7
--
2.51.0
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/2] [gdb] Fix xmllint namespace errors
2026-08-26 8:30 [PATCH 0/2] [gdb] xml linting Tom de Vries
@ 2026-08-26 8:30 ` Tom de Vries
2026-08-26 10:29 ` Tom de Vries
2026-08-26 8:30 ` [PATCH 2/2] [pre-commit] Check xml files Tom de Vries
1 sibling, 1 reply; 5+ messages in thread
From: Tom de Vries @ 2026-08-26 8:30 UTC (permalink / raw)
To: gdb-patches
I ran xmllint [1] on the xml files in gdb, and ran into:
...
gdb/features/rs6000/powerpc-405.xml:10: namespace error : \
Namespace prefix xi on include is not defined
<xi:include href="power-core.xml"/>
^
gdb/features/rs6000/powerpc-405.xml:11: namespace error : \
Namespace prefix xi on include is not defined
<xi:include href="power-fpu.xml"/>
^
...
While this doesn't cause problems for gdb/libexpat, fixing it seems like a
good idea.
Fix this by an explicit:
...
-<target>
+<target xmlns:xi="http://www.w3.org/2001/XInclude">
...
After fixing this, all that remains is:
...
$ for f in $(find gdb -type f -name "*.xml"); do xmllint -noout $f; done
gdb/testsuite/gdb.xml/tdesc-bogus.xml:4: parser error : \
Premature end of data in tag target line 3
^
...
[1] https://gnome.pages.gitlab.gnome.org/libxml2/xmllint.html
---
gdb/features/alpha.xml | 2 +-
gdb/features/microblaze-linux.xml | 2 +-
gdb/features/microblaze-with-stack-protect.xml | 2 +-
gdb/features/microblaze.xml | 2 +-
gdb/features/mips-dsp-linux.xml | 2 +-
gdb/features/mips-linux.xml | 2 +-
gdb/features/mips64-dsp-linux.xml | 2 +-
gdb/features/mips64-linux.xml | 2 +-
gdb/features/nds32.xml | 2 +-
gdb/features/or1k-linux.xml | 2 +-
gdb/features/or1k.xml | 2 +-
gdb/features/rs6000/powerpc-32.xml | 2 +-
gdb/features/rs6000/powerpc-32l.xml | 2 +-
gdb/features/rs6000/powerpc-403.xml | 2 +-
gdb/features/rs6000/powerpc-403gc.xml | 2 +-
gdb/features/rs6000/powerpc-405.xml | 2 +-
gdb/features/rs6000/powerpc-505.xml | 2 +-
gdb/features/rs6000/powerpc-601.xml | 2 +-
gdb/features/rs6000/powerpc-602.xml | 2 +-
gdb/features/rs6000/powerpc-603.xml | 2 +-
gdb/features/rs6000/powerpc-604.xml | 2 +-
gdb/features/rs6000/powerpc-64.xml | 2 +-
gdb/features/rs6000/powerpc-64l.xml | 2 +-
gdb/features/rs6000/powerpc-7400.xml | 2 +-
gdb/features/rs6000/powerpc-750.xml | 2 +-
gdb/features/rs6000/powerpc-860.xml | 2 +-
gdb/features/rs6000/powerpc-altivec32.xml | 2 +-
gdb/features/rs6000/powerpc-altivec32l.xml | 2 +-
gdb/features/rs6000/powerpc-altivec64.xml | 2 +-
gdb/features/rs6000/powerpc-altivec64l.xml | 2 +-
gdb/features/rs6000/powerpc-e500.xml | 2 +-
gdb/features/rs6000/powerpc-e500l.xml | 2 +-
gdb/features/rs6000/powerpc-isa205-32l.xml | 2 +-
gdb/features/rs6000/powerpc-isa205-64l.xml | 2 +-
gdb/features/rs6000/powerpc-isa205-altivec32l.xml | 2 +-
gdb/features/rs6000/powerpc-isa205-altivec64l.xml | 2 +-
gdb/features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml | 2 +-
gdb/features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml | 2 +-
gdb/features/rs6000/powerpc-isa205-vsx32l.xml | 2 +-
gdb/features/rs6000/powerpc-isa205-vsx64l.xml | 2 +-
gdb/features/rs6000/powerpc-isa207-htm-vsx32l.xml | 2 +-
gdb/features/rs6000/powerpc-isa207-htm-vsx64l.xml | 2 +-
gdb/features/rs6000/powerpc-isa207-vsx32l.xml | 2 +-
gdb/features/rs6000/powerpc-isa207-vsx64l.xml | 2 +-
gdb/features/rs6000/powerpc-vsx32.xml | 2 +-
gdb/features/rs6000/powerpc-vsx32l.xml | 2 +-
gdb/features/rs6000/powerpc-vsx64.xml | 2 +-
gdb/features/rs6000/powerpc-vsx64l.xml | 2 +-
gdb/features/rs6000/rs6000.xml | 2 +-
gdb/features/rx.xml | 2 +-
gdb/features/s390-gs-linux64.xml | 2 +-
gdb/features/s390-linux32.xml | 2 +-
gdb/features/s390-linux32v1.xml | 2 +-
gdb/features/s390-linux32v2.xml | 2 +-
gdb/features/s390-linux64.xml | 2 +-
gdb/features/s390-linux64v1.xml | 2 +-
gdb/features/s390-linux64v2.xml | 2 +-
gdb/features/s390-te-linux64.xml | 2 +-
gdb/features/s390-tevx-linux64.xml | 2 +-
gdb/features/s390-vx-linux64.xml | 2 +-
gdb/features/s390x-gs-linux64.xml | 2 +-
gdb/features/s390x-linux64.xml | 2 +-
gdb/features/s390x-linux64v1.xml | 2 +-
gdb/features/s390x-linux64v2.xml | 2 +-
gdb/features/s390x-te-linux64.xml | 2 +-
gdb/features/s390x-tevx-linux64.xml | 2 +-
gdb/features/s390x-vx-linux64.xml | 2 +-
gdb/features/sparc/sparc32-solaris.xml | 2 +-
gdb/features/sparc/sparc64-solaris.xml | 2 +-
gdb/features/tic6x-c62x-linux.xml | 2 +-
gdb/features/tic6x-c64x-linux.xml | 2 +-
gdb/features/tic6x-c64xp-linux.xml | 2 +-
gdb/features/z80.xml | 2 +-
gdb/testsuite/gdb.xml/bad-include.xml | 4 +++-
gdb/testsuite/gdb.xml/core-only.xml | 2 +-
| 2 +-
gdb/testsuite/gdb.xml/inc-2.xml | 4 +++-
gdb/testsuite/gdb.xml/includes.xml | 2 +-
gdb/testsuite/gdb.xml/loop.xml | 4 +++-
79 files changed, 85 insertions(+), 79 deletions(-)
diff --git a/gdb/features/alpha.xml b/gdb/features/alpha.xml
index 8ede1f404e5..46ae2078d91 100644
--- a/gdb/features/alpha.xml
+++ b/gdb/features/alpha.xml
@@ -6,6 +6,6 @@
notice and this notice are preserved. -->
<!DOCTYPE feature SYSTEM "gdb-target.dtd">
-<target version="1.0">
+<target version="1.0" xmlns:xi="http://www.w3.org/2001/XInclude">
<xi:include href="alpha-core.xml"/>
</target>
diff --git a/gdb/features/microblaze-linux.xml b/gdb/features/microblaze-linux.xml
index 06945af08dd..f0a59aaddd2 100644
--- a/gdb/features/microblaze-linux.xml
+++ b/gdb/features/microblaze-linux.xml
@@ -6,7 +6,7 @@
notice and this notice are preserved. -->
<!DOCTYPE target SYSTEM "gdb-target.dtd">
-<target>
+<target xmlns:xi="http://www.w3.org/2001/XInclude">
<architecture>microblaze</architecture>
<osabi>GNU/Linux</osabi>
<xi:include href="microblaze-core.xml"/>
diff --git a/gdb/features/microblaze-with-stack-protect.xml b/gdb/features/microblaze-with-stack-protect.xml
index 524ab9f7adb..6ebc5c608fa 100644
--- a/gdb/features/microblaze-with-stack-protect.xml
+++ b/gdb/features/microblaze-with-stack-protect.xml
@@ -6,7 +6,7 @@
notice and this notice are preserved. -->
<!DOCTYPE target SYSTEM "gdb-target.dtd">
-<target>
+<target xmlns:xi="http://www.w3.org/2001/XInclude">
<xi:include href="microblaze-core.xml"/>
<xi:include href="microblaze-stack-protect.xml"/>
</target>
diff --git a/gdb/features/microblaze.xml b/gdb/features/microblaze.xml
index 93554b295ed..e13b9cd8570 100644
--- a/gdb/features/microblaze.xml
+++ b/gdb/features/microblaze.xml
@@ -6,6 +6,6 @@
notice and this notice are preserved. -->
<!DOCTYPE target SYSTEM "gdb-target.dtd">
-<target>
+<target xmlns:xi="http://www.w3.org/2001/XInclude">
<xi:include href="microblaze-core.xml"/>
</target>
diff --git a/gdb/features/mips-dsp-linux.xml b/gdb/features/mips-dsp-linux.xml
index 166d322f746..0247b08672b 100644
--- a/gdb/features/mips-dsp-linux.xml
+++ b/gdb/features/mips-dsp-linux.xml
@@ -6,7 +6,7 @@
notice and this notice are preserved. -->
<!DOCTYPE target SYSTEM "gdb-target.dtd">
-<target>
+<target xmlns:xi="http://www.w3.org/2001/XInclude">
<architecture>mips</architecture>
<osabi>GNU/Linux</osabi>
<xi:include href="mips-cpu.xml"/>
diff --git a/gdb/features/mips-linux.xml b/gdb/features/mips-linux.xml
index f24c656d93b..d8e8b2a0c5a 100644
--- a/gdb/features/mips-linux.xml
+++ b/gdb/features/mips-linux.xml
@@ -6,7 +6,7 @@
notice and this notice are preserved. -->
<!DOCTYPE target SYSTEM "gdb-target.dtd">
-<target>
+<target xmlns:xi="http://www.w3.org/2001/XInclude">
<architecture>mips</architecture>
<osabi>GNU/Linux</osabi>
<xi:include href="mips-cpu.xml"/>
diff --git a/gdb/features/mips64-dsp-linux.xml b/gdb/features/mips64-dsp-linux.xml
index 1568ced003b..9062b730619 100644
--- a/gdb/features/mips64-dsp-linux.xml
+++ b/gdb/features/mips64-dsp-linux.xml
@@ -6,7 +6,7 @@
notice and this notice are preserved. -->
<!DOCTYPE target SYSTEM "gdb-target.dtd">
-<target>
+<target xmlns:xi="http://www.w3.org/2001/XInclude">
<architecture>mips</architecture>
<osabi>GNU/Linux</osabi>
<xi:include href="mips64-cpu.xml"/>
diff --git a/gdb/features/mips64-linux.xml b/gdb/features/mips64-linux.xml
index 72022c17d32..d3dcf493892 100644
--- a/gdb/features/mips64-linux.xml
+++ b/gdb/features/mips64-linux.xml
@@ -6,7 +6,7 @@
notice and this notice are preserved. -->
<!DOCTYPE target SYSTEM "gdb-target.dtd">
-<target>
+<target xmlns:xi="http://www.w3.org/2001/XInclude">
<architecture>mips</architecture>
<osabi>GNU/Linux</osabi>
<xi:include href="mips64-cpu.xml"/>
diff --git a/gdb/features/nds32.xml b/gdb/features/nds32.xml
index 6b9d3132ee3..b90b60532a7 100644
--- a/gdb/features/nds32.xml
+++ b/gdb/features/nds32.xml
@@ -6,7 +6,7 @@
notice and this notice are preserved. -->
<!DOCTYPE target SYSTEM "gdb-target.dtd">
-<target>
+<target xmlns:xi="http://www.w3.org/2001/XInclude">
<architecture>nds32</architecture>
<xi:include href="nds32-core.xml"/>
<xi:include href="nds32-fpu.xml"/>
diff --git a/gdb/features/or1k-linux.xml b/gdb/features/or1k-linux.xml
index 40424ec3106..bb9c1f7cdbb 100644
--- a/gdb/features/or1k-linux.xml
+++ b/gdb/features/or1k-linux.xml
@@ -6,7 +6,7 @@
notice and this notice are preserved. -->
<!DOCTYPE target SYSTEM "gdb-target.dtd">
-<target>
+<target xmlns:xi="http://www.w3.org/2001/XInclude">
<architecture>or1k</architecture>
<osabi>GNU/Linux</osabi>
<xi:include href="or1k-core.xml"/>
diff --git a/gdb/features/or1k.xml b/gdb/features/or1k.xml
index f9bb4afe584..973b760cac1 100644
--- a/gdb/features/or1k.xml
+++ b/gdb/features/or1k.xml
@@ -6,7 +6,7 @@
notice and this notice are preserved. -->
<!DOCTYPE target SYSTEM "gdb-target.dtd">
-<target>
+<target xmlns:xi="http://www.w3.org/2001/XInclude">
<architecture>or1k</architecture>
<xi:include href="or1k-core.xml"/>
</target>
diff --git a/gdb/features/rs6000/powerpc-32.xml b/gdb/features/rs6000/powerpc-32.xml
index 5d920c9b1e9..a296a4580c7 100644
--- a/gdb/features/rs6000/powerpc-32.xml
+++ b/gdb/features/rs6000/powerpc-32.xml
@@ -9,7 +9,7 @@
view of the PowerPC. -->
<!DOCTYPE target SYSTEM "gdb-target.dtd">
-<target>
+<target xmlns:xi="http://www.w3.org/2001/XInclude">
<architecture>powerpc:common</architecture>
<xi:include href="power-core.xml"/>
<xi:include href="power-fpu.xml"/>
diff --git a/gdb/features/rs6000/powerpc-32l.xml b/gdb/features/rs6000/powerpc-32l.xml
index 7250b3c8c63..613ceb2b5a1 100644
--- a/gdb/features/rs6000/powerpc-32l.xml
+++ b/gdb/features/rs6000/powerpc-32l.xml
@@ -9,7 +9,7 @@
view of the PowerPC. Includes Linux-only special "registers". -->
<!DOCTYPE target SYSTEM "gdb-target.dtd">
-<target>
+<target xmlns:xi="http://www.w3.org/2001/XInclude">
<architecture>powerpc:common</architecture>
<xi:include href="power-core.xml"/>
<xi:include href="power-fpu.xml"/>
diff --git a/gdb/features/rs6000/powerpc-403.xml b/gdb/features/rs6000/powerpc-403.xml
index 886da764c94..3a8a2b373e0 100644
--- a/gdb/features/rs6000/powerpc-403.xml
+++ b/gdb/features/rs6000/powerpc-403.xml
@@ -6,7 +6,7 @@
notice and this notice are preserved. -->
<!DOCTYPE target SYSTEM "gdb-target.dtd">
-<target>
+<target xmlns:xi="http://www.w3.org/2001/XInclude">
<xi:include href="power-core.xml"/>
<xi:include href="power-fpu.xml"/>
<xi:include href="power-oea.xml"/>
diff --git a/gdb/features/rs6000/powerpc-403gc.xml b/gdb/features/rs6000/powerpc-403gc.xml
index 4a0b35383fd..b077a213fed 100644
--- a/gdb/features/rs6000/powerpc-403gc.xml
+++ b/gdb/features/rs6000/powerpc-403gc.xml
@@ -6,7 +6,7 @@
notice and this notice are preserved. -->
<!DOCTYPE target SYSTEM "gdb-target.dtd">
-<target>
+<target xmlns:xi="http://www.w3.org/2001/XInclude">
<xi:include href="power-core.xml"/>
<xi:include href="power-fpu.xml"/>
<xi:include href="power-oea.xml"/>
diff --git a/gdb/features/rs6000/powerpc-405.xml b/gdb/features/rs6000/powerpc-405.xml
index 674c4e83441..da3c6ee62b9 100644
--- a/gdb/features/rs6000/powerpc-405.xml
+++ b/gdb/features/rs6000/powerpc-405.xml
@@ -6,7 +6,7 @@
notice and this notice are preserved. -->
<!DOCTYPE target SYSTEM "gdb-target.dtd">
-<target>
+<target xmlns:xi="http://www.w3.org/2001/XInclude">
<xi:include href="power-core.xml"/>
<xi:include href="power-fpu.xml"/>
diff --git a/gdb/features/rs6000/powerpc-505.xml b/gdb/features/rs6000/powerpc-505.xml
index cfa8dfdfc9b..8620bb639a5 100644
--- a/gdb/features/rs6000/powerpc-505.xml
+++ b/gdb/features/rs6000/powerpc-505.xml
@@ -6,7 +6,7 @@
notice and this notice are preserved. -->
<!DOCTYPE target SYSTEM "gdb-target.dtd">
-<target>
+<target xmlns:xi="http://www.w3.org/2001/XInclude">
<xi:include href="power-core.xml"/>
<xi:include href="power-fpu.xml"/>
<xi:include href="power-oea.xml"/>
diff --git a/gdb/features/rs6000/powerpc-601.xml b/gdb/features/rs6000/powerpc-601.xml
index c13560272ca..7ca747243d2 100644
--- a/gdb/features/rs6000/powerpc-601.xml
+++ b/gdb/features/rs6000/powerpc-601.xml
@@ -9,7 +9,7 @@
user-level SPR's. -->
<!DOCTYPE target SYSTEM "gdb-target.dtd">
-<target>
+<target xmlns:xi="http://www.w3.org/2001/XInclude">
<!-- This description is slightly different from the standard
org.gnu.gdb.power.core, to accommodate mq. -->
<feature name="org.gnu.gdb.power.core">
diff --git a/gdb/features/rs6000/powerpc-602.xml b/gdb/features/rs6000/powerpc-602.xml
index dd366c1e7f5..66dc888084b 100644
--- a/gdb/features/rs6000/powerpc-602.xml
+++ b/gdb/features/rs6000/powerpc-602.xml
@@ -6,7 +6,7 @@
notice and this notice are preserved. -->
<!DOCTYPE target SYSTEM "gdb-target.dtd">
-<target>
+<target xmlns:xi="http://www.w3.org/2001/XInclude">
<xi:include href="power-core.xml"/>
<xi:include href="power-fpu.xml"/>
<xi:include href="power-oea.xml"/>
diff --git a/gdb/features/rs6000/powerpc-603.xml b/gdb/features/rs6000/powerpc-603.xml
index 524111fb0b1..2d4914d2aa9 100644
--- a/gdb/features/rs6000/powerpc-603.xml
+++ b/gdb/features/rs6000/powerpc-603.xml
@@ -8,7 +8,7 @@
<!-- PowerPC 603 or 603e. -->
<!DOCTYPE target SYSTEM "gdb-target.dtd">
-<target>
+<target xmlns:xi="http://www.w3.org/2001/XInclude">
<xi:include href="power-core.xml"/>
<xi:include href="power-fpu.xml"/>
<xi:include href="power-oea.xml"/>
diff --git a/gdb/features/rs6000/powerpc-604.xml b/gdb/features/rs6000/powerpc-604.xml
index 35586ee7471..664a9043e6c 100644
--- a/gdb/features/rs6000/powerpc-604.xml
+++ b/gdb/features/rs6000/powerpc-604.xml
@@ -8,7 +8,7 @@
<!-- PowerPC 604 or 604e. -->
<!DOCTYPE target SYSTEM "gdb-target.dtd">
-<target>
+<target xmlns:xi="http://www.w3.org/2001/XInclude">
<xi:include href="power-core.xml"/>
<xi:include href="power-fpu.xml"/>
<xi:include href="power-oea.xml"/>
diff --git a/gdb/features/rs6000/powerpc-64.xml b/gdb/features/rs6000/powerpc-64.xml
index 1c1b7f14194..ad17dc0bd57 100644
--- a/gdb/features/rs6000/powerpc-64.xml
+++ b/gdb/features/rs6000/powerpc-64.xml
@@ -9,7 +9,7 @@
view of the PowerPC. -->
<!DOCTYPE target SYSTEM "gdb-target.dtd">
-<target>
+<target xmlns:xi="http://www.w3.org/2001/XInclude">
<architecture>powerpc:common64</architecture>
<xi:include href="power64-core.xml"/>
<xi:include href="power-fpu.xml"/>
diff --git a/gdb/features/rs6000/powerpc-64l.xml b/gdb/features/rs6000/powerpc-64l.xml
index 358f89604a5..792fcd0e55e 100644
--- a/gdb/features/rs6000/powerpc-64l.xml
+++ b/gdb/features/rs6000/powerpc-64l.xml
@@ -9,7 +9,7 @@
view of the PowerPC. Includes Linux-only special "registers". -->
<!DOCTYPE target SYSTEM "gdb-target.dtd">
-<target>
+<target xmlns:xi="http://www.w3.org/2001/XInclude">
<architecture>powerpc:common64</architecture>
<xi:include href="power64-core.xml"/>
<xi:include href="power-fpu.xml"/>
diff --git a/gdb/features/rs6000/powerpc-7400.xml b/gdb/features/rs6000/powerpc-7400.xml
index e7a41a82feb..ba42e84d57d 100644
--- a/gdb/features/rs6000/powerpc-7400.xml
+++ b/gdb/features/rs6000/powerpc-7400.xml
@@ -6,7 +6,7 @@
notice and this notice are preserved. -->
<!DOCTYPE target SYSTEM "gdb-target.dtd">
-<target>
+<target xmlns:xi="http://www.w3.org/2001/XInclude">
<xi:include href="power-core.xml"/>
<xi:include href="power-fpu.xml"/>
<xi:include href="power-oea.xml"/>
diff --git a/gdb/features/rs6000/powerpc-750.xml b/gdb/features/rs6000/powerpc-750.xml
index 96088952804..1815f0323f7 100644
--- a/gdb/features/rs6000/powerpc-750.xml
+++ b/gdb/features/rs6000/powerpc-750.xml
@@ -8,7 +8,7 @@
<!-- PowerPC 750 or 740. -->
<!DOCTYPE target SYSTEM "gdb-target.dtd">
-<target>
+<target xmlns:xi="http://www.w3.org/2001/XInclude">
<xi:include href="power-core.xml"/>
<xi:include href="power-fpu.xml"/>
<xi:include href="power-oea.xml"/>
diff --git a/gdb/features/rs6000/powerpc-860.xml b/gdb/features/rs6000/powerpc-860.xml
index 1dde3b95f2d..5f17abd8cd4 100644
--- a/gdb/features/rs6000/powerpc-860.xml
+++ b/gdb/features/rs6000/powerpc-860.xml
@@ -8,7 +8,7 @@
<!-- PowerPC 860 or 850. -->
<!DOCTYPE target SYSTEM "gdb-target.dtd">
-<target>
+<target xmlns:xi="http://www.w3.org/2001/XInclude">
<xi:include href="power-core.xml"/>
<xi:include href="power-fpu.xml"/>
<xi:include href="power-oea.xml"/>
diff --git a/gdb/features/rs6000/powerpc-altivec32.xml b/gdb/features/rs6000/powerpc-altivec32.xml
index 7d0485deddc..b69efa88586 100644
--- a/gdb/features/rs6000/powerpc-altivec32.xml
+++ b/gdb/features/rs6000/powerpc-altivec32.xml
@@ -9,7 +9,7 @@
view of the PowerPC. Includes AltiVec vector registers. -->
<!DOCTYPE target SYSTEM "gdb-target.dtd">
-<target>
+<target xmlns:xi="http://www.w3.org/2001/XInclude">
<architecture>powerpc:common</architecture>
<xi:include href="power-core.xml"/>
<xi:include href="power-fpu.xml"/>
diff --git a/gdb/features/rs6000/powerpc-altivec32l.xml b/gdb/features/rs6000/powerpc-altivec32l.xml
index 68c7cad2cde..f3c1232789f 100644
--- a/gdb/features/rs6000/powerpc-altivec32l.xml
+++ b/gdb/features/rs6000/powerpc-altivec32l.xml
@@ -10,7 +10,7 @@
vector registers. -->
<!DOCTYPE target SYSTEM "gdb-target.dtd">
-<target>
+<target xmlns:xi="http://www.w3.org/2001/XInclude">
<architecture>powerpc:common</architecture>
<xi:include href="power-core.xml"/>
<xi:include href="power-fpu.xml"/>
diff --git a/gdb/features/rs6000/powerpc-altivec64.xml b/gdb/features/rs6000/powerpc-altivec64.xml
index 204014d2566..c7eae3d61c4 100644
--- a/gdb/features/rs6000/powerpc-altivec64.xml
+++ b/gdb/features/rs6000/powerpc-altivec64.xml
@@ -9,7 +9,7 @@
view of the PowerPC. Includes AltiVec vector registers. -->
<!DOCTYPE target SYSTEM "gdb-target.dtd">
-<target>
+<target xmlns:xi="http://www.w3.org/2001/XInclude">
<architecture>powerpc:common64</architecture>
<xi:include href="power64-core.xml"/>
<xi:include href="power-fpu.xml"/>
diff --git a/gdb/features/rs6000/powerpc-altivec64l.xml b/gdb/features/rs6000/powerpc-altivec64l.xml
index 97cf2184d02..aa93b4aa935 100644
--- a/gdb/features/rs6000/powerpc-altivec64l.xml
+++ b/gdb/features/rs6000/powerpc-altivec64l.xml
@@ -10,7 +10,7 @@
vector registers. -->
<!DOCTYPE target SYSTEM "gdb-target.dtd">
-<target>
+<target xmlns:xi="http://www.w3.org/2001/XInclude">
<architecture>powerpc:common64</architecture>
<xi:include href="power64-core.xml"/>
<xi:include href="power-fpu.xml"/>
diff --git a/gdb/features/rs6000/powerpc-e500.xml b/gdb/features/rs6000/powerpc-e500.xml
index da8e5fff0ff..2b033549482 100644
--- a/gdb/features/rs6000/powerpc-e500.xml
+++ b/gdb/features/rs6000/powerpc-e500.xml
@@ -6,7 +6,7 @@
notice and this notice are preserved. -->
<!DOCTYPE target SYSTEM "gdb-target.dtd">
-<target>
+<target xmlns:xi="http://www.w3.org/2001/XInclude">
<architecture>powerpc:e500</architecture>
<xi:include href="power-core.xml"/>
<xi:include href="power-spe.xml"/>
diff --git a/gdb/features/rs6000/powerpc-e500l.xml b/gdb/features/rs6000/powerpc-e500l.xml
index 50d990ab140..972dd83c2f6 100644
--- a/gdb/features/rs6000/powerpc-e500l.xml
+++ b/gdb/features/rs6000/powerpc-e500l.xml
@@ -6,7 +6,7 @@
notice and this notice are preserved. -->
<!DOCTYPE target SYSTEM "gdb-target.dtd">
-<target>
+<target xmlns:xi="http://www.w3.org/2001/XInclude">
<architecture>powerpc:e500</architecture>
<xi:include href="power-core.xml"/>
<xi:include href="power-spe.xml"/>
diff --git a/gdb/features/rs6000/powerpc-isa205-32l.xml b/gdb/features/rs6000/powerpc-isa205-32l.xml
index 637dfb2e173..9b4c36a8943 100644
--- a/gdb/features/rs6000/powerpc-isa205-32l.xml
+++ b/gdb/features/rs6000/powerpc-isa205-32l.xml
@@ -9,7 +9,7 @@
view of the PowerPC. Includes Linux-only special "registers". -->
<!DOCTYPE target SYSTEM "gdb-target.dtd">
-<target>
+<target xmlns:xi="http://www.w3.org/2001/XInclude">
<architecture>powerpc:common</architecture>
<xi:include href="power-core.xml"/>
<xi:include href="power-fpu-isa205.xml"/>
diff --git a/gdb/features/rs6000/powerpc-isa205-64l.xml b/gdb/features/rs6000/powerpc-isa205-64l.xml
index 873ba4218d1..a36d83e5707 100644
--- a/gdb/features/rs6000/powerpc-isa205-64l.xml
+++ b/gdb/features/rs6000/powerpc-isa205-64l.xml
@@ -9,7 +9,7 @@
view of the PowerPC. Includes Linux-only special "registers". -->
<!DOCTYPE target SYSTEM "gdb-target.dtd">
-<target>
+<target xmlns:xi="http://www.w3.org/2001/XInclude">
<architecture>powerpc:common64</architecture>
<xi:include href="power64-core.xml"/>
<xi:include href="power-fpu-isa205.xml"/>
diff --git a/gdb/features/rs6000/powerpc-isa205-altivec32l.xml b/gdb/features/rs6000/powerpc-isa205-altivec32l.xml
index 8c979874a52..88d04a01904 100644
--- a/gdb/features/rs6000/powerpc-isa205-altivec32l.xml
+++ b/gdb/features/rs6000/powerpc-isa205-altivec32l.xml
@@ -10,7 +10,7 @@
vector registers. -->
<!DOCTYPE target SYSTEM "gdb-target.dtd">
-<target>
+<target xmlns:xi="http://www.w3.org/2001/XInclude">
<architecture>powerpc:common</architecture>
<xi:include href="power-core.xml"/>
<xi:include href="power-fpu-isa205.xml"/>
diff --git a/gdb/features/rs6000/powerpc-isa205-altivec64l.xml b/gdb/features/rs6000/powerpc-isa205-altivec64l.xml
index 72e70484429..b14c5652d5f 100644
--- a/gdb/features/rs6000/powerpc-isa205-altivec64l.xml
+++ b/gdb/features/rs6000/powerpc-isa205-altivec64l.xml
@@ -10,7 +10,7 @@
vector registers. -->
<!DOCTYPE target SYSTEM "gdb-target.dtd">
-<target>
+<target xmlns:xi="http://www.w3.org/2001/XInclude">
<architecture>powerpc:common64</architecture>
<xi:include href="power64-core.xml"/>
<xi:include href="power-fpu-isa205.xml"/>
diff --git a/gdb/features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml b/gdb/features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml
index 45c51947888..f1513a623f8 100644
--- a/gdb/features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml
+++ b/gdb/features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml
@@ -6,7 +6,7 @@
notice and this notice are preserved. -->
<!DOCTYPE target SYSTEM "gdb-target.dtd">
-<target>
+<target xmlns:xi="http://www.w3.org/2001/XInclude">
<architecture>powerpc:common</architecture>
<xi:include href="power-core.xml"/>
<xi:include href="power-fpu-isa205.xml"/>
diff --git a/gdb/features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml b/gdb/features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml
index 090acb450dd..b455d2ce1c8 100644
--- a/gdb/features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml
+++ b/gdb/features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml
@@ -6,7 +6,7 @@
notice and this notice are preserved. -->
<!DOCTYPE target SYSTEM "gdb-target.dtd">
-<target>
+<target xmlns:xi="http://www.w3.org/2001/XInclude">
<architecture>powerpc:common64</architecture>
<xi:include href="power64-core.xml"/>
<xi:include href="power-fpu-isa205.xml"/>
diff --git a/gdb/features/rs6000/powerpc-isa205-vsx32l.xml b/gdb/features/rs6000/powerpc-isa205-vsx32l.xml
index c4a15e5ef4c..c37663d1105 100644
--- a/gdb/features/rs6000/powerpc-isa205-vsx32l.xml
+++ b/gdb/features/rs6000/powerpc-isa205-vsx32l.xml
@@ -10,7 +10,7 @@
and VSX vector registers. -->
<!DOCTYPE target SYSTEM "gdb-target.dtd">
-<target>
+<target xmlns:xi="http://www.w3.org/2001/XInclude">
<architecture>powerpc:common</architecture>
<xi:include href="power-core.xml"/>
<xi:include href="power-fpu-isa205.xml"/>
diff --git a/gdb/features/rs6000/powerpc-isa205-vsx64l.xml b/gdb/features/rs6000/powerpc-isa205-vsx64l.xml
index 621c9073f24..ac00f3a5584 100644
--- a/gdb/features/rs6000/powerpc-isa205-vsx64l.xml
+++ b/gdb/features/rs6000/powerpc-isa205-vsx64l.xml
@@ -10,7 +10,7 @@
and VSX vector registers. -->
<!DOCTYPE target SYSTEM "gdb-target.dtd">
-<target>
+<target xmlns:xi="http://www.w3.org/2001/XInclude">
<architecture>powerpc:common64</architecture>
<xi:include href="power64-core.xml"/>
<xi:include href="power-fpu-isa205.xml"/>
diff --git a/gdb/features/rs6000/powerpc-isa207-htm-vsx32l.xml b/gdb/features/rs6000/powerpc-isa207-htm-vsx32l.xml
index 1025a620b9a..e360ea5b918 100644
--- a/gdb/features/rs6000/powerpc-isa207-htm-vsx32l.xml
+++ b/gdb/features/rs6000/powerpc-isa207-htm-vsx32l.xml
@@ -6,7 +6,7 @@
notice and this notice are preserved. -->
<!DOCTYPE target SYSTEM "gdb-target.dtd">
-<target>
+<target xmlns:xi="http://www.w3.org/2001/XInclude">
<architecture>powerpc:common</architecture>
<xi:include href="power-core.xml"/>
<xi:include href="power-fpu-isa205.xml"/>
diff --git a/gdb/features/rs6000/powerpc-isa207-htm-vsx64l.xml b/gdb/features/rs6000/powerpc-isa207-htm-vsx64l.xml
index 6f94734c03c..bf7ee85e369 100644
--- a/gdb/features/rs6000/powerpc-isa207-htm-vsx64l.xml
+++ b/gdb/features/rs6000/powerpc-isa207-htm-vsx64l.xml
@@ -6,7 +6,7 @@
notice and this notice are preserved. -->
<!DOCTYPE target SYSTEM "gdb-target.dtd">
-<target>
+<target xmlns:xi="http://www.w3.org/2001/XInclude">
<architecture>powerpc:common64</architecture>
<xi:include href="power64-core.xml"/>
<xi:include href="power-fpu-isa205.xml"/>
diff --git a/gdb/features/rs6000/powerpc-isa207-vsx32l.xml b/gdb/features/rs6000/powerpc-isa207-vsx32l.xml
index cc7d5388949..9314aa752a2 100644
--- a/gdb/features/rs6000/powerpc-isa207-vsx32l.xml
+++ b/gdb/features/rs6000/powerpc-isa207-vsx32l.xml
@@ -6,7 +6,7 @@
notice and this notice are preserved. -->
<!DOCTYPE target SYSTEM "gdb-target.dtd">
-<target>
+<target xmlns:xi="http://www.w3.org/2001/XInclude">
<architecture>powerpc:common</architecture>
<xi:include href="power-core.xml"/>
<xi:include href="power-fpu-isa205.xml"/>
diff --git a/gdb/features/rs6000/powerpc-isa207-vsx64l.xml b/gdb/features/rs6000/powerpc-isa207-vsx64l.xml
index 181aff6349b..115208dbb0b 100644
--- a/gdb/features/rs6000/powerpc-isa207-vsx64l.xml
+++ b/gdb/features/rs6000/powerpc-isa207-vsx64l.xml
@@ -6,7 +6,7 @@
notice and this notice are preserved. -->
<!DOCTYPE target SYSTEM "gdb-target.dtd">
-<target>
+<target xmlns:xi="http://www.w3.org/2001/XInclude">
<architecture>powerpc:common64</architecture>
<xi:include href="power64-core.xml"/>
<xi:include href="power-fpu-isa205.xml"/>
diff --git a/gdb/features/rs6000/powerpc-vsx32.xml b/gdb/features/rs6000/powerpc-vsx32.xml
index 94060140920..0ad6cf49739 100644
--- a/gdb/features/rs6000/powerpc-vsx32.xml
+++ b/gdb/features/rs6000/powerpc-vsx32.xml
@@ -9,7 +9,7 @@
view of the PowerPC. Includes AltiVec and VSX vector registers. -->
<!DOCTYPE target SYSTEM "gdb-target.dtd">
-<target>
+<target xmlns:xi="http://www.w3.org/2001/XInclude">
<architecture>powerpc:common</architecture>
<xi:include href="power-core.xml"/>
<xi:include href="power-fpu.xml"/>
diff --git a/gdb/features/rs6000/powerpc-vsx32l.xml b/gdb/features/rs6000/powerpc-vsx32l.xml
index 4126b1acce8..d85ab358091 100644
--- a/gdb/features/rs6000/powerpc-vsx32l.xml
+++ b/gdb/features/rs6000/powerpc-vsx32l.xml
@@ -10,7 +10,7 @@
and VSX vector registers. -->
<!DOCTYPE target SYSTEM "gdb-target.dtd">
-<target>
+<target xmlns:xi="http://www.w3.org/2001/XInclude">
<architecture>powerpc:common</architecture>
<xi:include href="power-core.xml"/>
<xi:include href="power-fpu.xml"/>
diff --git a/gdb/features/rs6000/powerpc-vsx64.xml b/gdb/features/rs6000/powerpc-vsx64.xml
index cf67b81615a..1fb744485b3 100644
--- a/gdb/features/rs6000/powerpc-vsx64.xml
+++ b/gdb/features/rs6000/powerpc-vsx64.xml
@@ -9,7 +9,7 @@
view of the PowerPC. Includes AltiVec and VSX vector registers. -->
<!DOCTYPE target SYSTEM "gdb-target.dtd">
-<target>
+<target xmlns:xi="http://www.w3.org/2001/XInclude">
<architecture>powerpc:common64</architecture>
<xi:include href="power64-core.xml"/>
<xi:include href="power-fpu.xml"/>
diff --git a/gdb/features/rs6000/powerpc-vsx64l.xml b/gdb/features/rs6000/powerpc-vsx64l.xml
index 606babc7b5b..38cf7393808 100644
--- a/gdb/features/rs6000/powerpc-vsx64l.xml
+++ b/gdb/features/rs6000/powerpc-vsx64l.xml
@@ -10,7 +10,7 @@
and VSX vector registers. -->
<!DOCTYPE target SYSTEM "gdb-target.dtd">
-<target>
+<target xmlns:xi="http://www.w3.org/2001/XInclude">
<architecture>powerpc:common64</architecture>
<xi:include href="power64-core.xml"/>
<xi:include href="power-fpu.xml"/>
diff --git a/gdb/features/rs6000/rs6000.xml b/gdb/features/rs6000/rs6000.xml
index b8f27d2fead..3c0a299fe83 100644
--- a/gdb/features/rs6000/rs6000.xml
+++ b/gdb/features/rs6000/rs6000.xml
@@ -9,7 +9,7 @@
user-level SPR's. -->
<!DOCTYPE target SYSTEM "gdb-target.dtd">
-<target>
+<target xmlns:xi="http://www.w3.org/2001/XInclude">
<architecture>rs6000:6000</architecture>
<!-- This description is slightly different from the standard
diff --git a/gdb/features/rx.xml b/gdb/features/rx.xml
index a3c506188fa..d942198ec04 100644
--- a/gdb/features/rx.xml
+++ b/gdb/features/rx.xml
@@ -6,7 +6,7 @@
notice and this notice are preserved. -->
<!DOCTYPE target SYSTEM "gdb-target.dtd">
-<target>
+<target xmlns:xi="http://www.w3.org/2001/XInclude">
<feature name="org.gnu.gdb.rx.core">
<reg name="r0" bitsize="32" type="data_ptr"/>
<reg name="r1" bitsize="32" type="uint32"/>
diff --git a/gdb/features/s390-gs-linux64.xml b/gdb/features/s390-gs-linux64.xml
index ecdd3068741..c55de96e374 100644
--- a/gdb/features/s390-gs-linux64.xml
+++ b/gdb/features/s390-gs-linux64.xml
@@ -9,7 +9,7 @@
in z/Architecture mode. -->
<!DOCTYPE target SYSTEM "gdb-target.dtd">
-<target>
+<target xmlns:xi="http://www.w3.org/2001/XInclude">
<architecture>s390:31-bit</architecture>
<osabi>GNU/Linux</osabi>
<xi:include href="s390-core64.xml"/>
diff --git a/gdb/features/s390-linux32.xml b/gdb/features/s390-linux32.xml
index cdbabf9dc6a..f375b47853b 100644
--- a/gdb/features/s390-linux32.xml
+++ b/gdb/features/s390-linux32.xml
@@ -9,7 +9,7 @@
in ESA/390 architecture mode. -->
<!DOCTYPE target SYSTEM "gdb-target.dtd">
-<target>
+<target xmlns:xi="http://www.w3.org/2001/XInclude">
<architecture>s390:31-bit</architecture>
<osabi>GNU/Linux</osabi>
<xi:include href="s390-core32.xml"/>
diff --git a/gdb/features/s390-linux32v1.xml b/gdb/features/s390-linux32v1.xml
index bb138a5343d..149e6a6fb3c 100644
--- a/gdb/features/s390-linux32v1.xml
+++ b/gdb/features/s390-linux32v1.xml
@@ -9,7 +9,7 @@
in ESA/390 architecture mode. -->
<!DOCTYPE target SYSTEM "gdb-target.dtd">
-<target>
+<target xmlns:xi="http://www.w3.org/2001/XInclude">
<architecture>s390:31-bit</architecture>
<osabi>GNU/Linux</osabi>
<xi:include href="s390-core32.xml"/>
diff --git a/gdb/features/s390-linux32v2.xml b/gdb/features/s390-linux32v2.xml
index 7db4efe66b8..c5da74ef096 100644
--- a/gdb/features/s390-linux32v2.xml
+++ b/gdb/features/s390-linux32v2.xml
@@ -9,7 +9,7 @@
in ESA/390 architecture mode. -->
<!DOCTYPE target SYSTEM "gdb-target.dtd">
-<target>
+<target xmlns:xi="http://www.w3.org/2001/XInclude">
<architecture>s390:31-bit</architecture>
<osabi>GNU/Linux</osabi>
<xi:include href="s390-core32.xml"/>
diff --git a/gdb/features/s390-linux64.xml b/gdb/features/s390-linux64.xml
index 71d044899ad..f12cb60c5ef 100644
--- a/gdb/features/s390-linux64.xml
+++ b/gdb/features/s390-linux64.xml
@@ -9,7 +9,7 @@
in z/Architecture mode. -->
<!DOCTYPE target SYSTEM "gdb-target.dtd">
-<target>
+<target xmlns:xi="http://www.w3.org/2001/XInclude">
<architecture>s390:31-bit</architecture>
<osabi>GNU/Linux</osabi>
<xi:include href="s390-core64.xml"/>
diff --git a/gdb/features/s390-linux64v1.xml b/gdb/features/s390-linux64v1.xml
index bb349663111..6d49c59fcb9 100644
--- a/gdb/features/s390-linux64v1.xml
+++ b/gdb/features/s390-linux64v1.xml
@@ -9,7 +9,7 @@
in z/Architecture mode. -->
<!DOCTYPE target SYSTEM "gdb-target.dtd">
-<target>
+<target xmlns:xi="http://www.w3.org/2001/XInclude">
<architecture>s390:31-bit</architecture>
<osabi>GNU/Linux</osabi>
<xi:include href="s390-core64.xml"/>
diff --git a/gdb/features/s390-linux64v2.xml b/gdb/features/s390-linux64v2.xml
index b795b71d26f..1905e283e4f 100644
--- a/gdb/features/s390-linux64v2.xml
+++ b/gdb/features/s390-linux64v2.xml
@@ -9,7 +9,7 @@
in z/Architecture mode. -->
<!DOCTYPE target SYSTEM "gdb-target.dtd">
-<target>
+<target xmlns:xi="http://www.w3.org/2001/XInclude">
<architecture>s390:31-bit</architecture>
<osabi>GNU/Linux</osabi>
<xi:include href="s390-core64.xml"/>
diff --git a/gdb/features/s390-te-linux64.xml b/gdb/features/s390-te-linux64.xml
index 564a6498167..8f591312f89 100644
--- a/gdb/features/s390-te-linux64.xml
+++ b/gdb/features/s390-te-linux64.xml
@@ -9,7 +9,7 @@
in z/Architecture mode. -->
<!DOCTYPE target SYSTEM "gdb-target.dtd">
-<target>
+<target xmlns:xi="http://www.w3.org/2001/XInclude">
<architecture>s390:31-bit</architecture>
<osabi>GNU/Linux</osabi>
<xi:include href="s390-core64.xml"/>
diff --git a/gdb/features/s390-tevx-linux64.xml b/gdb/features/s390-tevx-linux64.xml
index aa3a69f02ae..9930f156f28 100644
--- a/gdb/features/s390-tevx-linux64.xml
+++ b/gdb/features/s390-tevx-linux64.xml
@@ -9,7 +9,7 @@
in z/Architecture mode. -->
<!DOCTYPE target SYSTEM "gdb-target.dtd">
-<target>
+<target xmlns:xi="http://www.w3.org/2001/XInclude">
<architecture>s390:31-bit</architecture>
<osabi>GNU/Linux</osabi>
<xi:include href="s390-core64.xml"/>
diff --git a/gdb/features/s390-vx-linux64.xml b/gdb/features/s390-vx-linux64.xml
index 4771b680594..29278f8f213 100644
--- a/gdb/features/s390-vx-linux64.xml
+++ b/gdb/features/s390-vx-linux64.xml
@@ -9,7 +9,7 @@
in z/Architecture mode. -->
<!DOCTYPE target SYSTEM "gdb-target.dtd">
-<target>
+<target xmlns:xi="http://www.w3.org/2001/XInclude">
<architecture>s390:31-bit</architecture>
<osabi>GNU/Linux</osabi>
<xi:include href="s390-core64.xml"/>
diff --git a/gdb/features/s390x-gs-linux64.xml b/gdb/features/s390x-gs-linux64.xml
index 99a1965e9b1..751f9d288c1 100644
--- a/gdb/features/s390x-gs-linux64.xml
+++ b/gdb/features/s390x-gs-linux64.xml
@@ -8,7 +8,7 @@
<!-- S/390 64-bit user-level code. -->
<!DOCTYPE target SYSTEM "gdb-target.dtd">
-<target>
+<target xmlns:xi="http://www.w3.org/2001/XInclude">
<architecture>s390:64-bit</architecture>
<osabi>GNU/Linux</osabi>
<xi:include href="s390x-core64.xml"/>
diff --git a/gdb/features/s390x-linux64.xml b/gdb/features/s390x-linux64.xml
index 3a15c5a34c8..c30216680fe 100644
--- a/gdb/features/s390x-linux64.xml
+++ b/gdb/features/s390x-linux64.xml
@@ -8,7 +8,7 @@
<!-- S/390 64-bit user-level code. -->
<!DOCTYPE target SYSTEM "gdb-target.dtd">
-<target>
+<target xmlns:xi="http://www.w3.org/2001/XInclude">
<architecture>s390:64-bit</architecture>
<osabi>GNU/Linux</osabi>
<xi:include href="s390x-core64.xml"/>
diff --git a/gdb/features/s390x-linux64v1.xml b/gdb/features/s390x-linux64v1.xml
index 01ec0c38722..65dc27a988d 100644
--- a/gdb/features/s390x-linux64v1.xml
+++ b/gdb/features/s390x-linux64v1.xml
@@ -8,7 +8,7 @@
<!-- S/390 64-bit user-level code. -->
<!DOCTYPE target SYSTEM "gdb-target.dtd">
-<target>
+<target xmlns:xi="http://www.w3.org/2001/XInclude">
<architecture>s390:64-bit</architecture>
<osabi>GNU/Linux</osabi>
<xi:include href="s390x-core64.xml"/>
diff --git a/gdb/features/s390x-linux64v2.xml b/gdb/features/s390x-linux64v2.xml
index 57bbb08e6e0..cef73507800 100644
--- a/gdb/features/s390x-linux64v2.xml
+++ b/gdb/features/s390x-linux64v2.xml
@@ -8,7 +8,7 @@
<!-- S/390 64-bit user-level code. -->
<!DOCTYPE target SYSTEM "gdb-target.dtd">
-<target>
+<target xmlns:xi="http://www.w3.org/2001/XInclude">
<architecture>s390:64-bit</architecture>
<osabi>GNU/Linux</osabi>
<xi:include href="s390x-core64.xml"/>
diff --git a/gdb/features/s390x-te-linux64.xml b/gdb/features/s390x-te-linux64.xml
index 28aa716f4e4..14066590672 100644
--- a/gdb/features/s390x-te-linux64.xml
+++ b/gdb/features/s390x-te-linux64.xml
@@ -8,7 +8,7 @@
<!-- S/390 64-bit user-level code. -->
<!DOCTYPE target SYSTEM "gdb-target.dtd">
-<target>
+<target xmlns:xi="http://www.w3.org/2001/XInclude">
<architecture>s390:64-bit</architecture>
<osabi>GNU/Linux</osabi>
<xi:include href="s390x-core64.xml"/>
diff --git a/gdb/features/s390x-tevx-linux64.xml b/gdb/features/s390x-tevx-linux64.xml
index 376a512fb17..9eadc67fe18 100644
--- a/gdb/features/s390x-tevx-linux64.xml
+++ b/gdb/features/s390x-tevx-linux64.xml
@@ -8,7 +8,7 @@
<!-- S/390 64-bit user-level code. -->
<!DOCTYPE target SYSTEM "gdb-target.dtd">
-<target>
+<target xmlns:xi="http://www.w3.org/2001/XInclude">
<architecture>s390:64-bit</architecture>
<osabi>GNU/Linux</osabi>
<xi:include href="s390x-core64.xml"/>
diff --git a/gdb/features/s390x-vx-linux64.xml b/gdb/features/s390x-vx-linux64.xml
index b8a162f6668..06e4e272b6a 100644
--- a/gdb/features/s390x-vx-linux64.xml
+++ b/gdb/features/s390x-vx-linux64.xml
@@ -8,7 +8,7 @@
<!-- S/390 64-bit user-level code. -->
<!DOCTYPE target SYSTEM "gdb-target.dtd">
-<target>
+<target xmlns:xi="http://www.w3.org/2001/XInclude">
<architecture>s390:64-bit</architecture>
<osabi>GNU/Linux</osabi>
<xi:include href="s390x-core64.xml"/>
diff --git a/gdb/features/sparc/sparc32-solaris.xml b/gdb/features/sparc/sparc32-solaris.xml
index 02712d1fd6e..e5302f03320 100644
--- a/gdb/features/sparc/sparc32-solaris.xml
+++ b/gdb/features/sparc/sparc32-solaris.xml
@@ -6,7 +6,7 @@
notice and this notice are preserved. -->
<!DOCTYPE target SYSTEM "gdb-target.dtd">
-<target>
+<target xmlns:xi="http://www.w3.org/2001/XInclude">
<architecture>sparc</architecture>
<osabi>Solaris</osabi>
<xi:include href="sparc32-cpu.xml"/>
diff --git a/gdb/features/sparc/sparc64-solaris.xml b/gdb/features/sparc/sparc64-solaris.xml
index 8a31d465b2b..e41394855e9 100644
--- a/gdb/features/sparc/sparc64-solaris.xml
+++ b/gdb/features/sparc/sparc64-solaris.xml
@@ -6,7 +6,7 @@
notice and this notice are preserved. -->
<!DOCTYPE target SYSTEM "gdb-target.dtd">
-<target>
+<target xmlns:xi="http://www.w3.org/2001/XInclude">
<architecture>sparc:v9</architecture>
<osabi>Solaris</osabi>
<xi:include href="sparc64-cpu.xml"/>
diff --git a/gdb/features/tic6x-c62x-linux.xml b/gdb/features/tic6x-c62x-linux.xml
index 039c410f0a3..e77a8d10fd2 100644
--- a/gdb/features/tic6x-c62x-linux.xml
+++ b/gdb/features/tic6x-c62x-linux.xml
@@ -6,7 +6,7 @@
notice and this notice are preserved. -->
<!DOCTYPE target SYSTEM "gdb-target.dtd">
-<target>
+<target xmlns:xi="http://www.w3.org/2001/XInclude">
<architecture>tic6x</architecture>
<osabi>GNU/Linux</osabi>
<xi:include href="tic6x-core.xml"/>
diff --git a/gdb/features/tic6x-c64x-linux.xml b/gdb/features/tic6x-c64x-linux.xml
index 91fc619cf62..59c9fb5c4a5 100644
--- a/gdb/features/tic6x-c64x-linux.xml
+++ b/gdb/features/tic6x-c64x-linux.xml
@@ -6,7 +6,7 @@
notice and this notice are preserved. -->
<!DOCTYPE target SYSTEM "gdb-target.dtd">
-<target>
+<target xmlns:xi="http://www.w3.org/2001/XInclude">
<architecture>tic6x</architecture>
<osabi>GNU/Linux</osabi>
<xi:include href="tic6x-core.xml"/>
diff --git a/gdb/features/tic6x-c64xp-linux.xml b/gdb/features/tic6x-c64xp-linux.xml
index d6abc8645d3..b9f638c9452 100644
--- a/gdb/features/tic6x-c64xp-linux.xml
+++ b/gdb/features/tic6x-c64xp-linux.xml
@@ -6,7 +6,7 @@
notice and this notice are preserved. -->
<!DOCTYPE target SYSTEM "gdb-target.dtd">
-<target>
+<target xmlns:xi="http://www.w3.org/2001/XInclude">
<architecture>tic6x</architecture>
<osabi>GNU/Linux</osabi>
<xi:include href="tic6x-core.xml"/>
diff --git a/gdb/features/z80.xml b/gdb/features/z80.xml
index 85ef98803a1..0515c4a5749 100644
--- a/gdb/features/z80.xml
+++ b/gdb/features/z80.xml
@@ -6,7 +6,7 @@
notice and this notice are preserved. -->
<!DOCTYPE target SYSTEM "gdb-target.dtd">
-<target>
+<target xmlns:xi="http://www.w3.org/2001/XInclude">
<architecture>z80</architecture>
<xi:include href="z80-cpu.xml"/>
</target>
diff --git a/gdb/testsuite/gdb.xml/bad-include.xml b/gdb/testsuite/gdb.xml/bad-include.xml
index cd9cce39056..626f93fd03a 100644
--- a/gdb/testsuite/gdb.xml/bad-include.xml
+++ b/gdb/testsuite/gdb.xml/bad-include.xml
@@ -1 +1,3 @@
-<xi:include href="nonexistent.xml"/>
+<target xmlns:xi="http://www.w3.org/2001/XInclude">
+ <xi:include href="nonexistent.xml"/>
+</target>
diff --git a/gdb/testsuite/gdb.xml/core-only.xml b/gdb/testsuite/gdb.xml/core-only.xml
index f2ddcd5e671..253bc493194 100644
--- a/gdb/testsuite/gdb.xml/core-only.xml
+++ b/gdb/testsuite/gdb.xml/core-only.xml
@@ -1,3 +1,3 @@
-<target>
+<target xmlns:xi="http://www.w3.org/2001/XInclude">
<xi:include href="core-regs.xml"/>
</target>
--git a/gdb/testsuite/gdb.xml/extra-regs.xml b/gdb/testsuite/gdb.xml/extra-regs.xml
index 302e64ce7db..1b818635623 100644
--- a/gdb/testsuite/gdb.xml/extra-regs.xml
+++ b/gdb/testsuite/gdb.xml/extra-regs.xml
@@ -1,4 +1,4 @@
-<target>
+<target xmlns:xi="http://www.w3.org/2001/XInclude">
<xi:include href="core-regs.xml"/>
<feature name="extra">
<vector id="v4int8" type="int8" count="4"/>
diff --git a/gdb/testsuite/gdb.xml/inc-2.xml b/gdb/testsuite/gdb.xml/inc-2.xml
index b076814d148..f4d65cf80b9 100644
--- a/gdb/testsuite/gdb.xml/inc-2.xml
+++ b/gdb/testsuite/gdb.xml/inc-2.xml
@@ -1 +1,3 @@
-<xi:include href="inc-body.xml"/>
+<target xmlns:xi="http://www.w3.org/2001/XInclude">
+ <xi:include href="inc-body.xml"/>
+</target>
diff --git a/gdb/testsuite/gdb.xml/includes.xml b/gdb/testsuite/gdb.xml/includes.xml
index 3a6a243ae06..7e9a158968d 100644
--- a/gdb/testsuite/gdb.xml/includes.xml
+++ b/gdb/testsuite/gdb.xml/includes.xml
@@ -1,3 +1,3 @@
-<target>
+<target xmlns:xi="http://www.w3.org/2001/XInclude">
<xi:include href="inc-2.xml"/>
</target>
diff --git a/gdb/testsuite/gdb.xml/loop.xml b/gdb/testsuite/gdb.xml/loop.xml
index edd6d203337..7afce661767 100644
--- a/gdb/testsuite/gdb.xml/loop.xml
+++ b/gdb/testsuite/gdb.xml/loop.xml
@@ -1 +1,3 @@
-<xi:include href="loop.xml"/>
+<target xmlns:xi="http://www.w3.org/2001/XInclude">
+ <xi:include href="loop.xml"/>
+</target>
--
2.51.0
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 2/2] [pre-commit] Check xml files
2026-08-26 8:30 [PATCH 0/2] [gdb] xml linting Tom de Vries
2026-08-26 8:30 ` [PATCH 1/2] [gdb] Fix xmllint namespace errors Tom de Vries
@ 2026-08-26 8:30 ` Tom de Vries
1 sibling, 0 replies; 5+ messages in thread
From: Tom de Vries @ 2026-08-26 8:30 UTC (permalink / raw)
To: gdb-patches
Add a pre-commit check to check xml files (that also includes the .svg file).
This just checks for well-formedness. Ideally we'd check
conformance to dtd as well, but currently only C-based xmllint [1]
seems to provide this.
[1] https://gnome.pages.gitlab.gnome.org/libxml2/xmllint.html
---
.pre-commit-config.yaml | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 53e4c5033c1..db788b187f9 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -109,6 +109,19 @@ repos:
- id: yamllint
files: '^\.pre-commit-config.yaml$'
+ # Out-of-the-box hooks.
+ - repo: https://github.com/pre-commit/pre-commit-hooks
+ rev: v6.0.0
+ hooks:
+ - # This just checks for well-formedness. Ideally we'd check
+ # conformance to dtd as well, but currently only C-based xmllint [1]
+ # seems to provide this.
+ # [1] https://gnome.pages.gitlab.gnome.org/libxml2/xmllint.html
+ id: &id5 check-xml
+ name: *id5
+ files: &gdb_xml_files '^(gdb|gdbserver|gdbsupport)/.*\.(xml|xsl|svg)$'
+ exclude: gdb/testsuite/gdb.xml/tdesc-bogus.xml
+
# Local hooks.
- repo: local
hooks:
--
2.51.0
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] [gdb] Fix xmllint namespace errors
2026-08-26 8:30 ` [PATCH 1/2] [gdb] Fix xmllint namespace errors Tom de Vries
@ 2026-08-26 10:29 ` Tom de Vries
2026-08-26 14:55 ` Tom de Vries
0 siblings, 1 reply; 5+ messages in thread
From: Tom de Vries @ 2026-08-26 10:29 UTC (permalink / raw)
To: gdb-patches
On 8/26/26 10:30 AM, Tom de Vries wrote:
> diff --git a/gdb/testsuite/gdb.xml/inc-2.xml b/gdb/testsuite/gdb.xml/inc-2.xml
> index b076814d148..f4d65cf80b9 100644
> --- a/gdb/testsuite/gdb.xml/inc-2.xml
> +++ b/gdb/testsuite/gdb.xml/inc-2.xml
> @@ -1 +1,3 @@
> -<xi:include href="inc-body.xml"/>
> +<target xmlns:xi="http://www.w3.org/2001/XInclude">
> + <xi:include href="inc-body.xml"/>
> +</target>
It seems I didn't test this properly.
This change (adding <target> ... </target>) caused a failure in
gdb.xml/tdesc-xinclude.exp.
It seems that this can be fixed using this simpler change:
...
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="inc-body.xml"/>
...
I'll update the patch to use this pattern instead in case of missing
<target> ... </target>.
Thanks,
- Tom
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] [gdb] Fix xmllint namespace errors
2026-08-26 10:29 ` Tom de Vries
@ 2026-08-26 14:55 ` Tom de Vries
0 siblings, 0 replies; 5+ messages in thread
From: Tom de Vries @ 2026-08-26 14:55 UTC (permalink / raw)
To: gdb-patches
On 8/26/26 12:29 PM, Tom de Vries wrote:
> On 8/26/26 10:30 AM, Tom de Vries wrote:
>> diff --git a/gdb/testsuite/gdb.xml/inc-2.xml b/gdb/testsuite/gdb.xml/
>> inc-2.xml
>> index b076814d148..f4d65cf80b9 100644
>> --- a/gdb/testsuite/gdb.xml/inc-2.xml
>> +++ b/gdb/testsuite/gdb.xml/inc-2.xml
>> @@ -1 +1,3 @@
>> -<xi:include href="inc-body.xml"/>
>> +<target xmlns:xi="http://www.w3.org/2001/XInclude">
>> + <xi:include href="inc-body.xml"/>
>> +</target>
>
> It seems I didn't test this properly.
>
> This change (adding <target> ... </target>) caused a failure in gdb.xml/
> tdesc-xinclude.exp.
>
> It seems that this can be fixed using this simpler change:
> ...
> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="inc-
> body.xml"/>
> ...
>
> I'll update the patch to use this pattern instead in case of missing
> <target> ... </target>.
>
I was not planning to send out a v2 for that, but I ended up changing
more, so I'll submit a v2, that is, after testing.
Thanks,
- Tom
> Thanks,
> - Tom
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-08-26 14:56 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-26 8:30 [PATCH 0/2] [gdb] xml linting Tom de Vries
2026-08-26 8:30 ` [PATCH 1/2] [gdb] Fix xmllint namespace errors Tom de Vries
2026-08-26 10:29 ` Tom de Vries
2026-08-26 14:55 ` Tom de Vries
2026-08-26 8:30 ` [PATCH 2/2] [pre-commit] Check xml files Tom de Vries
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox