This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Gsoc Wrap-up Report


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]