From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7940 invoked by alias); 20 Apr 2011 07:36:47 -0000 Received: (qmail 7798 invoked by uid 22791); 20 Apr 2011 07:36:45 -0000 X-SWARE-Spam-Status: No, hits=-1.5 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST X-Spam-Check-By: sourceware.org Received: from mail-vw0-f41.google.com (HELO mail-vw0-f41.google.com) (209.85.212.41) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 20 Apr 2011 07:36:30 +0000 Received: by vws4 with SMTP id 4so497876vws.0 for ; Wed, 20 Apr 2011 00:36:29 -0700 (PDT) Received: by 10.52.108.136 with SMTP id hk8mr5339602vdb.28.1303284988083; Wed, 20 Apr 2011 00:36:28 -0700 (PDT) MIME-Version: 1.0 Received: by 10.220.61.6 with HTTP; Wed, 20 Apr 2011 00:36:08 -0700 (PDT) In-Reply-To: References: From: Kevin Pouget Date: Wed, 20 Apr 2011 07:36:00 -0000 Message-ID: Subject: Re: [Python] Input from user from extended breakpoint `stop' function To: pmuldoon@redhat.com, Andreas Schwab Cc: gdb@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes 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 X-SW-Source: 2011-04/txt/msg00105.txt.bz2 >> Any solution, or shall I send a bug report? > Bug report please. http://sourceware.org/bugzilla/show_bug.cgi?id=3D12686 (what does PR mean ?) >> The terminal still belongs to the inferior. =A0Before gdb is doing any >> input it must call terminal_ours. that's interesting, but why `print' functions work correctly, without sending any SIGTTOU > Thanks, that is good info. I did not know that. =A0I wonder if we should > call that before handing over control to the python executed script in > the breakpoint "stop" callback? Or maybe provide a Python API call to > turn control of the TTY to GDB and likewise to the inferior. > > Any opinions on this would be great. What do you (all) think? I would prefer a python-transparent handling, ie `terminal_ours' called before giving the hand to the Python callback, to hide GDB's complexity from the script interface (I guess there won't be so many situations where this case occurs?). However if `terminal_ours' is very costly (in comparison to the breakpoint itself), it might not be very wise ... Cordially, Kevin