hoy added a comment. In D93747#2481073 <https://reviews.llvm.org/D93747#2481073>, @dblaikie wrote:
> In D93747#2481053 <https://reviews.llvm.org/D93747#2481053>, @tmsriram wrote: > >> In D93747#2480442 <https://reviews.llvm.org/D93747#2480442>, @dblaikie wrote: >> >>> @tmsriram - any ideas what your case/example was like that might've caused >>> degraded debugging experience? Would be good to understand if we're >>> producing some bad DWARF with this patch/if there might be some way to >>> avoid it (as it seems like gdb can handle mangled names/overloading in C in >>> this example I've tried) >> >> I haven't seen anything that caused degraded debugging experience. I am >> interested in this as we do look at this field for the purposes of profile >> attribtution for calls that are inlined. My comment was that we don't need >> to create this if it didn't already exist. I am not fully aware of what >> would happen if we did it all the time. > > Ah, sorry, I got confused as to who's comment I was reading. I see it was > @hoy who said: > >> If set, the gdb debugger will use that field to match the user input and set >> breakpoints. Therefore, giving DW_AT_linkage_name a uniquefied name prevents >> the debugger from setting a breakpoint based on source names unless the user >> specifies a decorated name. >> >> Hence, this approach sounds like a workaround for us when the profile >> quality matters more than debugging experience. > > So I'm still a bit confused. My test doesn't seem to demonstrate the issue > with setting a linkage name preventing the debugger from setting a breakpoint > based on the source name? > > Suggesting that gdb isn't using the DW_AT_name at all for "break <function > name>" but instead demangling and stripping off the extras from the linkage > name, and since it can't demangle this uniquified name (unlike the mangled > name used when using the overloadable attribute) that degrades the debugger > user experience? I'd have to test that in more detail/with some hand-hacked > DWARF. Yes, I think in your case the linage name can be demangled by the debugger. In my previous experiment, the uniquefied names could not be demangled therefore I was not able to breakpoint. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93747/new/ https://reviews.llvm.org/D93747 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits