From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28700 invoked by alias); 16 Sep 2010 09:49:38 -0000 Received: (qmail 28691 invoked by uid 22791); 16 Sep 2010 09:49:37 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from smtp.nokia.com (HELO mgw-mx03.nokia.com) (192.100.122.230) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 16 Sep 2010 09:49:31 +0000 Received: from vaebh106.NOE.Nokia.com (vaebh106.europe.nokia.com [10.160.244.32]) by mgw-mx03.nokia.com (Switch-3.3.3/Switch-3.3.3) with ESMTP id o8G9n22Z008199 for ; Thu, 16 Sep 2010 12:49:27 +0300 Received: from esebh102.NOE.Nokia.com ([172.21.138.183]) by vaebh106.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.4675); Thu, 16 Sep 2010 12:48:45 +0300 Received: from mgw-da01.ext.nokia.com ([147.243.128.24]) by esebh102.NOE.Nokia.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Thu, 16 Sep 2010 12:48:44 +0300 Received: from gar.localnet (berwst16747.europe.nokia.com [172.25.167.47]) by mgw-da01.ext.nokia.com (Switch-3.3.3/Switch-3.3.3) with ESMTP id o8G9mgEp013215 for ; Thu, 16 Sep 2010 12:48:43 +0300 From: =?iso-8859-1?q?Andr=E9_P=F6nitz?= To: gdb@sourceware.org Subject: Re: Python API questions and use cases Date: Thu, 16 Sep 2010 09:49:00 -0000 User-Agent: KMail/1.13.2 (Linux/2.6.32-21-generic; KDE/4.4.2; i686; ; ) References: In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Message-Id: <201009161148.37670.andre.poenitz@nokia.com> X-Nokia-AV: Clean 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: 2010-09/txt/msg00093.txt.bz2 On Thursday 16 September 2010 09:32:31 ext Joel Borggr=E9n-Franck wrote: > > I think the tricky part is getting a Value holding the appropriate > > constant. For that you might not have anything better, at present, than > > parse_and_eval. >=20 > True. Then I think this would be useful: >=20 > gdb.new_address(addr) - returns a new gdb.Value (of type (void *)) pointi= ng > to addr. addr is checked to be within bounds of the address space of the > inferior upon creation. gdb.Value(addr).cast(gdb.lookup_type('void').pointer()) should do the trick. Andre'