getMetadata(“dbg”) returns NULL

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

getMetadata(“dbg”) returns NULL

李永超
Hi,
getMetadata(“dbg”) returns NULL for such a small program as follows:


int main(){
char a[10], b[2];
if(a[0] != 0 && a[1] != 0){
strcpy(a, b);
}
return 0;
}

The compiling command is:  llvm-gcc --emit-llvm -g -c ./src.c

I also tried the solutions I found through Google:

but neither of them works. 

Does anyone have any idea about this?
Thanks,
Yongchao.

_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: getMetadata(“dbg”) returns NULL

David Blaikie
On Thu, Apr 24, 2014 at 1:42 AM, 李永超 <[hidden email]> wrote:

> Hi,
> getMetadata(“dbg”) returns NULL for such a small program as follows:
>
>
> int main(){
> char a[10], b[2];
> if(a[0] != 0 && a[1] != 0){
> strcpy(a, b);
> }
> return 0;
> }
>
> The compiling command is:  llvm-gcc --emit-llvm -g -c ./src.c

llvm-gcc is dead and unmaintained. Try clang?

>
> I also tried the solutions I found through Google:
> http://stackoverflow.com/questions/14943447/llvm-line-number-of-an-instruction
> http://stackoverflow.com/questions/23089316/getmetadatadbg-returns-null-despite-producing-ir-with-clang-g-s-emit-llv
>
> but neither of them works.
>
> Does anyone have any idea about this?
> Thanks,
> Yongchao.
>
> _______________________________________________
> LLVM Developers mailing list
> [hidden email]         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>

_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: getMetadata(“dbg”) returns NULL

liuml07
In reply to this post by 李永超
Neither of the solutions you found uses llvm-gcc.


On Thu, Apr 24, 2014 at 11:42 AM, 李永超 <[hidden email]> wrote:
Hi,
getMetadata(“dbg”) returns NULL for such a small program as follows:


int main(){
char a[10], b[2];
if(a[0] != 0 && a[1] != 0){
strcpy(a, b);
}
return 0;
}

The compiling command is:  llvm-gcc --emit-llvm -g -c ./src.c

I also tried the solutions I found through Google:

but neither of them works. 

Does anyone have any idea about this?
Thanks,
Yongchao.

_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev




--
Mingliang LIU (刘明亮 in Chinese)

PACMAN Group,  Tsinghua University
Email: [hidden email]

_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: getMetadata("dbg") returns NULL

Dan Liew
As David said llvm-gcc is dead. Is there a reason you are using
llvm-gcc (and consequently LLVM <= 2.9)?

Are you by chance trying to use KLEE [1]? I think I've seen your
e-mail on the klee mailing list before. If you are using KLEE you
should in bear in mind that KLEE does build against LLVM3.4 and works
fine with Clang, not everything works yet but it is pretty usable.

You are more likely to get a positive response from developers if you
use a version of LLVM that isn't >= 3 years old.


[1] http://klee.github.io/klee/

--
Dan Liew
PhD Student - Imperial College London
_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev