<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On May 28, 2015, at 7:57 AM, Alex <<a href="mailto:alexinbeijing@gmail.com" class="">alexinbeijing@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="gmail_extra"><br class=""><div class="gmail_quote">On Thu, May 28, 2015 at 4:36 PM, Alex <span dir="ltr" class=""><<a href="mailto:alexinbeijing@gmail.com" target="_blank" class="">alexinbeijing@gmail.com</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class="">Dear LLVM devs,<div class=""><br class=""></div><div class="">I've noticed that LLVM's assembler (and hence clang) doesn't generate debug data when assembling, even when run with "-g".</div></div></blockquote><div class=""><br class=""></div><div class="">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.<br class=""></div><div class=""><br class=""></div><div class="">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.)</div><div class=""><br class=""></div><div class="">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.</div><div class=""><br class=""></div><div class="">So what I should have said is: would you be interested in a patch which makes ".file" directives generate DW_TAG_compile_unit DIEs?</div></div></div></div></div></blockquote><br class=""></div><div>Of course!</div><div><br class=""></div><div>Thanks.</div><br class=""></body></html>