陳韋任
2011-Jun-14 08:50 UTC
[LLVMdev] How to get an LLVM-compiled executable which could be debugged using gdb
> Debug information can be placed in the assembler source. This is what > GCC does; you can see for yourself if you run > gcc -g -save-temps filename.cI guess he want to ask if llc can emit debugging information which GDB can use. Regards, chenwj -- Wei-Ren Chen (陳韋任) Computer Systems Lab, Institute of Information Science, Academia Sinica, Taiwan (R.O.C.) Tel:886-2-2788-3799 #1667
Qingan Li
2011-Jun-14 09:32 UTC
[LLVMdev] How to get an LLVM-compiled executable which could be debugged using gdb
I am sorry for my poor statement of my problem. Yes, ��f�� is right. I want to know whether llvm could emit debugging information which GDB could use directly. Ex, how does the executable file generated from llc could be debug using gdb? A simple demonstration is greatly appreciated. 2011/6/14 ��f�� <chenwj at iis.sinica.edu.tw>> > Debug information can be placed in the assembler source. This is what > > GCC does; you can see for yourself if you run > > gcc -g -save-temps filename.c > > I guess he want to ask if llc can emit debugging information which GDB > can use. > > Regards, > chenwj > > -- > Wei-Ren Chen (��f��) > Computer Systems Lab, Institute of Information Science, > Academia Sinica, Taiwan (R.O.C.) > Tel:886-2-2788-3799 #1667 >-- Best regards, Li Qingan -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110614/f79637a2/attachment.html>
Jim Grosbach
2011-Jun-14 15:59 UTC
[LLVMdev] How to get an LLVM-compiled executable which could be debugged using gdb
You're looking to use the wrong tool. LLC isn't where the debug info is from. The debug information is created by the front end, as Duncan pointed out. LLC will propagate that information but will not create it if it's not already there. The debug information is compatible with GDB. Usage is just as with gcc or any other compiler; add the "-g" flag. For example, $ clang -g myfile.c -o myfile $ gdb myfile -Jim On Jun 14, 2011, at 2:32 AM, Qingan Li wrote:> I am sorry for my poor statement of my problem. > Yes, $)G]sStG6 is right. > I want to know whether llvm could emit debugging information which GDB could use directly. Ex, how does the executable file generated from llc could be debug using gdb? > A simple demonstration is greatly appreciated. > 2011/6/14 $)G]sStG6 <chenwj at iis.sinica.edu.tw> > > Debug information can be placed in the assembler source. This is what > > GCC does; you can see for yourself if you run > > gcc -g -save-temps filename.c > > I guess he want to ask if llc can emit debugging information which GDB > can use. > > Regards, > chenwj > > -- > Wei-Ren Chen ($)G]sStG6) > Computer Systems Lab, Institute of Information Science, > Academia Sinica, Taiwan (R.O.C.) > Tel:886-2-2788-3799 #1667 > > > > -- > Best regards, > > Li Qingan > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Possibly Parallel Threads
- [LLVMdev] How to get an LLVM-compiled executable which could be debugged using gdb
- [LLVMdev] How to get an LLVM-compiled executable which could be debugged using gdb
- [LLVMdev] How to get an LLVM-compiled executable which could be debugged using gdb
- [LLVMdev] about writing a functionpass requiring a modulepass
- [LLVMdev] Problem of stack slot coloring