Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 22 Jan 2014 13:43:55 +0000 (UTC)
From:      Kai Wang <kaiw@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r261025 - projects/elftoolchain/cddl/contrib/opensolaris/tools/ctf/cvt
Message-ID:  <201401221343.s0MDhtq2059818@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kaiw
Date: Wed Jan 22 13:43:54 2014
New Revision: 261025
URL: http://svnweb.freebsd.org/changeset/base/261025

Log:
  Let ctfconvert accept DWARF version 3 and 4.

Modified:
  projects/elftoolchain/cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c

Modified: projects/elftoolchain/cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c
==============================================================================
--- projects/elftoolchain/cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c	Wed Jan 22 10:57:42 2014	(r261024)
+++ projects/elftoolchain/cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c	Wed Jan 22 13:43:54 2014	(r261025)
@@ -96,8 +96,10 @@
 #include "list.h"
 #include "traverse.h"
 
-/* The version of DWARF which we support. */
+/* The versions of DWARF which we support. */
 #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
@@ -1981,9 +1983,10 @@ dw_read(tdata_t *td, Elf *elf, char *fil
 		terminate("file contains too many types\n");
 
 	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 "
-		    "(version 2 required)\n", vers);
+		    "(version 2, 3, or 4 required)\n", vers);
 	}
 
 	if (die_string(&dw, cu, DW_AT_producer, &prod, 0)) {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201401221343.s0MDhtq2059818>