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]

Re: Fully automating GDB (aka how to make canned command strings see the exit status)


On Thu, Mar 16, 2006 at 05:11:21PM +0000, Alex Bennee wrote:
> Hi,
> 
> I've got a program I'm trying to debug that crashes on a very
> intermittent basis. I suspect the core dumps I'm getting are incomplete
> so I would like to try and catch the the crash live in gdb.
> 
> I figure a canned script to run the program is the answer. However how
> do I tell if the program has exited successfully (in which case I can
> run again) to hitting the SEG and staying put for when I come back in
> the morning?

There's lots of ways you can do this.  There's nothing in the GDB
command line scripting language that will work, but you can drive
GDB using something like "expect" instead; have the expect script stop
when it sees a SIGSEGV in the output.

-- 
Daniel Jacobowitz
CodeSourcery


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