From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23678 invoked by alias); 17 Oct 2014 10:53:01 -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 23664 invoked by uid 89); 17 Oct 2014 10:53:00 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-wg0-f41.google.com Received: from mail-wg0-f41.google.com (HELO mail-wg0-f41.google.com) (74.125.82.41) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Fri, 17 Oct 2014 10:52:59 +0000 Received: by mail-wg0-f41.google.com with SMTP id b13so622776wgh.12 for ; Fri, 17 Oct 2014 03:52:55 -0700 (PDT) X-Received: by 10.194.206.72 with SMTP id lm8mr9642224wjc.70.1413543175913; Fri, 17 Oct 2014 03:52:55 -0700 (PDT) MIME-Version: 1.0 Received: by 10.216.106.68 with HTTP; Fri, 17 Oct 2014 03:52:15 -0700 (PDT) In-Reply-To: <5440EB39.2060305@redhat.com> References: <543FBDFF.3050709@redhat.com> <104DEFBD-D686-4290-8E3C-725A51C165E6@dell.com> <7BB30632-15BE-4EF8-B84F-D35A27772F18@dell.com> <5440EB39.2060305@redhat.com> From: =?UTF-8?Q?=C3=96mer_Sinan_A=C4=9Facan?= Date: Fri, 17 Oct 2014 10:53:00 -0000 Message-ID: Subject: Re: recursion limit exceeded in Python API, but there's only one function in traceback To: Phil Muldoon Cc: paul_koning , gdb Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2014-10/txt/msg00060.txt.bz2 > Right. gdb.execute won't return until the command has completed. Also the > Python GIL has been acquired (as this is coming from the Python interpreter) > and so now Python is also blocked too. So in effect the only thing running > at this point is the gdb.execute command that was invoked (in your case, the > continue command). That will return, and then the Python GIL will be released > and the rest of the script will continue. > > I have a patch I need to upstream that adds a release_gil keyword to > gdb.execute. This optionally releases the GIL before executing the command. > But I have not got around to that yet. IMO, something like dont_block would be more useful for me. What I would expect from that argument is that when it's True then `gdb.execute` would return immediately after GDB starts running the command. > A workaround would be to post any gdb.execute statements into the GDB event > loop. See gdb.post_event. That will return immediately and the gdb.execute > function will be scheduled to be called in the event loop. Note there is no > guarantee when this is. But as long as GDB is not busy processing other > events it usually means right away. Thanks for the tip. I'll try that. Do you think adding something like `dont_block` would be hard? Maybe I can hack on that this weekend.