aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaciej W. Rozycki <macro@linux-mips.org>2005-02-22 20:50:11 +0000
committerMaciej W. Rozycki <macro@linux-mips.org>2005-02-22 20:50:11 +0000
commit9def96e7f6a9e5b59ba0159698f8e4cd5e6cb25a (patch)
treef1bf6529304f92359ea0b470650630b2dad59d08
parent1fda77fb6c1b534a79f0db472d6d27d1513cc0ab (diff)
downloadgdb-9def96e7f6a9e5b59ba0159698f8e4cd5e6cb25a.zip
gdb-9def96e7f6a9e5b59ba0159698f8e4cd5e6cb25a.tar.gz
gdb-9def96e7f6a9e5b59ba0159698f8e4cd5e6cb25a.tar.bz2
* gas/mips/mips16-dwarf2.d: Pass -mabi=32. Include relocation
information. * gas/mips/mips16-dwarf2-n32.d: New test to check DWARF2 line information for MIPS16 for the n32 ABI. * gas/mips/mips.exp. Run the new test.
-rw-r--r--gas/testsuite/ChangeLog8
-rw-r--r--gas/testsuite/gas/mips/mips.exp3
-rw-r--r--gas/testsuite/gas/mips/mips16-dwarf2-n32.d58
-rw-r--r--gas/testsuite/gas/mips/mips16-dwarf2.d15
4 files changed, 82 insertions, 2 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog
index 2d5cac6..ef98eda 100644
--- a/gas/testsuite/ChangeLog
+++ b/gas/testsuite/ChangeLog
@@ -1,3 +1,11 @@
+2005-02-22 Maciej W. Rozycki <macro@mips.com>
+
+ * gas/mips/mips16-dwarf2.d: Pass -mabi=32. Include relocation
+ information.
+ * gas/mips/mips16-dwarf2-n32.d: New test to check DWARF2 line
+ information for MIPS16 for the n32 ABI.
+ * gas/mips/mips.exp. Run the new test.
+
2005-02-22 Eric Christopher <echristo@redhat.com>
* gas/mips/elf-rel10.s: Add label for frob.
diff --git a/gas/testsuite/gas/mips/mips.exp b/gas/testsuite/gas/mips/mips.exp
index f0b02c9..a64d8b4 100644
--- a/gas/testsuite/gas/mips/mips.exp
+++ b/gas/testsuite/gas/mips/mips.exp
@@ -749,5 +749,8 @@ if { [istarget mips*-*-*] } then {
if { $elf && !$no_mips16 } {
run_dump_test "mips16-dwarf2"
+ if $has_newabi {
+ run_dump_test "mips16-dwarf2-n32"
+ }
}
}
diff --git a/gas/testsuite/gas/mips/mips16-dwarf2-n32.d b/gas/testsuite/gas/mips/mips16-dwarf2-n32.d
new file mode 100644
index 0000000..64087fc
--- /dev/null
+++ b/gas/testsuite/gas/mips/mips16-dwarf2-n32.d
@@ -0,0 +1,58 @@
+#readelf: -r -wl
+#name: MIPS16 DWARF2
+#as: -march=mips3 -mabi=n32 -mips16 -no-mdebug -g0
+#source: mips16-dwarf2.s
+
+Relocation section '\.rela\.debug_info' at offset .* contains 4 entries:
+ *Offset * Info * Type * Sym\.Value * Sym\. Name \+ Addend
+0+0006 * 0+..02 * R_MIPS_32 * 0+0000 * \.debug_abbrev \+ 0
+0+000c * 0+..02 * R_MIPS_32 * 0+0000 * \.debug_line \+ 0
+0+0010 * 0+..02 * R_MIPS_32 * 0+0000 * \.text \+ 0
+0+0014 * 0+..02 * R_MIPS_32 * 0+0000 * \.text \+ 910
+
+Relocation section '\.rela\.debug_line' at offset .* contains 1 entries:
+ *Offset * Info * Type * Sym\.Value * Sym\. Name \+ Addend
+0+0030 * 0+..02 * R_MIPS_32 * 0+0000 * .text \+ 1
+
+Dump of debug contents of section \.debug_line:
+
+ Length: 64
+ DWARF Version: 2
+ Prologue Length: 35
+ Minimum Instruction Length: 1
+ Initial value of 'is_stmt': 1
+ Line Base: -5
+ Line Range: 14
+ Opcode Base: 10
+ \(Pointer size: 4\)
+
+ Opcodes:
+ Opcode 1 has 0 args
+ Opcode 2 has 1 args
+ Opcode 3 has 1 args
+ Opcode 4 has 1 args
+ Opcode 5 has 1 args
+ Opcode 6 has 0 args
+ Opcode 7 has 0 args
+ Opcode 8 has 0 args
+ Opcode 9 has 1 args
+
+ The Directory Table is empty\.
+
+ The File Name Table:
+ Entry Dir Time Size Name
+ 1 0 0 0 mips16-dwarf2\.s
+
+ Line Number Statements:
+ Extended opcode 2: set Address to 0x0
+ Special opcode 5: advance Address by 0 to 0x0 and Line by 0 to 1
+ Special opcode 34: advance Address by 2 to 0x2 and Line by 1 to 2
+ Special opcode 34: advance Address by 2 to 0x4 and Line by 1 to 3
+ Special opcode 62: advance Address by 4 to 0x8 and Line by 1 to 4
+ Special opcode 34: advance Address by 2 to 0xa and Line by 1 to 5
+ Special opcode 62: advance Address by 4 to 0xe and Line by 1 to 6
+ Special opcode 62: advance Address by 4 to 0x12 and Line by 1 to 7
+ Advance PC by 2286 to 900
+ Special opcode 6: advance Address by 0 to 0x900 and Line by 1 to 8
+ Advance PC by 15 to 90f
+ Extended opcode 1: End of Sequence
diff --git a/gas/testsuite/gas/mips/mips16-dwarf2.d b/gas/testsuite/gas/mips/mips16-dwarf2.d
index ab2659b..9718f71 100644
--- a/gas/testsuite/gas/mips/mips16-dwarf2.d
+++ b/gas/testsuite/gas/mips/mips16-dwarf2.d
@@ -1,8 +1,19 @@
-#readelf: -wl
+#readelf: -r -wl
#name: MIPS16 DWARF2
-#as: -mips16 -no-mdebug -g0
+#as: -mabi=32 -mips16 -no-mdebug -g0
#source: mips16-dwarf2.s
+Relocation section '\.rel\.debug_info' at offset .* contains 4 entries:
+ *Offset * Info * Type * Sym\.Value * Sym\. Name
+0+0006 * 0+..02 * R_MIPS_32 * 0+0000 * \.debug_abbrev
+0+000c * 0+..02 * R_MIPS_32 * 0+0000 * \.debug_line
+0+0010 * 0+..02 * R_MIPS_32 * 0+0000 * \.text
+0+0014 * 0+..02 * R_MIPS_32 * 0+0000 * \.text
+
+Relocation section '\.rel\.debug_line' at offset .* contains 1 entries:
+ *Offset * Info * Type * Sym\.Value * Sym\. Name
+0+0030 * 0+..02 * R_MIPS_32 * 0+0000 * \.text
+
Dump of debug contents of section \.debug_line:
Length: 64