From f8b73d13b7ca749dee450b60e4e401b4c096bed6 Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Wed, 13 Jun 2007 18:27:00 +0000 Subject: * Makefile.in (mips-tdep.o): Update. * mips-tdep.c (struct register_alias, mips_o32_aliases) (mips_n32_n64_aliases, mips_register_aliases): New. (mips_register_name): Call tdesc_register_name. (mips_tdesc_register_reggroup_p): New. (mips_pseudo_register_type, value_of_mips_user_reg): New. (mips_gdbarch_init): Add target-described register support. Register aliases for register names. * target-descriptions.c (tdesc_register_name): Make global. (tdesc_register_in_reggroup_p): New function, broken out from tdesc_register_reggroup_p. (tdesc_register_reggroup_p): Use it. * target-descriptions.h (tdesc_register_name) (tdesc_register_in_reggroup_p): New prototypes. * NEWS: Correct formatting. Mention MIPS register support. * features/mips-cp0.xml, features/mips-fpu.xml, features/mips64-cp0.xml, gdb/features/mips64-fpu.xml, mips-cpu.xml, features/mips64-cpu.xml: New files. * gdb.xml/tdesc-regs.exp: Add MIPS support. Allow multiple required features to be included. * gdb.texinfo (MIPS Features): New subsection. --- gdb/testsuite/ChangeLog | 5 +++++ gdb/testsuite/gdb.xml/tdesc-regs.exp | 32 ++++++++++++++++++++++++++------ 2 files changed, 31 insertions(+), 6 deletions(-) (limited to 'gdb/testsuite') diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index cf5d3b4..d1b22a4 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2007-06-13 Daniel Jacobowitz + + * gdb.xml/tdesc-regs.exp: Add MIPS support. Allow multiple + required features to be included. + 2007-06-12 Daniel Jacobowitz * gdb.threads/manythreads.exp: Prevent expect buffer overflow diff --git a/gdb/testsuite/gdb.xml/tdesc-regs.exp b/gdb/testsuite/gdb.xml/tdesc-regs.exp index fde2111..43d6c99 100644 --- a/gdb/testsuite/gdb.xml/tdesc-regs.exp +++ b/gdb/testsuite/gdb.xml/tdesc-regs.exp @@ -27,10 +27,13 @@ gdb_start set core-regs "" switch -glob -- [istarget] { "*arm-*-*" { - set core-regs arm-core + set core-regs {arm-core.xml} } "xscale-*-*" { - set core-regs arm-core + set core-regs {arm-core.xml} + } + "mips*-*-*" { + set core-regs {mips-cpu.xml mips-cp0.xml mips-fpu.xml} } } @@ -56,17 +59,32 @@ gdb_test "set tdesc file $srcdir/$subdir/single-reg.xml" \ # Copy the core registers into the objdir if necessary, so that they # will be found by . -file delete "core-regs.xml" -file copy "$srcdir/../features/${core-regs}.xml" "core-regs.xml" +foreach src ${core-regs} { + file delete "$src" + file copy "$srcdir/../features/$src" "$src" +} # Similarly, we need to copy files under test into the objdir. proc load_description { file errmsg } { global srcdir global subdir global gdb_prompt + global core-regs file delete "regs.xml" - file copy "$srcdir/$subdir/$file" "regs.xml" + set ifd [open "$srcdir/$subdir/$file" r] + set ofd [open "regs.xml" w] + while {[gets $ifd line] >= 0} { + if {[regexp {} $line]} { + foreach src ${core-regs} { + puts $ofd " " + } + } else { + puts $ofd $line + } + } + close $ifd + close $ofd # Anchor the test output, so that error messages are detected. set cmd "set tdesc filename regs.xml" @@ -91,5 +109,7 @@ load_description "core-only.xml" "" # The extra register from the previous description should be gone. gdb_test "ptype \$extrareg" "type = void" -file delete "core-regs.xml" +foreach src ${core-regs} { + file delete "$src" +} file delete "regs.xml" -- cgit v1.1