[LLVMdev] Generate .debug_info for asm files?

Alex alexinbeijing at gmail.com
Thu May 28 07:57:23 PDT 2015


On Thu, May 28, 2015 at 4:36 PM, Alex <alexinbeijing at gmail.com> wrote:

> Dear LLVM devs,
>
> I've noticed that LLVM's assembler (and hence clang) doesn't generate
> debug data when assembling, even when run with "-g".
>

Sorry, let me correct that: the assembler does generate the .debug_info
section (as well as line number data) when run with "-g". I was wrong,
sorry.

The issue I am having with GDB is occurring because using ".file"
directives with LLVM's assembler doesn't automatically add
DW_TAG_compile_unit DIEs to the .debug_info and .debug_aranges sections.
(It does with GAS.)

When the assembler is run with -g, it does generate the DW_TAG_compile_unit
DIEs. There is no problem there. The problem comes when you want to
manually include your own debug data using assembler directives. This is
useful when the assembler is generated from some other source.

So what I should have said is: would you be interested in a patch which
makes ".file" directives generate DW_TAG_compile_unit DIEs?

Thanks, Alex Dowad
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150528/ce3817b0/attachment.html>


More information about the llvm-dev mailing list