[Lldb-commits] [lldb] [lldb] Don't create instance of `SymbolFileDWARFDebugMap` for non-Mach-O files (PR #139170)

via lldb-commits lldb-commits at lists.llvm.org
Thu Jun 5 18:38:43 PDT 2025


royitaqi wrote:

> NB I reverted this on main because it depends on #142704 which I also reverted as it adds "-macho" to every Module's Triple string, and we need to find a way to mark the object file as MachO without doing that.

Hi @jasonmolenda,

I appreciate you actively trying to make the code base better, and I can see why the other revert may make sense, BUT:

> it depends on #142704

I respectfully disagree. **This patch doesn't depend on #142704.**
* In a normal production environment (e.g. on a regular macOS machine) and in tests, without #142704, the object format of mach-o files are already `MachO`.
* The only caveat of this patch may be if there are mach-o files out there which don't have the `LC_BUILD_VERSION` or `LC_VERSION_MIN_*` load commands. However, their triple is already wrong (object format being `ELF`), so their behavior is already undefined at best. So I don't think we need to worry about them.

Please kindly LMK if I missed something in the above.

Thanks,
Roy

https://github.com/llvm/llvm-project/pull/139170


More information about the lldb-commits mailing list