Infinity

Gary Benson gbenson@redhat.com
Tue Oct 20 15:42:00 GMT 2015


Hi all,

I've been working on a platform-independent system for executables and
shared libraries to export information to debuggers and other software
development tools.  It's called Infinity.  It's basically so we can
debug multithreaded inferiors without requiring libthread_db, but it's
suitable for other systems such as the run-time linker (e.g. so we can
support dlmopen) and OpenMP.  Rather than requiring a plugin library
that the debugger loads, in Infinity inspection functions are shipped
as DWARF bytecode in ELF notes in the actual library they are for, so,
e.g., the notes implementing what libthread_db.so currently implements
will live in libpthread.so.  The idea is that GDB keeps a track of the
notes it finds in objfiles it's loaded, and when complete sets arrive
it enables that particular subsystem, so, when the five notes GDB
needs to support multithreaded inferiors appear then thread debugging
switches on.  (The five notes are those corresponding to libthread_db's
td_ta_map_lwp2thr, td_thr_get_info, td_thr_tls_get_addr, td_thr_tlsbase
and td_ta_thr_iter).

I just mailed an RFC to the glibc list with notes implementing
map_lwp2thr function to get some feedback.  The series starts here:

  https://sourceware.org/ml/libc-alpha/2015-10/msg00690.html

I've no GDB patches yet (that's my next month or so's work) but it's
not completely untested in GDB.  A month or so ago I put together a
GDB that loaded notes and could interpret them; I ran it with an old
version of Infinity map_lwp2thr in parallel with libthread_db's, so
the concept works.

I'm currently documenting the system on the wiki, starting here:

  https://sourceware.org/gdb/wiki/Infinity

It's by no means complete but I'll be filling it in over the next few
days.  Most of the important concepts have at least placeholder pages
so if you subscribe to those you'll get emails as I write.

Infinity's mailing list is infinity@sourceware.org, so please
subscribe if you're interested (by sending an empty message to
infinity-subsribe@).

Cheers,
Gary

-- 
http://gbenson.net/



More information about the Gdb-patches mailing list