From 675229bb5dcf38df3c09f7f74e41b861e32dd0f2 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 1 Jun 2010 20:10:19 -0700 Subject: [PATCH] Remove meaningless DWARF_VERSION macro. --- libdw/ChangeLog | 3 +++ libdw/dwarf_getsrclines.c | 4 ++-- libdw/libdwP.h | 3 --- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/libdw/ChangeLog b/libdw/ChangeLog index 2fca3eaac..9ffa02293 100644 --- a/libdw/ChangeLog +++ b/libdw/ChangeLog @@ -1,5 +1,8 @@ 2010-06-01 Roland McGrath + * dwarf_getsrclines.c: Fix version field test. + * libdwP.h (DWARF_VERSION): Remove useless macro. + * dwarf_formudata.c (__libdw_formptr): Fix DW_FORM_sec_offset handling. * dwarf_formblock.c (dwarf_formblock): Handle DW_FORM_exprloc. diff --git a/libdw/dwarf_getsrclines.c b/libdw/dwarf_getsrclines.c index 43fad99af..dcf3490a4 100644 --- a/libdw/dwarf_getsrclines.c +++ b/libdw/dwarf_getsrclines.c @@ -1,5 +1,5 @@ /* Return line number information of CU. - Copyright (C) 2004-2009 Red Hat, Inc. + Copyright (C) 2004-2010 Red Hat, Inc. This file is part of Red Hat elfutils. Written by Ulrich Drepper , 2004. @@ -175,7 +175,7 @@ dwarf_getsrclines (Dwarf_Die *cudie, Dwarf_Lines **lines, size_t *nlines) /* The next element of the header is the version identifier. */ uint_fast16_t version = read_2ubyte_unaligned_inc (dbg, linep); - if (unlikely (version > DWARF_VERSION)) + if (unlikely (version < 2) || unlikely (version > 3)) { __libdw_seterrno (DWARF_E_VERSION); goto out; diff --git a/libdw/libdwP.h b/libdw/libdwP.h index b3402d862..1f9b513ff 100644 --- a/libdw/libdwP.h +++ b/libdw/libdwP.h @@ -61,9 +61,6 @@ #define _(Str) dgettext ("elfutils", Str) -/* Version of the DWARF specification we support. */ -#define DWARF_VERSION 3 - /* Version of the CIE format. */ #define CIE_VERSION 1 -- 2.47.2