Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Duane Ellis <duane@duaneellis.com>
To: gdb@sourceware.org
Subject: GDB Python - gdb.execute() - with a timeout?
Date: Mon, 27 Jul 2015 12:23:00 -0000	[thread overview]
Message-ID: <10FC35DB-816C-4A6C-A342-ED8E5DAC3E7D@duaneellis.com> (raw)

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.


             reply	other threads:[~2015-07-27 12:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-27 12:23 Duane Ellis [this message]
2015-07-28 10:09 ` Ofir Cohen
2015-07-28 12:14   ` Duane Ellis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=10FC35DB-816C-4A6C-A342-ED8E5DAC3E7D@duaneellis.com \
    --to=duane@duaneellis.com \
    --cc=gdb@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox