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]

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


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.


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