[llvm-dev] Debug Info is not generated for extern variables .
David Blaikie via llvm-dev
llvm-dev at lists.llvm.org
Fri May 17 10:13:52 PDT 2019
Any idea why this is important compared to function declarations that I
don't think any compiler emits (declarations of called but not defined
I imagine in the function case, it's assumed that the function is defined
elsewhere and the debug info for that definition will be available.
Why not the same with variables?
(admittedly, when we employ the "debug info is in another file" assumption,
that should be done under -fno-standalone-debug - but I'm not sure how far
we should take that assumption. Should we have debug info for declarations
There's currently at least some code that supports emitting function
declarations (for member functions) but not for variables (static member
variables are 'members' rather than 'variables')
On Fri, May 17, 2019 at 9:21 AM Umesh Kalappa via llvm-dev <
llvm-dev at lists.llvm.org> wrote:
> Hi All,
> for the below case :
> $cat test.c
> extern void sharedLibTestLibRtn (int arg);
> extern int testExt;
> int main (void)
> sharedLibTestLibRtn (5);
> return 0;
> we don't see the debug-info for "testExt" i.e no DW_AT_type entry for
> extern symbol ,where gcc has the same .
> we are fixing the same in clang as compatibility with gcc .
> before we start our analysis on DIBuilder in clang ,any inputs here
> will be appreciated .
> Thank you
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev