[LLVMdev] Writing my own debugger... use __builtin_frame_address or is there something better?

John Smith xp0bpe at gmail.com
Sun Jan 4 10:04:54 PST 2015


> On 4 Jan 2015, at 17:56, Joerg Sonnenberger <joerg at britannica.bec.de> wrote:
> 
> On Sun, Jan 04, 2015 at 05:39:30PM +0000, John Smith wrote:
>> If theres no such switch then... what is considered the "right approach
>> with LLVM" to creating your own debugger?
> 
> Depends on what problem you are trying to solve. Emitting appropiate
> #line data and naming the CC variables as in your original language
> would help improve the experience. If that is not good enough, I'm not
> sure if there is any alternative to emitting IR directly with the
> associated tighter control about debug data getting created.
> Alternatively, you could try to hook into lldb.

Is there an LLDB file that can help me figure out where my variables are located?

Like a DWARF file or something?

I've never used DWARF explicitly so I don't know if that's the right thing...

If I could parse a DWARF file... and get the stack pointer... could that be used to get the variables?



More information about the llvm-dev mailing list