Enable XML target descriptions for x86.
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.xml / tdesc-regs.exp
index 0922ca383829affe4ae6fbe25078037ed52a3321..8eae0bd1183acd1056b4537f2f7068ac1be71b65 100644 (file)
@@ -25,6 +25,7 @@ gdb_start
 
 set core-regs ""
 set regdir ""
+set architecture ""
 switch -glob -- [istarget] {
     "*arm-*-*" {
         set core-regs {arm-core.xml}
@@ -55,6 +56,16 @@ switch -glob -- [istarget] {
        unsupported "register tests"
        return 0
     }
+    "i?86-*-*" {
+       set architecture "i386"
+       set regdir "i386/"
+        set core-regs {32bit-core.xml 32bit-sse.xml}
+    }
+    "x86_64-*-*" {
+       set architecture "i386:x86-64"
+       set regdir "i386/"
+        set core-regs {64bit-core.xml 64bit-sse.xml}
+    }
 }
 
 # If no core registers were specified, assume this target does not
@@ -89,12 +100,16 @@ proc load_description { file errmsg } {
     global subdir
     global gdb_prompt
     global core-regs
+    global architecture
 
     file delete "$subdir/regs.xml"
     set ifd [open "$srcdir/$subdir/$file" r]
     set ofd [open "$subdir/regs.xml" w]
     while {[gets $ifd line] >= 0} {
        if {[regexp {<xi:include href="core-regs.xml"/>} $line]} {
+           if {! [string equal ${architecture} ""]} {
+               puts $ofd "  <architecture>${architecture}</architecture>"
+           }
            foreach src ${core-regs} {
                puts $ofd "  <xi:include href=\"$src\"/>"
            }
This page took 0.026206 seconds and 4 git commands to generate.