sivakumar srinivasan
2011-Feb-07 04:52 UTC
[LLVMdev] Debug info generation through llvm backend
Hi Everyone, I am really new to LLVM. I am working on something where I had to pick-up a half-cooked backend and need to add debug support to it. I have searched through messages but could not find a nice starting place. Could some one please provide me with some pointers about - what is already supported in llvm as far as emitting debugging information is concerned? - how to emit debug information through a llvm backend (any step-by-step process)? - any existing implementation? - also, how to search through mailing list archives? Thanks, -sks -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110207/4825d777/attachment.html>
On Feb 6, 2011, at 8:52 PM, sivakumar srinivasan wrote:> Hi Everyone, > > I am really new to LLVM. I am working on something where I had to pick-up a half-cooked backend and need to add debug support to it. I have searched through messages but could not find a nice starting place. Could some one please provide me with some pointers about > - what is already supported in llvm as far as emitting debugging information is concerned? > - how to emit debug information through a llvm backend (any step-by-step process)? > - any existing implementation?x86, ARM etc.. backends now emit debug info in DWARF format. To understand how it works, follow how @llvm.dbg.declare and @llvm.dbg.value intrinsics are lowered, at instruction selection time, from LLVM IR into machine instructions. Most of the work required here is target independent (note, DWARF format is also used to encode EH info, which is a separate story). Target independent AsmPrinter does bulk of the work (see DwarfDebug.cpp and AsmPrinter.cpp). The ongoing MC work is moving some of the printing stuff into MC world, where target specific support is required to support respective object file format. You may need to - enable certain flags for your target, see TargetLoweringObjectFile.h - provide a dwarf register map, see Target.td and TargetRegisterInfo.h> - also, how to search through mailing list archives?? - Devang
Jean-Daniel Dupas
2011-Feb-08 19:04 UTC
[LLVMdev] Debug info generation through llvm backend
Le 8 févr. 2011 à 19:51, Devang Patel a écrit :> > On Feb 6, 2011, at 8:52 PM, sivakumar srinivasan wrote: > >> Hi Everyone, >> >> I am really new to LLVM. I am working on something where I had to pick-up a half-cooked backend and need to add debug support to it. I have searched through messages but could not find a nice starting place. Could some one please provide me with some pointers about >> - what is already supported in llvm as far as emitting debugging information is concerned? >> - how to emit debug information through a llvm backend (any step-by-step process)? >> - any existing implementation? > > x86, ARM etc.. backends now emit debug info in DWARF format. To understand how it works, follow how @llvm.dbg.declare and @llvm.dbg.value intrinsics are lowered, at instruction selection time, from LLVM IR into machine instructions. > > Most of the work required here is target independent (note, DWARF format is also used to encode EH info, which is a separate story). Target independent AsmPrinter does bulk of the work (see DwarfDebug.cpp and AsmPrinter.cpp). The ongoing MC work is moving some of the printing stuff into MC world, where target specific support is required to support respective object file format. > > You may need to > - enable certain flags for your target, see TargetLoweringObjectFile.h > - provide a dwarf register map, see Target.td and TargetRegisterInfo.h > >> - also, how to search through mailing list archives? > > ?Google is your friend. Just append the following statement to your search and it should work: site:http://lists.cs.uiuc.edu/pipermail/llvmdev/ for exemple, looking for debug symbols debug symbols site:http://lists.cs.uiuc.edu/pipermail/llvmdev/ -- Jean-Daniel
On Feb 6, 2011, at 8:52 PM, sivakumar srinivasan wrote:> also, how to search through mailing list archives?http://blog.gmane.org/gmane.comp.compilers.llvm.devel
sivakumar srinivasan
2011-Feb-10 04:05 UTC
[LLVMdev] Debug info generation through llvm backend
Hi Devang, Thanks for the pointers. I will take some time to chew on this information and looking at different pieces of sources. Thanks, Jean-Daniel and Andrew for the search answers. -sks On Wed, Feb 9, 2011 at 12:21 AM, Devang Patel <dpatel at apple.com> wrote:> > On Feb 6, 2011, at 8:52 PM, sivakumar srinivasan wrote: > > > Hi Everyone, > > > > I am really new to LLVM. I am working on something where I had to pick-up a half-cooked backend and need to add debug support to it. I have searched through messages but could not find a nice starting place. Could some one please provide me with some pointers about > > - what is already supported in llvm as far as emitting debugging information is concerned? > > - how to emit debug information through a llvm backend (any step-by-step process)? > > - any existing implementation? > > x86, ARM etc.. backends now emit debug info in DWARF format. To understand how it works, follow how @llvm.dbg.declare and @llvm.dbg.value intrinsics are lowered, at instruction selection time, from LLVM IR into machine instructions. > > Most of the work required here is target independent (note, DWARF format is also used to encode EH info, which is a separate story). Target independent AsmPrinter does bulk of the work (see DwarfDebug.cpp and AsmPrinter.cpp). The ongoing MC work is moving some of the printing stuff into MC world, where target specific support is required to support respective object file format. > > You may need to > - enable certain flags for your target, see TargetLoweringObjectFile.h > - provide a dwarf register map, see Target.td and TargetRegisterInfo.h > > > - also, how to search through mailing list archives? > > ? > > - > Devang >
Apparently Analagous Threads
- [LLVMdev] Debug info generation through llvm backend
- Jump Threading duplicates dbg.declare intrinsics for fragments, bug?
- Jump Threading duplicates dbg.declare intrinsics for fragments, bug?
- [LLVMdev] help converting llvm metadata into dwarf tags
- [LLVMdev] DWARF DW_AT_language in LLVM