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.
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.