[PATCH] D118754: [DebugInfo] Always emit `.debug_names` with dwarf 5 for Apple platforms

Pavel Labath via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 15 00:06:39 PST 2022


labath added a comment.

In D118754#3319657 <https://reviews.llvm.org/D118754#3319657>, @probinson wrote:

>> The ability to enable/disable accelerators on MachO (not currently possible - since it's hardcoded in the backend) - eg: someone adding -gno-pubnames to reduce debug info size, but in the process breaking lldb's behavior due to missing accelerator tables.
>
> My memory of when Pavel added .debug_names is that lldb knew how to construct it (e.g. for v4 input) and having it present in the object was a load-time improvement, not a functional requirement.  So, the scenario of wanting to turn .debug_names off does seem plausible to me, and not something to be forbidden.

It doesn't actually construct *it* (the debug_names table), but it constructs an internal index with equivalent functionality. The end result is the same though -- lldb should be able to handle the situation where the debug_names section is missing.

(of course, there's always the possibility of bugs, as that code path is not exercised that often, but the fallback logic is pretty simple..)


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D118754/new/

https://reviews.llvm.org/D118754



More information about the llvm-commits mailing list