bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug binutils/13125] New: readelf does not exit 0 when DWARF information


From: jonstanley at gmail dot com
Subject: [Bug binutils/13125] New: readelf does not exit 0 when DWARF information requested but none present
Date: Tue, 23 Aug 2011 19:51:01 +0000

http://sourceware.org/bugzilla/show_bug.cgi?id=13125

             Bug #: 13125
           Summary: readelf does not exit 0 when DWARF information
                    requested but none present
           Product: binutils
           Version: 2.22 (HEAD)
            Status: NEW
          Severity: normal
          Priority: P2
         Component: binutils
        AssignedTo: address@hidden
        ReportedBy: address@hidden
    Classification: Unclassified


If you request DWARF data from a file using readelf (for example using -wi) and
it does not exist, readelf exits with status 0 rather than an error. I've
reproduced this going pretty far back in binutils (back to whatever was shipped
in RHEL5) and all the way up to current HEAD. It also provides no diagnostic
information to indicate that there is no information to display.

$ ./readelf -wi /bin/ls
$ echo $?
0
$ ./readelf --version
GNU readelf (GNU Binutils) 2.21.53.20110823
Copyright 2011 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) any later version.
This program has absolutely no warranty.
$ 

Reference the elfutils version of readelf, which does both of these things:

$ eu-readelf -winfo /bin/ls
eu-readelf: cannot get debug context descriptor: No DWARF information found
$ echo $?
1

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]