Skip to content

Malformed DWARF from llc? #10367

@llvmbot

Description

@llvmbot
Bugzilla Link 9995
Resolution FIXED
Resolved on Jan 15, 2013 00:45
Version 2.9
OS Linux
Reporter LLVM Bugzilla Contributor

Extended Description

It looks like llc might be producing malformed DWARF debug info. I'm no DWARF expert, so I'm having trouble diagnosing it. Here's an example: compile this to LLVM IR with "clang -c -g -emit-llvm":

void bar();
void foo() { bar(); }

Then generate an object file via "llc" and "as". Running "dumpbin" on the resulting object file (linux elf-64) gives errors like:

AT of 16359 (0x3fe7) is unknown to dwarfdump. Continuing.
...
dwarfdump ERROR: dwarf_srclines: DW_DLE_ATTR_FORM_BAD (114)

There aren't any issues if the object file is generated directly by clang. But I need to preserve debug info from LLVM IR through llc (scenario: use clang to compile library code with debug info, generate additional IR and link it with library IR, then finish codegen with llc and as). Thanks in advance for any suggestions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions