libjit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Libjit] libjit - frame inspection


From: MrBluelightzero .
Subject: [Libjit] libjit - frame inspection
Date: Tue, 29 Jul 2014 23:18:50 +0100

Hello,

I am new to libjit and have discovered it after searching for libraries that will help me in building my own programming language.

I have read through the entire doc at https://www.gnu.org/software/libjit/doc/libjit.html and quite familiar now. Although I am having trouble finding any documentation or example code for frame inspection.

As an example, say I compile Tutorial 1 in the docs:

int mul_add(int x, int y, int z)
{
    return x * y + z;
}

and I set a breakpoint in the start of the function.

On another thread I have a loop that is calling jit_debugger_wait_event which tells me location of the break point with function/data1/data2.

But what functions can I use to inspect the values of the function? for example say I wanted to get the value of y.

I thought about using jit_insn_mark_breakpoint_variable and passing every single variable but that seems like a pretty inefficient.

I also found the stack walking methods in Utility-Routines.

The functions in <jit/jit-walk.h> allow the caller to walk up the native execution stack, inspecting frames and return addresses.

but none of the methods seem to help in actually get variables.

I hope you can understand what I am trying to achieve.

Thanks,

bluelightzero

reply via email to

[Prev in Thread] Current Thread [Next in Thread]