1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-11 14:10:34 +00:00

Let ctfconvert accept DWARF version 3 and 4.

This commit is contained in:
Kai Wang 2014-01-22 13:43:54 +00:00
parent 7a1e293086
commit 529a53abe2
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/projects/elftoolchain/; revision=261025

View File

@ -96,8 +96,10 @@
#include "list.h" #include "list.h"
#include "traverse.h" #include "traverse.h"
/* The version of DWARF which we support. */ /* The versions of DWARF which we support. */
#define DWARF_VERSION 2 #define DWARF_VERSION 2
#define DWARF_VERSION3 3
#define DWARF_VERSION4 4
/* /*
* We need to define a couple of our own intrinsics, to smooth out some of the * We need to define a couple of our own intrinsics, to smooth out some of the
@ -1981,9 +1983,10 @@ dw_read(tdata_t *td, Elf *elf, char *filename __unused)
terminate("file contains too many types\n"); terminate("file contains too many types\n");
debug(1, "DWARF version: %d\n", vers); debug(1, "DWARF version: %d\n", vers);
if (vers != DWARF_VERSION) { if (vers != DWARF_VERSION && vers != DWARF_VERSION3 &&
vers != DWARF_VERSION4) {
terminate("file contains incompatible version %d DWARF code " terminate("file contains incompatible version %d DWARF code "
"(version 2 required)\n", vers); "(version 2, 3, or 4 required)\n", vers);
} }
if (die_string(&dw, cu, DW_AT_producer, &prod, 0)) { if (die_string(&dw, cu, DW_AT_producer, &prod, 0)) {