This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: DWARF updates for linker relaxation?


Nick Clifton wrote:
Sorry about that. I have been very behind in answering binutils email recently. :-(

That's OK -- I don't think there was any existing code to start from. I have no idea what the comments in the SH code were referring to, but I'm pretty sure GAS is not generating relocs for DWARF line numbers on SH.


I tested this by building for both i686-pc-linux-gnu and xtensa-elf targets. The testsuite passes with no regressions, except for one. For the xtensa-elf target, the lns/lns-common-1 test fails because the expected dump file no longer matches. Is there an easy way to specify an alternate expected dump file?

Yes. Edit the lns.exp file and an explicit entry for the xtensa port. eg:
> [ example removed ]

Thanks -- my DejaGNU skills are pretty minimal, and you saved me a bunch of time trying to figure out how to do this. Here is the testsuite change that I have applied along with the previous patch. I named the file with a "-alt" suffix instead of "-xtensa", because other targets may someday need to use this style of DWARF line numbers and so it's really not Xtensa-specific. I verified that there are no unexpected failures for both xtensa-elf and i686-pc-linux-gnu builds.

2006-08-08 Bob Wilson <bob.wilson@acm.org>

	* gas/lns/lns-common-1-alt.d: New file.
	* gas/lns/lns.exp: Use lns-common-1-alt.d for xtensa targets.

Index: testsuite/gas/lns/lns.exp
===================================================================
RCS file: /cvs/src/src/gas/testsuite/gas/lns/lns.exp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- testsuite/gas/lns/lns.exp	21 Sep 2005 06:55:49 -0000	1.2
+++ testsuite/gas/lns/lns.exp	8 Aug 2006 19:09:34 -0000	1.3
@@ -23,5 +23,10 @@
 # defined a macro...
 if { ![istarget ia64*-*-*] && ![istarget i370-*-*] && ![istarget i960-*-*]
      && ![istarget or32-*-*] && ![istarget s390*-*-*] } {
-  run_dump_test "lns-common-1"
+  # Use alternate file for targets using DW_LNS_fixed_advance_pc opcodes.
+  if { [istarget xtensa-*-*] } {
+    run_dump_test "lns-common-1-alt"
+  } else {
+    run_dump_test "lns-common-1"
+  }
 }
--- /dev/null	2006-05-30 18:33:22.000000000 -0700
+++ testsuite/gas/lns/lns-common-1-alt.d	2006-08-08 11:26:27.000000000 -0700
@@ -0,0 +1,39 @@
+#source: lns-common-1.s
+#readelf: -wl
+#name: lns-common-1
+Dump of debug contents of section \.debug_line:
+#...
+  Initial value of 'is_stmt':  1
+#...
+ Line Number Statements:
+  Extended opcode 2: set Address to .*
+  Copy
+  Set column to 3
+  Advance Line by 1 to 2
+  Advance PC by fixed size amount .* to .*
+  Copy
+  Set prologue_end to true
+  Advance Line by 1 to 3
+  Advance PC by fixed size amount .* to .*
+  Copy
+  Set column to 0
+  Set epilogue_begin to true
+  Advance Line by 1 to 4
+  Advance PC by fixed size amount .* to .*
+  Copy
+  Set ISA to 1
+  Set basic block
+  Advance Line by 1 to 5
+  Advance PC by fixed size amount .* to .*
+  Copy
+  Set is_stmt to 0
+  Advance Line by 1 to 6
+  Advance PC by fixed size amount .* to .*
+  Copy
+  Set is_stmt to 1
+  Advance Line by 1 to 7
+  Advance PC by fixed size amount .* to .*
+  Copy
+  Advance PC by fixed size amount .* to .*
+  Extended opcode 1: End of Sequence
+#...

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]