Fedora 13: Developer friendly debugging [GDB, SystemTap StaticProbes, C, C++, Python]
In Fedora 13, we include SystemTap Static Probes, which application developers can use to understand how their code is interacting with system resources.
SystemTap includes its own scripting language, and David Malcolm used this capability to develop a Python-based “top” function, to show Python activity across the entire running system. But beyond that, he also created an additional script that developers can use to see their applications calling and returning from individual Python functions. The combination of these tools in Fedora 13 can give developers immediate insight not only into their program’s flow, but also into how their application spends its time, and where bottlenecks might be occurring.
But that’s not all. We anticipate that Fedora 13 also will include a new feature for integrated debugging of Python and C/C++ libraries using the GNU debugger (gdb). The Python programming language is simple, readable, and powerful, but it is not as fast as those that are compiled into pure machine code. Programmers often use Python with compiled libraries written in C or C++ language to enhance speed. However, in the past this made debugging more difficult as a program would wind its way in and out of the different kinds of code. In Fedora 13, though, the GNU debugger can provide information needed to debug both the interpreted and the compiled code, making the developer more effective at identifying and squashing bugs.
Previous releases were limited to tracing probe points in the Linux kernel, said Fedora Project leader Paul Frields. Now, developers can optimize applications written in Python. "We needed a way to provide easier tracing of Python activity system-wide," Frields explained. Developers can load a SystemTap script and display a list of the biggest consumers of CPU time and memory space, as well as seeing entry and exit points through Python libraries, he added. "They can watch code as it steps into and out of functions all the way down through the Python stack."
The SystemTap project will likely extend support to other popular languages, Frields said. "My expectation is MySQL and Perl will be entering quickly. You may find other languages like Ruby and PHP soon after."
Similarly, GDB "Project Archer", a GDB development branch with better C++ support and Python scripting capabilities, made its debut with Fedora 11 and now in Fedora 13 we have a smarter GDB that every Python programmer should celebrate.
Fedora also provides new support for developers mixing Python and C/C++ libraries. Developers no longer find themselves up "against a wall," and they may use GDB (the GNU Project debugger) to debug "through the entire stack passing through the library space to the Python application and back again," Frields said.
Fedora + Python:
Fedora + SystemTap + Python:
SystemTap for MySQL/Drizzle: