All, We script GDB to attach to our application when it crashes and generate a crash report giving lots of valuable information for developers to debug the problem. Before invoking GDB we know the LWPID and the PID so we attach to the PID (--pid), however, currently GDB only knows about its own threadids, we don't know this before invoking GDB but our script is already written, so I have created a small patch to the "thread" command to take a % option, and swtich to that thread. We thought you might be interested. Changelog --------- 2010-02-04 Scott Harrison * gdb/thread.c: Add support for LWPID to the thread command. Patch is attached. I realise that this patch may not be applicable to all platforms that gdb is used on, sorry. Kind regards, Scott Harrison --- TANDBERG Telecom UK Ltd Registered in England and Wales No: 3390345. Registered address: Unit 2 Pine Trees, Chertsey Lane, Staines, Middlesex, TW18 3HR