RR API Discussion (librr)

Robert O'Callahan robert at ocallahan.org
Tue Oct 14 14:29:06 PDT 2014

On Wed, Oct 15, 2014 at 10:15 AM, Benoit Girard <bgirard at mozilla.com> wrote:

> Some of the things I describe need to interface with some debugger
> (like GDB) and I don't think my use case is unique there.

Yeah. You need an API to connect a gdb instance that you control to an rr
ReplaySession or DiversionSession. That's actually reasonably
straightforward if your code spawns and drives gdb; librr just has to have
an API to open a gdbserver on a Session and return the port number to you,
which you then pass to a gdb 'target remote' command. You would need to be
careful not to confuse gdb by messing with the Session directly behind
gdb's back.

You mention
> a breakpoint API for instance. Is this something that librr will
> implement itself

Yes. rr already has an internal breakpoint API, it's just a matter of
exposing that. This would let you add and remove breakpoints and provide
notifications when breakpoints are hit.

(and if so ptrace process limitations might be a
> problem)

Not sure what the problem is here. rr ptraces all the tasks it controls.
You would not be able to ptrace those tasks directly, but you shouldn't
need to; we can provide rr APIs to proxy any requests you need.

oIo otoeololo oyooouo otohoaoto oaonoyooonoeo owohooo oioso oaonogoroyo
owoiotoho oao oboroootohoeoro oooro osoiosotoeoro owoiololo oboeo
osouobojoeocoto otooo ojouodogomoeonoto.o oAogoaoiono,o oaonoyooonoeo
osoaoyoso otooo oao oboroootohoeoro oooro osoiosotoeoro,o o‘oRoaocoao,o’o
oaonosowoeoroaoboloeo otooo otohoeo ocooouoroto.o oAonodo oaonoyooonoeo
osoaoyoso,o o‘oYooouo ofooooolo!o’o owoiololo oboeo oiono odoaonogoeoro
otohoeo ofoioroeo ooofo ohoeololo.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/rr-dev/attachments/20141015/1ddf5b46/attachment.html>

More information about the rr-dev mailing list