[Dwarf-discuss] gfortran / gcc on Mac puts control characters in N_SO STABS

Adrian Prantl aprantl@apple.com
Fri Mar 15 17:12:26 GMT 2024



> On Mar 15, 2024, at 9:22 AM, John DelSignore via Dwarf-discuss <dwarf-discuss@lists.dwarfstd.org> wrote:
> 
> Thanks for looking at this. I sent a separate email with the object file attached directly to you.
> 

From my quick investigation the problem seems to be that gfortran uses a DW_FORM_string for the compile unit's name (rather than a DW_FORM_strp)

              DW_AT_name [DW_FORM_string]       ("/nfs/homes/jdelsign/hello.c")

and ld might have an off-by-one error when decoding the FORM (that part is speculation on my end based on that dwarfdump can decode the string fine, but it could also be a bug in gfortran and dwarfdump skips the control character when printing).

-- adrian

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.dwarfstd.org/pipermail/dwarf-discuss/attachments/20240315/1b62a3c6/attachment-0001.htm>


More information about the Dwarf-discuss mailing list