[llvm-bugs] [Bug 45696] New: Add diagnostics if some/many addresses cannot be symbolized

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Apr 27 04:45:35 PDT 2020


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

            Bug ID: 45696
           Summary: Add diagnostics if some/many addresses cannot be
                    symbolized
           Product: tools
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: llvm-symbolizer
          Assignee: unassignedbugs at nondot.org
          Reporter: jh7370.2008 at my.bristol.ac.uk
                CC: llvm-bugs at lists.llvm.org

llvm-symbolizer currently prints the following sort of output if an address
cannot be symbolized.

C:\Work\TempWork> llvm-symbolizer 0x12345234534 -e test.elf
??
??:0:0

There could be many different reasons why such a situation might happen,
including, but not limited to:
1) No debug information in the input file.
2) Users are specifying a runtime address for an ASLR executable, and should be
using --adjust-vma.
3) The user is trying to symbolize a relocatable object (e.g. ET_REL) and not
an executable (e.g. ET_EXEC).
4) The address is simply wrong.

We could probably report useful diagnostics to help users identify some of
these situations. 1) and 3) should be particularly easy to see and I don't see
a reason not to print a warning in these cases. 2) is slightly trickier, as it
may be difficult to distinguish it from 4) for which there probably is no
benefit it warning. One option might be to report a warning if e.g. more than
75% of input addresses are unknown, and to suggest trying --adjust-vma.

-- 
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/20200427/a2b3d3c7/attachment.html>


More information about the llvm-bugs mailing list