From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 44777 invoked by alias); 27 Jul 2015 12:23:31 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 44767 invoked by uid 89); 27 Jul 2015 12:23:30 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_NONE autolearn=no version=3.3.2 X-HELO: p3plsmtpa09-06.prod.phx3.secureserver.net Received: from p3plsmtpa09-06.prod.phx3.secureserver.net (HELO p3plsmtpa09-06.prod.phx3.secureserver.net) (173.201.193.235) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Mon, 27 Jul 2015 12:23:28 +0000 Received: from [10.75.25.56] ([67.52.130.29]) by p3plsmtpa09-06.prod.phx3.secureserver.net with id xQPS1q0010eC05P01QPSBl; Mon, 27 Jul 2015 05:23:27 -0700 From: Duane Ellis Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: GDB Python - gdb.execute() - with a timeout? Message-Id: <10FC35DB-816C-4A6C-A342-ED8E5DAC3E7D@duaneellis.com> Date: Mon, 27 Jul 2015 12:23:00 -0000 To: gdb@sourceware.org Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2102\)) X-IsSubscribed: yes X-SW-Source: 2015-07/txt/msg00060.txt.bz2 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(=E2=80=9Cload foobar=E2=80=9D) =09 gdb.execute(=E2=80=9Cbreak test_breakpoint=E2=80=9D) gdb.execute(=E2=80=9Crun=E2=80=9D) gdb.execute(=E2=80=9Cset test_flag=3D0x1234=E2=80=9D) gdb.execute(=E2=80=9Ccont=E2=80=9D) <=E2=80=94 HERE Is where I want a tim= eout # At this point, we should eventually hit the =E2=80=9Ctest_breakpoint=E2= =80=9D # However in some cases we do not. the timeout needs to be =E2=80=98reasonably programable=E2=80=99 - 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 bre= akpoint.=20 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?=20 Thanks.