From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18681 invoked by alias); 31 May 2011 13:52:21 -0000 Received: (qmail 18671 invoked by uid 22791); 31 May 2011 13:52:20 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST,T_TO_NO_BRKTS_FREEMAIL 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; Tue, 31 May 2011 13:52:07 +0000 Received: by vws4 with SMTP id 4so4360901vws.0 for ; Tue, 31 May 2011 06:52:06 -0700 (PDT) Received: by 10.221.9.136 with SMTP id ow8mr2402197vcb.78.1306849926175; Tue, 31 May 2011 06:52:06 -0700 (PDT) MIME-Version: 1.0 Received: by 10.220.199.1 with HTTP; Tue, 31 May 2011 06:51:45 -0700 (PDT) From: Kevin Pouget Date: Tue, 31 May 2011 13:52:00 -0000 Message-ID: Subject: Python and target-async To: 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-05/txt/msg00139.txt.bz2 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 =A00x0000003cbd0aa47e in waitpid () from /lib64/libc.so.6 > #1 =A00x000000000043ede2 in ?? () > #2 =A00x000000000044005f in wait_for () > #3 =A00x0000000000430c45 in execute_command_internal () > #4 =A00x0000000000430e0e in execute_command () > #5 =A00x000000000041d526 in reader_loop () > #6 =A00x000000000041ccde in main () > (gdb) detach > Detaching from program ... > (gdb) set target-async on > (gdb) py gdb.execute("attach PID") ; gdb.execute("where") > #0 =A00x0000003cbd0aa47e in ?? () > #1 =A00x0000000000000000 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