From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13405 invoked by alias); 31 May 2011 17:44:43 -0000 Received: (qmail 13394 invoked by uid 22791); 31 May 2011 17:44:42 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 31 May 2011 17:44:28 +0000 Received: (qmail 11011 invoked from network); 31 May 2011 17:44:28 -0000 Received: from unknown (HELO scottsdale.localnet) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 31 May 2011 17:44:28 -0000 From: Pedro Alves To: gdb@sourceware.org Subject: Re: Python and target-async Date: Tue, 31 May 2011 17:44:00 -0000 User-Agent: KMail/1.13.6 (Linux/2.6.38-8-generic; KDE/4.6.2; x86_64; ; ) Cc: Kevin Pouget References: In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201105311844.25465.pedro@codesourcery.com> 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-05/txt/msg00140.txt.bz2 I've read this about 5 times, and I still have trouble identifying exactly what it is you're saying is broken. Is is the second example showing a couple of frames before the "waitpid" line? In your example you have "set target-async on" twice. Was that a pasto? What exactly do you think is wrong, and what did you expect was the right output? On Tuesday 31 May 2011 14:51:45, Kevin Pouget wrote: > Hello, > > I'm facing a problem with Python not behaving correctly when > "target-async" is on. I'll report it in the bugtracker if someone else > confirms the problem: > > (replace PID by any process ID to which you can attach) > > > (gdb) set target-async on > > (gdb) py gdb.execute("attach PID") ; gdb.execute("where") > > 0x0000003cbd0aa47e in waitpid () from /lib64/libc.so.6 > > #0 0x0000003cbd0aa47e in waitpid () from /lib64/libc.so.6 > > #1 0x000000000043ede2 in ?? () > > #2 0x000000000044005f in wait_for () > > #3 0x0000000000430c45 in execute_command_internal () > > #4 0x0000000000430e0e in execute_command () > > #5 0x000000000041d526 in reader_loop () > > #6 0x000000000041ccde in main () > > (gdb) detach > > Detaching from program ... > > (gdb) set target-async on > > (gdb) py gdb.execute("attach PID") ; gdb.execute("where") > > #0 0x0000003cbd0aa47e in ?? () > > #1 0x0000000000000000 in ?? () > > 0x0000003cbd0aa47e in waitpid () from /lib64/libc.so.6 > > --> the inferior can't be access normally > > the problem lies in the fact that GDB doesn't return from Python > between the `attach' and the `where', (the situation occurs during a > Python function calls as well). > > > (gdb) set target-async on > > (gdb) py gdb.execute("attach PID") > > (gdb) py gdb.execute("where") > > works correctly. > > > I'm not sure there is something I can do to solve it, any idea what I > should look for? > > > thanks, > > Kevin > -- Pedro Alves