aboutsummaryrefslogtreecommitdiff
path: root/gas/dwarf2dbg.c
diff options
context:
space:
mode:
authorTristan Gingold <gingold@adacore.com>2011-03-31 08:02:41 +0000
committerTristan Gingold <gingold@adacore.com>2011-03-31 08:02:41 +0000
commitfc0eebac62d01dc69d81829c0b05622ec1922cf0 (patch)
treef41ab95e39c875768f0d977330b87da9eb209819 /gas/dwarf2dbg.c
parent00e98fc7596ff93e1b30d012cecdf7f3025eaea1 (diff)
downloadgdb-fc0eebac62d01dc69d81829c0b05622ec1922cf0.zip
gdb-fc0eebac62d01dc69d81829c0b05622ec1922cf0.tar.gz
gdb-fc0eebac62d01dc69d81829c0b05622ec1922cf0.tar.bz2
2011-03-31 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.
Diffstat (limited to 'gas/dwarf2dbg.c')
-rw-r--r--gas/dwarf2dbg.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/gas/dwarf2dbg.c b/gas/dwarf2dbg.c
index c551a7f..41fd014 100644
--- a/gas/dwarf2dbg.c
+++ b/gas/dwarf2dbg.c
@@ -89,6 +89,10 @@
#define DWARF2_FILE_SIZE_NAME(FILENAME,DIRNAME) 0
#endif
+#ifndef DWARF2_VERSION
+#define DWARF2_VERSION 2
+#endif
+
#include "subsegs.h"
#include "dwarf2.h"
@@ -1420,7 +1424,7 @@ out_debug_line (segT line_seg)
line_end = exp.X_add_symbol;
/* Version. */
- out_two (2);
+ out_two (DWARF2_VERSION);
/* Length of the prologue following this length. */
prologue_end = symbol_temp_make ();
@@ -1524,7 +1528,7 @@ out_debug_aranges (segT aranges_seg, segT info_seg)
aranges_end = exp.X_add_symbol;
/* Version. */
- out_two (2);
+ out_two (DWARF2_VERSION);
/* Offset to .debug_info. */
TC_DWARF2_EMIT_OFFSET (section_symbol (info_seg), sizeof_offset);
@@ -1627,7 +1631,7 @@ out_debug_info (segT info_seg, segT abbrev_seg, segT line_seg, segT ranges_seg)
info_end = exp.X_add_symbol;
/* DWARF version. */
- out_two (2);
+ out_two (DWARF2_VERSION);
/* .debug_abbrev offset */
TC_DWARF2_EMIT_OFFSET (section_symbol (abbrev_seg), sizeof_offset);