lightning
[Top][All Lists]
Advanced

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

Re: [Lightning] loading symbols / locals into gdb?


From: Paulo César Pereira de Andrade
Subject: Re: [Lightning] loading symbols / locals into gdb?
Date: Tue, 11 Mar 2014 12:43:22 -0300

2014-03-10 16:12 GMT-03:00 Bruno Loff <address@hidden>:
> Hello again :-)
>
> I was wondering: I am now starting to write the programming language for the
> register machines, and I will eventually want to allow for debugging.
>
> Is there a way of telling gdb that certain executable memory positions
> correspond to certain lines in source code files? That certain other memory
> positions are "local" variables that should appear in the watch list, or
> something to that effect?
>
> Basically, is there something akin to the -g flag of gcc?
>
> I guess not, I can imagine that would be a lot of work, but then Paulo: how
> are you dealing with this in Owl? How is debugging going to happen there?

  I plan to implement debugging using gdb interface for jit:
https://sourceware.org/gdb/onlinedocs/gdb/JIT-Interface.html
It cannot be done directly in lightning because lightning does not
have a concept of variables, it just lets you load/store values from
memory and use registers.

  The current interface lightning has is jit_name and jit_note, and there is the
jit_bool_t jit_get_note(jit_pointer_t address, char **name, char
**file, int *line);
interface that returns the closest >= ptr, name, file and line as set with
jit_name and jit_note.

> Thank you for your time,
> Bruno

Thanks,
Paulo



reply via email to

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