Improved Linux debugging with Chronicle
[Posted May 2, 2007 by cook]
Last December, as examined in a
previous LWN article,
Robert O'Callahan
discussed the need for better debugging tools under Linux:
One of the painful truths about Linux development is that debugging sucks. Specifically, gdb on Linux sucks. Basic functionality simply does not work reliably. The details of the brokenness vary depending on the version, but the general suckiness seems to hold up across versions. Since it fails on the basics, we need not even discuss the lack of modern features or its appalling usability. This is a big problem for Linux because it is driving developers away from the platform.
Here's a deeper and less widely understood truth: all debuggers suck.
The article suggested that a big problem with most debuggers was the
inability to move backward through buggy code (reverse execution).
O'Callahan produced a paper on the topic entitled
Efficient Collection And Storage Of Indexed Program Traces [PDF]
and introduced the Amber project.
Amber started out with a patent liability problem due to
O'Callahan's employment by Novell. Fortunately, that issue was
resolved early on:
"Novell has generously granted permission to release Amber as open source."
Amber underwent a name change, and is now known as the
chronicle-recorder project.
"Chronicle records every memory and register write in the execution of a Linux process, using
Valgrind
to instrument execution at the machine code and system call level. These events are indexed and compressed; from the resulting database the Chronicle query tool can efficiently reconstruct the state of memory and/or registers at any point during the execution. Additional queries such as "when was the last write to location X before time T" and "when was location X executed between times T1 and T2" are also supported."
On the topic of licensing, the Chronicle README file says:
Valgrind is under the GPL. The Valgrind 'chronicle' tool's main.c file
is also under the GPL. The tool's headers --- arch.h, log_stream.h, and
effects.h --- use an X11 license, so they can be included by anyone. The
Chronicle 'indexer' and 'query' components are GPLed. They rely on a
'base' component whose files have an X11 license (including a simple C
JSON library).
The intent is that the individual Chronicle components are GPLed but
since they run in separate processes communicating via clearly defined
interfaces, non-GPLed code can communicate with them. In particular,
debugger front ends can use any license."
O'Callahan discussed the new project with his
Chronicle Released article, and discussed some new debugging
capabilities that Chronicle brings with a followup article on
History Based Stack Reconstruction.
The code is currently in an early state, the user interface is still in
the planning stages and tests are limited.
For more information on Chronicle's author,
Robert O'Callahan was featured in a February, 2007
Computerworld NZ interview.
(Thanks to Danny O'Brien for pointing out the latest Chronicle developments).
(
Log in to post comments)