Subject: bug#71292: 30.0.50; macOS: .elns have no debug info

From: Gerd Möllmann <[email-masked]>
Date: Fri, 31 May 2024 20:52:16 +0200

Eli Zaretskii <[email-masked]> writes:

>> From: Gerd Möllmann <[email-masked]>
>> Cc: [email-masked]
>> Date: Fri, 31 May 2024 20:12:45 +0200
>> 
>> Eli Zaretskii <[email-masked]> writes:
>> 
>> > Then how about using -keep-temps as part of native-comp-debug = 3?
>> 
>> I think you mean debug >= 2?
>
> Mo, I meant > 2.

No .o files = no debug info on macOS. So you are proposing that one
can get debug info on macOS only with debug == 3, which produces a host
of files that are not useful at all. That makes no sense to me.

>> Anyway, debug info is also valuable when you don't have the C file, in
>> the disassembly. That is for debug > 0. Otherwise you see only bare hex
>> addresses and such.
>
> Debug info and keeping the *.o files is not the same.  Keeping the *.o
> files is really gross, which is why I suggested debug > 2 (as it keeps
> other intermediate files).

Keeping the .o files is normal on macOS. Gcc-14 -g does that, for
example. Clang produces produce bundles directly, if one wants. GCC
doesn't have an option for doing that.

> Doesn't macOS support separate debug info, which can be created with
> objcopy?  If it does, you could copy the debug info from the *.o
> files, and then deleting them would not hamper debugging.

MacOS has .dSYM bundles, but how would you convince libgccjit/gcc to
invoke dsymutil to produce them before it deletes the .o files? I don't
see how that can be done.