Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 25 Jan 2014 11:27:09 +0000 (UTC)
From:      Kai Wang <kaiw@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r261154 - projects/elftoolchain/cddl/contrib/opensolaris/tools/ctf/cvt
Message-ID:  <201401251127.s0PBR9mr070418@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kaiw
Date: Sat Jan 25 11:27:09 2014
New Revision: 261154
URL: http://svnweb.freebsd.org/changeset/base/261154

Log:
  Simplify DWARF version check.
  
  Submitted by:	emaste

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	Sat Jan 25 10:43:47 2014	(r261153)
+++ projects/elftoolchain/cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c	Sat Jan 25 11:27:09 2014	(r261154)
@@ -96,11 +96,6 @@
 #include "list.h"
 #include "traverse.h"
 
-/* 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
  * differences between the GCC and DevPro DWARF emitters.  See the referenced
@@ -1983,10 +1978,9 @@ 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 && vers != DWARF_VERSION3 &&
-	    vers != DWARF_VERSION4) {
+	if (vers < 2 || vers > 4) {
 		terminate("file contains incompatible version %d DWARF code "
-		    "(version 2, 3, or 4 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?201401251127.s0PBR9mr070418>