GDB Python - gdb.execute() - with a timeout?

Duane Ellis <[email protected]>
Newsgroups gmane.comp.gdb.devel
Message-ID <[email protected]>
Hi, am trying to script some times using GDB/Python specifically some test cases

The general format of my GDB_PY scripts are:

	import	gdb
	gdb.execute(“load foobar”)
	
	gdb.execute(“break test_breakpoint”)

	gdb.execute(“run”)
	gdb.execute(“set  test_flag=0x1234”)

	gdb.execute(“cont”)	 <— HERE Is where I want a timeout

	# At this point, we should eventually hit the “test_breakpoint”
	# However in some cases we do not.

the timeout needs to be ‘reasonably programable’ - i.e.:  1 second,  10 seconds, an hour would in some use cases be reasonable.

In other words, if my test case is running properly -  I should hit the breakpoint. 

I need a means to detect when things go wrong.

This problem is *NOT* limited to the TEST case

Is there some way to do this? 

Thanks.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.