Carter Cheng via llvm-dev
2018-Nov-28 14:08 UTC
[llvm-dev] Finding line numbers in source code associated with given bitcode instructions
Hello, Is it possible to somehow similar to how DWARF functions with assembly find out which line numbers in unoptimized code are associated with which bitcode instructions for the purpose of debugging compiler passes? I am curious about whether this is possible prior to writing some instrumentation passes for the purpose of debugging them. Thanks in advance, Carter. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20181128/5583d6be/attachment.html>
via llvm-dev
2018-Nov-28 15:12 UTC
[llvm-dev] Finding line numbers in source code associated with given bitcode instructions
It looks like using one of clang's `-Rpass` remark options would annotate instructions with source locations, without actually producing any debug info (type info etc). If that doesn't work, `-gmlt` (aka `-gline-tables-only`) should do the trick. --paulr From: llvm-dev [mailto:llvm-dev-bounces at lists.llvm.org] On Behalf Of Carter Cheng via llvm-dev Sent: Wednesday, November 28, 2018 9:09 AM To: llvm-dev at lists.llvm.org Subject: [llvm-dev] Finding line numbers in source code associated with given bitcode instructions Hello, Is it possible to somehow similar to how DWARF functions with assembly find out which line numbers in unoptimized code are associated with which bitcode instructions for the purpose of debugging compiler passes? I am curious about whether this is possible prior to writing some instrumentation passes for the purpose of debugging them. Thanks in advance, Carter. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20181128/fd107257/attachment.html>
Carter Cheng via llvm-dev
2018-Nov-28 15:13 UTC
[llvm-dev] Finding line numbers in source code associated with given bitcode instructions
Great, thanks for the info! On Wed, Nov 28, 2018 at 11:12 PM <paul.robinson at sony.com> wrote:> It looks like using one of clang's `-Rpass` remark options would annotate > instructions with source locations, without actually producing any debug > info (type info etc). If that doesn't work, `-gmlt` (aka > `-gline-tables-only`) should do the trick. > > --paulr > > > > *From:* llvm-dev [mailto:llvm-dev-bounces at lists.llvm.org] *On Behalf Of *Carter > Cheng via llvm-dev > *Sent:* Wednesday, November 28, 2018 9:09 AM > *To:* llvm-dev at lists.llvm.org > *Subject:* [llvm-dev] Finding line numbers in source code associated with > given bitcode instructions > > > > Hello, > > > > Is it possible to somehow similar to how DWARF functions with assembly > find out which line numbers in unoptimized code are associated with which > bitcode instructions for the purpose of debugging compiler passes? I am > curious about whether this is possible prior to writing some > instrumentation passes for the purpose of debugging them. > > > > Thanks in advance, > > > > Carter. >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20181128/c97d0a1a/attachment.html>
Apparently Analagous Threads
- [LLVMdev] Recent changes in -gmlt break sample profiling
- [LLVMdev] Recent changes in -gmlt break sample profiling
- [LLVMdev] -gcolumn-info and PR 14106
- [LLVMdev] Recent changes in -gmlt break sample profiling
- [LLVMdev] Recent changes in -gmlt break sample profiling