* [Patch] Introduce DWARF2_VERSION
@ 2011-03-28 12:23 Tristan Gingold
2011-03-30 15:55 ` Nick Clifton
0 siblings, 1 reply; 3+ messages in thread
From: Tristan Gingold @ 2011-03-28 12:23 UTC (permalink / raw)
To: binutils
Hi,
the VMS/ia64 backtrace symbolizer expect dwarf3 debugging info.
So I have define the DWARF2_VERSION macro in dwarf2dbg.c and the code
now uses it each time the dwarf version is generated. This part makes the
code slightly more readable IMHO.
And of course, this macro is defined to 3 (!) only when the target is VMS/ia64.
Ok for trunk ?
Tristan.
gas/
2011-03-28 Tristan Gingold <gingold@adacore.com>
* dwarf2dbg.c (DWARF2_VERSION): Define.
(out_debug_line): Use it.
(out_debug_aranges): Ditto.
(out_debug_info): Ditto.
* config/tc-ia64.h (DWARF2_VERSION): Override it.
Index: dwarf2dbg.c
===================================================================
RCS file: /cvs/src/src/gas/dwarf2dbg.c,v
retrieving revision 1.110
diff -c -r1.110 dwarf2dbg.c
*** dwarf2dbg.c 10 Mar 2011 18:26:28 -0000 1.110
--- dwarf2dbg.c 28 Mar 2011 12:19:02 -0000
***************
*** 89,94 ****
--- 89,98 ----
#define DWARF2_FILE_SIZE_NAME(FILENAME,DIRNAME) 0
#endif
+ #ifndef DWARF2_VERSION
+ #define DWARF2_VERSION 2
+ #endif
+
#include "subsegs.h"
#include "dwarf2.h"
***************
*** 1420,1426 ****
line_end = exp.X_add_symbol;
/* Version. */
! out_two (2);
/* Length of the prologue following this length. */
prologue_end = symbol_temp_make ();
--- 1424,1430 ----
line_end = exp.X_add_symbol;
/* Version. */
! out_two (DWARF2_VERSION);
/* Length of the prologue following this length. */
prologue_end = symbol_temp_make ();
***************
*** 1524,1530 ****
aranges_end = exp.X_add_symbol;
/* DWARF version. */
! out_two (DWARF2_VERSION);
/* .debug_abbrev offset */
TC_DWARF2_EMIT_OFFSET (section_symbol (abbrev_seg), sizeof_offset);
Index: config/tc-ia64.h
===================================================================
RCS file: /cvs/src/src/gas/config/tc-ia64.h,v
retrieving revision 1.47
diff -c -r1.47 tc-ia64.h
*** config/tc-ia64.h 25 Mar 2010 21:12:28 -0000 1.47
--- config/tc-ia64.h 28 Mar 2011 12:19:02 -0000
***************
*** 323,325 ****
--- 323,330 ----
&& (!(FIX)->fx_pcrel \
|| (FIX)->fx_r_type == BFD_RELOC_IA64_PLTOFF22 \
|| TC_FORCE_RELOCATION (FIX)))
+
+ /* VMS backtraces expect dwarf version 3. */
+ #ifdef TE_VMS
+ #define DWARF2_VERSION 3
+ #endif
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Patch] Introduce DWARF2_VERSION
2011-03-28 12:23 [Patch] Introduce DWARF2_VERSION Tristan Gingold
@ 2011-03-30 15:55 ` Nick Clifton
2011-03-31 8:08 ` Tristan Gingold
0 siblings, 1 reply; 3+ messages in thread
From: Nick Clifton @ 2011-03-30 15:55 UTC (permalink / raw)
To: Tristan Gingold; +Cc: binutils
Hi Tristan,
> gas/
> 2011-03-28 Tristan Gingold<gingold@adacore.com>
>
> * dwarf2dbg.c (DWARF2_VERSION): Define.
> (out_debug_line): Use it.
> (out_debug_aranges): Ditto.
> (out_debug_info): Ditto.
> * config/tc-ia64.h (DWARF2_VERSION): Override it.
Approved - please apply.
Cheers
Nick
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Patch] Introduce DWARF2_VERSION
2011-03-30 15:55 ` Nick Clifton
@ 2011-03-31 8:08 ` Tristan Gingold
0 siblings, 0 replies; 3+ messages in thread
From: Tristan Gingold @ 2011-03-31 8:08 UTC (permalink / raw)
To: Nick Clifton; +Cc: binutils
On Mar 30, 2011, at 5:55 PM, Nick Clifton wrote:
> Hi Tristan,
>
>> gas/
>> 2011-03-28 Tristan Gingold<gingold@adacore.com>
>>
>> * dwarf2dbg.c (DWARF2_VERSION): Define.
>> (out_debug_line): Use it.
>> (out_debug_aranges): Ditto.
>> (out_debug_info): Ditto.
>> * config/tc-ia64.h (DWARF2_VERSION): Override it.
>
> Approved - please apply.
Thanks, committed.
Tristan.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-03-31 8:03 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-28 12:23 [Patch] Introduce DWARF2_VERSION Tristan Gingold
2011-03-30 15:55 ` Nick Clifton
2011-03-31 8:08 ` Tristan Gingold
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).