[llvm-dev] Finding line numbers in source code associated with given bitcode instructions

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

[llvm-dev] Finding line numbers in source code associated with given bitcode instructions

Alberto Barbaro via llvm-dev
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.

_______________________________________________
LLVM Developers mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
Reply | Threaded
Open this post in threaded view
|

Re: [llvm-dev] Finding line numbers in source code associated with given bitcode instructions

Alberto Barbaro via llvm-dev

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:[hidden email]] On Behalf Of Carter Cheng via llvm-dev
Sent: Wednesday, November 28, 2018 9:09 AM
To: [hidden email]
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.


_______________________________________________
LLVM Developers mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
Reply | Threaded
Open this post in threaded view
|

Re: [llvm-dev] Finding line numbers in source code associated with given bitcode instructions

Alberto Barbaro via llvm-dev
Great, thanks for the info! 

On Wed, Nov 28, 2018 at 11:12 PM <[hidden email]> 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:[hidden email]] On Behalf Of Carter Cheng via llvm-dev
Sent: Wednesday, November 28, 2018 9:09 AM
To: [hidden email]
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.


_______________________________________________
LLVM Developers mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev