[llvm-bugs] [Bug 40630] New: Improve --string-dump invalid section error message

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Feb 6 08:38:37 PST 2019


https://bugs.llvm.org/show_bug.cgi?id=40630

            Bug ID: 40630
           Summary: Improve --string-dump invalid section error message
           Product: tools
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: llvm-readobj
          Assignee: unassignedbugs at nondot.org
          Reporter: jh7370.2008 at my.bristol.ac.uk
                CC: jh7370.2008 at my.bristol.ac.uk, llvm-bugs at lists.llvm.org

Currently, if you do --string-dump (or potentially other similar options), with
an invalid input (e.g. an out-of-range section index or section that does not
exist), llvm-readobj produces the error "Error reading file: invalid section
reference":

C:\Work>llvm-readobj --string-dump=does_not_exist foo.o
Format: ELF64-x86-64
Arch: x86_64
AddressSize: 64bit
LoadName:

Error reading file: invalid section reference.
C:\Work>

There are two problems with this error message. Firstly, it incorrectly claims
that there was a problem reading the file, where really the problem was a bad
input. Secondly, the error message makes no reference to the source of the
reference or why it is bad. Both these aspects should be improved.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20190206/762732fc/attachment.html>


More information about the llvm-bugs mailing list