[llvm-dev] 答复: hi, Is there any solution about how to add some dwarf info to the IR bitcode file.

Siddharth Bhat via llvm-dev llvm-dev at lists.llvm.org
Wed Nov 15 06:00:13 PST 2017


If you wish to have LLVM IR in debug info, There used to be a pass called
"debugir" which bitrotted. I'm bringing it up-to-date, the code is
available here: https://github.com/bollu/llvm/tree/revive-debug-ir

Give it a shot if it makes sense for your use-case.

Cheers,
~Siddharth.

On Wed, 15 Nov 2017 at 12:10 陳韋任 via llvm-dev <llvm-dev at lists.llvm.org>
wrote:

> There might be no step-by-step example, but you can check links below:
>
>   * https://llvm.org/docs/SourceLevelDebugging.html
>   *
> https://llvm.org/devmtg/2014-10/Slides/Christopher-DebugInfoTutorial.pdf
>
> 2017-11-15 14:26 GMT+08:00 Wuweijia <wuweijia at huawei.com>:
>
>> Hi Andrew
>>
>>                 I am newbie. There are many headers and classes, I do not
>> know how to use to add dwarf info to bc file.
>>
>>                 Can  you show me the demo or example, is there any info
>> about how to use these classes step by step.
>>
>> BR
>>
>> Owen
>>
>>
>>
>> *发件人**:* Andrew Kelley [mailto:superjoe30 at gmail.com]
>> *发送时间:* 2017年11月15日 12:51
>> *收件人:* Wuweijia <wuweijia at huawei.com>
>> *抄送:* 陳韋任 <chenwj.cs97g at g2.nctu.edu.tw>; llvm-dev at lists.llvm.org;
>> Fanbohao <fanbohao at huawei.com>
>> *主题:* Re: [llvm-dev] hi, Is there any solution about how to add some
>> dwarf info to the IR bitcode file.
>>
>>
>>
>> Have a look at the DebugInfo API.
>>
>>
>>
>> include/llvm/DebugInfo/*
>>
>>
>>
>> It requires using the C++ API instead of the C API.
>>
>>
>>
>> On Tue, Nov 14, 2017 at 10:32 PM, Wuweijia via llvm-dev <
>> llvm-dev at lists.llvm.org> wrote:
>>
>> Hi,
>>
>>                 I create the function  A with llvm api, and make
>> implement about function, that function A call function B, and add some
>> write/read operation of variants to function A. and compile it to machine
>> code, run it debug it.
>>
>>                 And I want to debug the function A, is there any ways I
>> can add some dwarf info (or debug info ), so that I can the check variant
>> ‘s value is ok.
>>
>>
>>
>>
>>
>> BR
>>
>> Owen
>>
>>
>> _______________________________________________
>> LLVM Developers mailing list
>> llvm-dev at lists.llvm.org
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>>
>>
>>
>
>
>
> --
> Wei-Ren Chen (陳韋任)
> Homepage: https://people.cs.nctu.edu.tw/~chenwj
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
-- 
Sending this from my phone, please excuse any typos!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20171115/eee8e83c/attachment.html>


More information about the llvm-dev mailing list