Ok, so this time I won’t talk about Python scripting support in GDB. I’m getting tired of it myself. I’ll just comment that it’s amazing the number of problems people in IRC report with GDB that can be solved with the Python support that we’re adding to it. Sometimes they need stuff which is only on the branch, but sometimes even the few bits already in CVS HEAD are enough!
Er, I actually do have one more thing to say about the subject: GDB had one project accepted in the Google Summer of Code 2009. Oguz Kayral is the student working on it, and I am his mentor. He will add support for subscribing to inferior events (e.g., signals, process and thread stops, thread creation) from Python. One use case for which this is useful was given by an IRC user at the #gdb channel:
<LimCore> how to run gdb from command line, so that it will run ./foo.bin with arguments: foo bar baz and it will run it instantly without waiting for ‘r’; And if program segfaults then it will do ‘bt’ without waiting for the command. (and if program terminates normally then it will also just quit)
LimCore will be able to write a simple and short Python script using the events API to solve his problem.
Now, moving on to other items: my team has been asked to improve GDB support for the hardware debug facilities in embedded PowerPC processors (for more info about these facilities, see Chapter 10 of Book III-E of the Power ISA v2.06). I announced this work to the GDB mailing list back in early March, and got useful insight from Joel Brobecker.
Today I posted an update on where we are with this work. We have the following ready for both native GDB and gdbserver on Linux:
- one additional hardware watchpoint (two in total),
- four hardware breakpoints,
- one ranged hardware watchpoint.
And we still have the following features ahead of us:
- support for the two DVC (Data Value Compare) registers, which enable hardware-accelerated conditions for hardware watchpoints,
- two ranged hardware breakpoints.
Last and least, I was thinking of posting monthly GDB updates on what happened in GDB in the previous month as I did back in February, but I got busy and didn’t get around to it. I still entertain the idea though, so if you think it’s worth it, I’d be glad to know.