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

2024-03-15 Thread John DelSignore via Dwarf-discuss
Hi Adrian, Thanks for the reply. As far as I can tell, neither gcc nor gfortran produce N_SO stabs when -gdwarf-4 is used. It is the Apple ld-classic linker that is generating the N_SO stabs and inserting them into the Mach-O nlist symbol table. I believe that the linker is reading the DWARF in

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

2024-03-15 Thread Adrian Prantl via Dwarf-discuss
Could you send me an example .o file that reproduces the issue? I'm curious now. -- adrian > On Mar 15, 2024, at 7:41 AM, John DelSignore wrote: > > Hi Adrian, > > Thanks for the reply. As far as I can tell, neither gcc nor gfortran produce > N_SO stabs when -gdwarf-4 is used. It is the Apple

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

2024-03-15 Thread John DelSignore via Dwarf-discuss
Thanks for looking at this. I sent a separate email with the object file attached directly to you. FWIW, using od -c to dump the string table, you can see that ^L (form feed), which is the character that ends up in the first N_SO string, immediately precedes the directory path: 00032202

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

2024-03-15 Thread Adrian Prantl via Dwarf-discuss
> On Mar 15, 2024, at 9:22 AM, John DelSignore via Dwarf-discuss > 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'

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

2024-03-15 Thread John DelSignore via Dwarf-discuss
FWIW, when TotalView reads the DWARF, there are no control characters in the strings. Cheers, John D. On 3/15/24 13:12, Adrian Prantl wrote: On Mar 15, 2024, at 9:22 AM, John DelSignore via Dwarf-discuss wrote: Thanks for looking at this. I sent a

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

2024-03-15 Thread Jakub Jelinek via Dwarf-discuss
On Fri, Mar 15, 2024 at 01:25:26PM -0400, John DelSignore wrote: > FWIW, when TotalView reads the DWARF, there are no control characters in the > strings. GCC uses DW_FORM_strp (with the exception of too short strings where DW_FORM_string is always beneficial) if it detects assembler which suppor