This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[RFC][PATCH 00/22] Add Infinity notes implementing td_ta_map_lwp2thr


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 grew from a need for
GDB to be able to debug multithreaded inferiors without requiring
libthread_db, but it's suitable for other systems that need to expose
internals to debuggers such as the run-time linker (e.g. for dlmopen
support) 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.

This series adds Infinity notes implementing libthread_db's
td_ta_map_lwp2thr to libpthread.so.  This series isn't complete--GDB
needs (I think) four other libthread_db functions implementing as
notes before it can completely work without libthread_db--but I'm
posting this now as an RFC to get comments on the general methodology,
how it's hooked into the glibc build system, and, well, anything
really!  There is not GDB support for Infinity yet, that's the next
phase...

This series makes the most sense if you start at the end and read it
backwards.  The last patch (22/22, Add Infinity notes implementing
td_ta_map_lwp2thr) contains a fairly detailed message explaining
at least some of what's going on.

If you want to test this series the easiest way is to clone the
"infinity" branch from my repo:

  git clone git@github.com:gbenson/glibc.git -b infinity

I'll leave that branch alone and do my future work on another.

To build and test notes you need to install I8C and I8X, the note
compiler and note test harness respectively.  Details of how to
install these are at <https://pypi.python.org/pypi/i8c/> but (TL;DR)
type this:

  sudo apt-get install python-pip
   or
  sudo yum install python-pip

and this:

  pip install --user i8c

and you should have the commands "i8c" and "i8x" in your path.  The
build will of course still work without them, but you won't get any
notes!  "make check" will test the notes if I8X is installed; you
should see its output in /path/to/build/nptl/tst-infinity.out and
/path/to/build/nptl/tst-infinity.test-result.

There's some documentation at <https://sourceware.org/gdb/wiki/Infinity>.
It's a work in progress, so the longer you leave it before looking
there the more documentation there will be :)  Most of the useful
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@.

Thanks for reading,
Gary

--
http://gbenson.net/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]