<div dir="ltr">Yeah, there are a few places/times/situation where LLVM's emitted empty DWARF sections - minor bug imho. (yes, a bug, but no one's highest priority/pretty benign in the grand scheme of things - certainly if anyone wants to clean them up, that's great, makes reading dumps easier, etc)</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Oct 18, 2019 at 6:22 AM Robinson, Paul <<a href="mailto:paul.robinson@sony.com">paul.robinson@sony.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">> One query regarding clang behavior for debug_macinfo section -- Now, I<br>
> understand that to enable macro information and for gdb able to expand<br>
> macros, clang needs "-fdebug-macro". Default is not to emit debug info<br>
> for macros.<br>
><br>
> But consider below dump, is this Okay to have a empty{Size 1 byte}<br>
> debug_macinfo section to be emitted ?? when we are not emitting macro<br>
> info at all. <br>
> Should we stop emitting this ?? this is on purpose.<br>
> Note: this behavior persists, even when specifying "-fno-debug-macro"<br>
> option explicitly.<br>
<br>
I believe we set up all the sections internally regardless of options,<br>
just for simpler bookkeeping, and then emit only the ones we actually <br>
want to produce. Emitting an essentially empty .debug_macinfo section <br>
with -fno-debug-macro would be a bug.<br>
--paulr<br>
<br>
</blockquote></div>