Infinity Full-System Preview NOW AVAILABLE
If you’ve been following Infinity and would like to, you know, download some code and try it out… well, now you can!
Name: Gary Benson
Member since: 2001-05-31 00:39:54
Last Login: 2012-10-24 12:18:42
Homepage: http://gbenson.net/
Notes:
I work for Red Hat.
Infinity Full-System Preview NOW AVAILABLE
If you’ve been following Infinity and would like to, you know, download some code and try it out… well, now you can!
Full-system Infinity preview coming up
I’ve released bits and pieces of Infinity over the past year, but nothing that really brings everything together. Right now I’m working on an initial full-system release of everything to do with Infinity so far. It’s codenamed “First Flight”, and you’ll be able to actually use it, see how everything hangs together, and generally get a better idea of what the point of it all is.
First Flight will be just enough for GDB to attach to a live process or start with a core file. “info threads
” should work, “print errno
” will not. First Flight will comprise:
git clone
and build to get a libpthread.so with Infinity notes for map_lwp2thr
, thr_get_info
and thr_iter
.The libthread_db.so shim won’t be used in future releases—they’ll have support for Infinity built into GDB—but it’ll likely remain as a nice example of how to use libi8x.
I’m targeting June 23 as the release date for First Flight. You can follow how I’m doing on the Infinity Roadmap (thank you Sergio!)
Infinity client library
This past few weeks I’ve been working on an Infinity client library. This is what GDB will use to execute notes it finds. It’s early days, but it executed its first note this morning so I thought I’d put something together so people can see what I’m doing. Here’s how to try it out:
tlsdump
example program needs it:
sudo yum install elfutils-libelf-devel # Fedora, RHEL, etc... sudo apt-get install libelf-dev # Debian, Ubuntu, etc...
git clone -b libi8x-0.0.1 https://github.com/gbenson/libi8x.git libi8x-0.0.1 cd libi8x-0.0.1 ./autogen.sh ./configure --enable-logging --enable-debug make
tlsdump
example program built:
bash$ ls -l examples/tlsdump -rwxr-xr-x. 1 gary gary 5540 Apr 20 12:52 examples/tlsdump
Yeah, there it is! (if it’s not there go back to step 0)
gcc -o tests/ifact tests/ifact.S tests/main.c
bash$ tests/ifact & [2] 8301 Hello world I'm 8301
tlsdump
example program with the test program’s PID as it’s argument:
$ examples/tlsdump 8301 0! = 1 1! = 1 2! = 2 3! = 6 4! = 24 5! = 120 6! = 720 7! = 5040 8! = 40320 9! = 362880 10! = 3628800 11! = 39916800 12! = 479001600
What just happened? The executable test/ifact
you built contains a single Infinity note, test::factorial(i)i
, the source for which is in tests/ifact.i8
. The tlsdump
example located the ifact
executable, loaded test::factorial(i)i
from it, and ran it a few times printing the result:
err = i8x_ctx_get_funcref (ctx, "test", "factorial", "i", "i", &fr); if (err != I8X_OK) error_i8x (ctx, err); err = i8x_xctx_new (ctx, 512, &xctx); if (err != I8X_OK) error_i8x (ctx, err); for (int i = 0; iTo see some debug output try this:
I8X_LOG=debug examples/tlsdump PIDAlso try
I8X_DEBUG=true
in addition toI8X_LOG=debug
to trace the bytecode as it executes.
Infinity status
I’m winding down for a month away from Infinity. The current status is that the language and note format changes for 0.0.2 are all done. You can get them with:
git clone https://github.com/gbenson/i8c.git
There’s also the beginnings of an Emacs major mode for i8 in there too. My glibc tree now has notes for td_ta_thr_iter
as well as td_ta_map_lwp2thr
. That’s two of the three hard ones done. Get them with:
git clone https://github.com/gbenson/glibc.git -b infinity2
FWIW td_thr_get_info
is just legwork and td_thr_tls_get_addr
is just a wrapper for td_thr_tlsbase
; td_thr_tlsbase
is the other hard note.
All notes have testcases with 100% bytecode coverage. I may add a flag for I8X to make not having 100% coverage a failure, and make glibc use it so nobody can commit notes with untested code.
The total note size so far is 720 bytes so I may still manage to get all five libpthread notes implemented in less than 1k:
Displaying notes found at file offset 0x00018f54 with length 0x000002d0: Owner Data size Description GNU 0x00000063 NT_GNU_INFINITY (inspection function) Signature: libpthread::__lookup_th_unique(i)ip GNU 0x00000088 NT_GNU_INFINITY (inspection function) Signature: libpthread::map_lwp2thr(i)ip GNU 0x000000cd NT_GNU_INFINITY (inspection function) Signature: libpthread::__iterate_thread_list(Fi(po)oipii)ii GNU 0x000000d2 NT_GNU_INFINITY (inspection function) Signature: libpthread::thr_iter(Fi(po)oiipi)i
gary certified others as follows:
Others have certified gary as follows:
[ Certification disabled because you're not logged in. ]
New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.
Keep up with the latest Advogato features by reading the Advogato status blog.
If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!