[llvm-dev] DebugInfo work contribution and update.

Robinson, Paul via llvm-dev
Fri, 18 Oct 2019 13:22:12 -0000

> One query regarding clang behavior for debug_macinfo section -- Now, I
> understand that to enable macro information and for gdb able to expand
> macros, clang needs "-fdebug-macro". Default is not to emit debug
info
> for macros.
>
> But consider below dump, is this Okay to have a empty{Size 1 byte}
> debug_macinfo section to be emitted ?? when we are not emitting macro
> info at all.
> Should we stop emitting this ?? this is on purpose.
> Note: this behavior persists, even when specifying
"-fno-debug-macro"
> option explicitly.

I believe we set up all the sections internally regardless of options,
just for simpler bookkeeping, and then emit only the ones we actually
want to produce.  Emitting an essentially empty .debug_macinfo section
with -fno-debug-macro would be a bug.
--paulr