[PATCH] Debugging LLVM IR with LLDB (and gdb)

Malea, Daniel daniel.malea at intel.com
Wed Apr 24 13:04:10 PDT 2013


Ping? I think being able to debug IR would be a nice feature to commit
before the upcoming release.. I'm of course biased though :)

Cheers,
Dan


On 2013-04-17 11:31 AM, "Malea, Daniel" <daniel.malea at intel.com> wrote:

>Has anyone tried this pass or had a chance to look at the patches?
>
>http://llvm-reviews.chandlerc.com/D659
>
>
>Thanks,
>Daniel
>
>On 2013-04-15 12:19 PM, "Malea, Daniel" <daniel.malea at intel.com> wrote:
>
>>Ah, sorry, I figured phabricator link was sufficient. Here are the 4
>>patches that represent the latest phabricator review:
>>
>>
>>
>>Part #1: FormattedStream -- Add line tracking
>>- previously formatted_raw_ostream tracked columns, now it tracks lines
>>too
>>- used by DebugIR pass to know the line number to connect to each IR
>>instruction
>>
>>Part #2: Pull up AssemblyWriter interface into header to allow
>>subclassing
>>- made all functions virtual so that subclasses can specialize them
>>- add printInstructionLine so that subclasses can choose whether or not
>>to
>>print the newline character (without having to implement
>>printBasicBlock()
>>- no intended change in functionality/behaviour!
>>
>>Part #3: DebugIR -- emit IR file and replace source lines with IR lines
>>in MD
>>- requires existing debug information to be present
>>- fixes up file name and line number information
>>- emits a "<orig_filename>-debug.ll" succinct IR file (without !dbg
>>metadata
>>or debug intrinsics) that can be read by a debugger
>>
>>Part #4: DebugIR tests -- lit tests for the line number transform
>>- simple one-function case
>>- function-calling case
>>- external function calling case
>>- exception throwing case
>>- vector case
>>- O3 (vector) case
>>
>>
>>
>>
>>From: Chandler Carruth
>><chandlerc at google.com<mailto:chandlerc at google.com>>
>>Date: Monday, 15 April, 2013 4:29 AM
>>To: Stefanus Du Toit
>><stefanus.du.toit at intel.com<mailto:stefanus.du.toit at intel.com>>
>>Cc: Nadav Rotem <nrotem at apple.com<mailto:nrotem at apple.com>>, Daniel Malea
>><daniel.malea at intel.com<mailto:daniel.malea at intel.com>>,
>>"llvm-commits at cs.uiuc.edu<mailto:llvm-commits at cs.uiuc.edu>"
>><llvm-commits at cs.uiuc.edu<mailto:llvm-commits at cs.uiuc.edu>>
>>Subject: Re: [PATCH] Debugging LLVM IR with LLDB (and gdb)
>>
>>On Mon, Apr 15, 2013 at 1:21 AM, Du Toit, Stefanus
>><stefanus.du.toit at intel.com<mailto:stefanus.du.toit at intel.com>> wrote:
>>The link to the patch is at the bottom of the email.
>>
>>As usual, please attach the patch to the email. The best way when using
>>Phabricator (as we documented) is to add the commits list to the review
>>there so that everyone on the mailing list can follow the code review and
>>participate even if not using the specific tool.
>>
>>
>>--
>>Stefanus Du Toit 
>><stefanus.du.toit at intel.com<mailto:stefanus.du.toit at intel.com>>
>>Intel Waterloo
>>Phone: 519-591-1738<tel:519-591-1738>
>>
>>
>>From: Nadav Rotem
>><nrotem at apple.com<mailto:nrotem at apple.com><mailto:nrotem at apple.com<mailto
>>:
>>nrotem at apple.com>>>
>>Date: Sunday, 14 April, 2013 4:00 AM
>>To: Daniel Malea 
>><daniel.malea at intel.com<mailto:daniel.malea at intel.com><mailto:daniel.male
>>a
>>@intel.com<mailto:daniel.malea at intel.com>>>
>>Cc: 
>>"llvm-commits at cs.uiuc.edu<mailto:llvm-commits at cs.uiuc.edu><mailto:llvm-co
>>m
>>mits at cs.uiuc.edu<mailto:llvm-commits at cs.uiuc.edu>>"
>><llvm-commits at cs.uiuc.edu<mailto:llvm-commits at cs.uiuc.edu><mailto:llvm-co
>>m
>>mits at cs.uiuc.edu<mailto:llvm-commits at cs.uiuc.edu>>>
>>Subject: Re: [PATCH] Debugging LLVM IR with LLDB (and gdb)
>>
>>Hi Daniel,
>>
>>You forgot to attache the patch.
>>
>>Thanks,
>>Nadav
>>
>>On Apr 11, 2013, at 1:53 PM, "Malea, Daniel"
>><daniel.malea at intel.com<mailto:daniel.malea at intel.com><mailto:daniel.male
>>a
>>@intel.com<mailto:daniel.malea at intel.com>>> wrote:
>>
>>[Š]
>>I'd be appreciative of testing and/or review comments! The patch is
>>available on phabricator http://llvm-reviews.chandlerc.com/D659and the
>>details from the review request follow.
>>
>>
>>_______________________________________________
>>llvm-commits mailing list
>>llvm-commits at cs.uiuc.edu<mailto:llvm-commits at cs.uiuc.edu>
>>http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>>
>





More information about the llvm-commits mailing list