GDB Scripts

Andrew Cagney ac131313@ges.redhat.com
Tue Aug 20 19:39:00 GMT 2002


> Hello All,
> 
> Im fairly new to GDB and the Linux environment, and was wondering if there was
> any way to set up some sort of 'script' within GDB so that when it recieves a
> particular message it performs a command. i.e. Say the program it is debugging
> recieves a SIGKILL message when GDB pauses when recieving this message, it
> would issue a command.
> 
> Thanks for any info.

At present it is possible to attach commands to events like breakpoints 
and (if they were implemented on linux) C++ throw/catch.  Unfortunatly 
it isn't possible to use that mechanism for signals.  I think it should 
be possible though, and would be a very useful feature.

http://sources.redhat.com/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gdb&pr=116

Andrew




More information about the Gdb mailing list