From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5067 invoked by alias); 7 May 2013 13:44:09 -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 5057 invoked by uid 89); 7 May 2013 13:44:09 -0000 X-Spam-SWARE-Status: No, score=-7.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.1 Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Tue, 07 May 2013 13:44:08 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r47Dhx59015517 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 7 May 2013 09:43:59 -0400 Received: from barimba (ovpn-113-163.phx2.redhat.com [10.3.113.163]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r47DhvaG028005 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Tue, 7 May 2013 09:43:58 -0400 From: Tom Tromey To: Marc =?utf-8?Q?Br=C3=BCnink?= Cc: Pedro Alves , Doug Evans , gdb Subject: Re: Timer References: <52771B43-9617-412D-B9F8-5730757D6BAF@nus.edu.sg> <5188BFC1.8090607@redhat.com> Date: Tue, 07 May 2013 13:44:00 -0000 In-Reply-To: ("Marc \=\?utf-8\?Q\?Br\=C3\=BCnink\=22's\?\= message of "Tue, 7 May 2013 18:18:22 +0800") Message-ID: <87d2t2x5uq.fsf@fleche.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-SW-Source: 2013-05/txt/msg00039.txt.bz2 >>>>> "Marc" =3D=3D Marc Br=C3=BCnink writes: Pedro> I guess you could do it with gdb python scripting too. Marc> This would be nice but does not work. As far as I remember there is a Marc> sigsupend in linux-nat.c which will thwart using a simple Marc> threading.Timer. But I might be wrong here. Whatever the reason, it Marc> does not work. I would try making a new thread in Python and setting timers in this thread. Then, when a timer fires, have it use gdb.post_event to send an event to the gdb thread. This event would use gdb.execute("interrupt") to stop the inferior and trigger some processing. I'm not totally sure this will work. If not it would be interesting to know what is needed to make it work. I think at the very least it shows that inferior control isn't exposed very well to Python. Tom