* Infinity client library first look
@ 2016-04-20 14:49 Gary Benson
0 siblings, 0 replies; only message in thread
From: Gary Benson @ 2016-04-20 14:49 UTC (permalink / raw)
This past few weeks I've been working on an Infinity client library
for programs to use to access and execute Infinity notes. It's very
alpha at the moment, but if you'd like to build and execute an
Infinity note there's instructions at <http://gbenson.net/?p=626>.
There's very little documentation as yet (and certainly no API/ABI
guarantees!) but you can see the shape of the library and the kind
of API to expect. The "tlsdump_process" function in examples/tlsdump.c
and the "process_notes" function it calls is the core of it all:
1. Use i8x_ctx_new to create a context.
2. Use i8x_note_new_from_buf, i8x_func_new_from_note and
i8x_ctx_register_func to load, compile and register note
functions into the context.
(3. Use i8x_inferior_new to create a representation of the inferior
process you're accessing. This isn't present yet, it's the
NULL in the arguments of i8x_xctx_call below.)
4. Use i8x_xctx_new to create an execution context.
5. Use i8x_ctx_get_funcref to get references to the functions
you're going to call.
6. Use i8x_xctx_call to execute the note functions.
The point of the context/inferior/execution context separation is to
allow for systems where one executable+solibs spawns multiple inferior
processes, and for multithreaded clients.
* one executable+solibs maps to one i8x_ctx
* one inferior process maps to one i8x_inferior
* one thread in your client maps to one i8x_xctx.
Full multithreaded support may not exist straight away (GDB doesn't
need it) but I didn't want to lay out an API/ABI that could never
I've never written a library before, so please hit me with your
questions and concerns!
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2016-04-20 14:49 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-20 14:49 Infinity client library first look Gary Benson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).