David Blaikie via llvm-dev
2021-Apr-20 17:00 UTC
[llvm-dev] [cfe-dev] Debuginfo for alias variable /func is not emited.
Sure, looks like an omission/bug/missing debug info to me. I don't see any tests in clang for debug info IR emission that include "alias", so Iguess it's not implemented at all. I vaguely thought it was, but probably misremembering. On Tue, Apr 20, 2021 at 6:48 AM Umesh Kalappa via cfe-dev <cfe-dev at lists.llvm.org> wrote:> > Hi All , > > We have a stitution with clang ,where the debuginfo for alias variable > /func is not emitted i.e > > $cat test.c > int oldname = 1; > extern int newname __attribute__((alias("oldname"))); > $clang -g -O0 test.c > $gdb a.out > (gdb) pt oldname > type = int > (gdb) pt newname > type = <data variable, no debug info> > > and we can fix the same ,by adding the DIGlobalVariable for alias too . > > Before we go-ahead and make the changes ,we would like experts to > confirm these gaps and their comments on the same . > > Thank you > ~Umesh > _______________________________________________ > cfe-dev mailing list > cfe-dev at lists.llvm.org > https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
via llvm-dev
2021-Apr-20 17:51 UTC
[llvm-dev] [cfe-dev] Debuginfo for alias variable /func is not emited.
> Sure, looks like an omission/bug/missing debug info to me. I don't see > any tests in clang for debug info IR emission that include "alias", so > Iguess it's not implemented at all. I vaguely thought it was, but > probably misremembering.I can't get newname even with a use, or -fstandalone-debug. Umesh, if you're willing to generate a patch, that would be wonderful. Or if you can't, please file a bug. Thanks, --paulr> > On Tue, Apr 20, 2021 at 6:48 AM Umesh Kalappa via cfe-dev > <cfe-dev at lists.llvm.org> wrote: > > > > Hi All , > > > > We have a stitution with clang ,where the debuginfo for alias variable > > /func is not emitted i.e > > > > $cat test.c > > int oldname = 1; > > extern int newname __attribute__((alias("oldname"))); > > $clang -g -O0 test.c > > $gdb a.out > > (gdb) pt oldname > > type = int > > (gdb) pt newname > > type = <data variable, no debug info> > > > > and we can fix the same ,by adding the DIGlobalVariable for alias too . > > > > Before we go-ahead and make the changes ,we would like experts to > > confirm these gaps and their comments on the same . > > > > Thank you > > ~Umesh > > _______________________________________________ > > cfe-dev mailing list > > cfe-dev at lists.llvm.org > > https://urldefense.com/v3/__https://lists.llvm.org/cgi- > bin/mailman/listinfo/cfe-dev__;!!JmoZiZGBv3RvKRSx!pxXu4Tfnp4BMBKoTyZ6CO- > ob63HTGRA28O37lmhfVnBjCmlifoL0o9S42AfbAP4omg$