RR API Discussion (librr)

Robert O'Callahan robert at ocallahan.org
Wed Oct 29 06:37:11 PDT 2014


A basic Session API is now in place. RecordSession, ReplaySession and
DiversionSession expose APIs to let you record task-group execution, replay
a recording in a ReplaySession, clone ReplaySessions, and clone a
ReplaySession to a DiversionSession and run it. Each Session subclass
exposes a step() API that runs the tracees for some quantum and returns a
status, which includes values such as "reached a breakpoint". Access to
per-task state (including setting and clearing breakpoints and watchpoints)
is still through Task.

Next I plan to refactor the debugger support code in diverter.cc and
replayer.cc into two classes:
-- ExecutionManager: a class that manages a set of ReplaySessions for the
same replay, including a set of checkpoint sessions ordered by time and a
"current session". This can expose APIs to jump the current session to
certain events (intelligently choosing the best checkpoint as a starting
point). This is where we can add reverse execution simulation.
-- GdbServer: a class built on ExecutionManager that provides all the gdb
support. You should be able to initialize a GdbServer with a ReplaySession,
and then it will give you a port back you can connect gdb to, and then it
will provide the full set of rr features.

We can probably also provide a GdbServer constructor that takes any Session
and provides read-only access without any resume ability --- used for
EmergencyDebug.

I'll probably move the debugger_gdb code into a GdbServerProtocol class
along the way.

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


More information about the rr-dev mailing list