From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31553 invoked by alias); 16 Sep 2010 09:57:32 -0000 Received: (qmail 31544 invoked by uid 22791); 16 Sep 2010 09:57:31 -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:57:25 +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 o8G9uuJe011410 for ; Thu, 16 Sep 2010 12:57:21 +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:54:10 +0300 Received: from mgw-da02.ext.nokia.com ([147.243.128.26]) by esebh102.NOE.Nokia.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Thu, 16 Sep 2010 12:54:09 +0300 Received: from gar.localnet (berwst16747.europe.nokia.com [172.25.167.47]) by mgw-da02.ext.nokia.com (Switch-3.3.3/Switch-3.3.3) with ESMTP id o8G9s73G026428 for ; Thu, 16 Sep 2010 12:54:08 +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:57:00 -0000 User-Agent: KMail/1.13.2 (Linux/2.6.32-21-generic; KDE/4.4.2; i686; ; ) References: <4C91E3AE.6070500@wh2.tu-dresden.de> In-Reply-To: <4C91E3AE.6070500@wh2.tu-dresden.de> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Message-Id: <201009161154.02756.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/msg00094.txt.bz2 On Thursday 16 September 2010 11:30:22 ext Joachim Protze wrote: > Am 16.09.2010 09:32, schrieb Joel Borggr=E9n-Franck: > > On Wed, Sep 15, 2010 at 7:56 PM, Tom Tromey wrote: > >> I think the tricky part is getting a Value holding the appropriate > >> constant. For that you might not have anything better, at present, th= an > >> 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 *)) poin= ting > > to addr. addr is checked to be within bounds of the address space of the > > inferior upon creation. > >=20 >=20 > Where do you get this address from? I cannot imagine a case where you > get a valid address from others than from inferior. So you have the > address as gdb.Value already. There are lots of cases where the address is not in a gdb.Value already. The address may come from the inferior, but not through Python, e.g by parsing some CLI output. Or the address might be the result of some manual computation. Or the address is some fixed value also known on the outside.=20 Andre'