From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31881 invoked by alias); 15 Jun 2009 17:33:51 -0000 Received: (qmail 31842 invoked by uid 22791); 15 Jun 2009 17:33:50 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.33.17) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 15 Jun 2009 17:33:44 +0000 Received: from zps78.corp.google.com (zps78.corp.google.com [172.25.146.78]) by smtp-out.google.com with ESMTP id n5FHXZUE010659 for ; Mon, 15 Jun 2009 18:33:36 +0100 Received: from qw-out-1920.google.com (qwj9.prod.google.com [10.241.195.73]) by zps78.corp.google.com with ESMTP id n5FHXX4W026815 for ; Mon, 15 Jun 2009 10:33:33 -0700 Received: by qw-out-1920.google.com with SMTP id 9so2075515qwj.24 for ; Mon, 15 Jun 2009 10:33:32 -0700 (PDT) MIME-Version: 1.0 Received: by 10.229.110.21 with SMTP id l21mr1433827qcp.26.1245087212813; Mon, 15 Jun 2009 10:33:32 -0700 (PDT) In-Reply-To: References: <629542d40906142322h733ad7ffr3d6daeb7b306ff7a@mail.gmail.com> Date: Mon, 15 Jun 2009 17:33:00 -0000 Message-ID: <8ac60eac0906151033vccfba7fj5775af977778b901@mail.gmail.com> Subject: Re: Modify address of a gdb.Value From: Paul Pluzhnikov To: Vladimir Prus Cc: gdb@sources.redhat.com Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-System-Of-Record: true 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: 2009-06/txt/msg00150.txt.bz2 On Mon, Jun 15, 2009 at 10:05 AM, Vladimir Prus wrote: > Tom Tromey wrote: >> Nobody has implemented inferior function calls using Value yet. But (I believe) an equivalent could be achieved by constructing a string representation, and then calling gdb.parse_and_eval() on it [1]. However, I've been burned by doing so: in multi-threaded program parse_and_eval (and I think inferior function call) resumes inferior, and that causes no end of grief (including possible recursive entry back into python, which triggers GDB assertions :-( Tom, you may want to mention this gotcha when you expand parse_and_eval documentation. [1] parse_and_eval is not yet in mainline; the current patch for it is here: http://sourceware.org/ml/gdb-patches/2009-06/msg00326.html Cheers, -- Paul Pluzhnikov