]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
Remove meaningless DWARF_VERSION macro.
authorRoland McGrath <roland@redhat.com>
Wed, 2 Jun 2010 03:10:19 +0000 (20:10 -0700)
committerRoland McGrath <roland@redhat.com>
Wed, 2 Jun 2010 03:10:19 +0000 (20:10 -0700)
libdw/ChangeLog
libdw/dwarf_getsrclines.c
libdw/libdwP.h

index 2fca3eaacd8fab3ae10a5ba2f4a56d109b864868..9ffa02293ecb688203b61d39577b7ee11a66037e 100644 (file)
@@ -1,5 +1,8 @@
 2010-06-01  Roland McGrath  <roland@redhat.com>
 
+       * 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.
index 43fad99af1ae8eeb1348a69b06ab8f735b1eb821..dcf3490a45003f7df52c65f1473a57bf39f42914 100644 (file)
@@ -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 <drepper@redhat.com>, 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;
index b3402d862d8722fc32fc5991cbb61d71461fbebe..1f9b513fff6cffa8f0121e10727e955b29450ad5 100644 (file)
@@ -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