Gsoc Wrap-up Report

Oguz Kayral oguzkayral@gmail.com
Fri Aug 21 20:33:00 GMT 2009


Hi everyone,
GSoC is almost over. Here's a wrap-up report for what we have done this summer.

In the beginning we had this use case:
If program segfaults then gdb will do ‘bt’ without waiting for the
command and if program terminates normally then it will also just
quit.

The code in gsoc-kayral-python branch can now accomplish this with a
very simple Python script:

---
import gdb

def sigsegv_handler (event) :
    if (event.stop_signal == "SIGSEGV") :
        gdb.execute ("backtrace")

class Segfault (gdb.Command) :
    def __init__ (self, "segfault", gdb.COMMAND_STACK)

    def invoke (self, arg, from_tty) :
        gdb.selected_thread ().signal_stop_eventregistry.connect
(sigsegv_handler)
        print "sigsegv handler registered"

Segfault ()
---

Apart from this python is aware of other stop events (breakpoints and
signals in particular), continue events, thread exit events.

There are still things to work on (i.e. thread creation events) but
even in this situation, a lot of scripts are waiting to be written.



More information about the Gdb mailing list