From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11140 invoked by alias); 18 Jun 2007 14:57:46 -0000 Received: (qmail 11132 invoked by uid 22791); 18 Jun 2007 14:57:46 -0000 X-Spam-Check-By: sourceware.org Received: from mail.gmx.net (HELO mail.gmx.net) (213.165.64.20) by sourceware.org (qpsmtpd/0.31) with SMTP; Mon, 18 Jun 2007 14:57:44 +0000 Received: (qmail invoked by alias); 18 Jun 2007 14:57:41 -0000 Received: from port-83-236-52-166.dynamic.qsc.de (EHLO port-83-236-52-166.dynamic.qsc.de) [83.236.52.166] by mail.gmx.net (mp050) with SMTP; 18 Jun 2007 16:57:41 +0200 X-Authenticated: #9832049 From: Maik Beckmann To: gdb@sourceware.org Subject: Re: how to view content in stl vector Date: Mon, 18 Jun 2007 14:57:00 -0000 User-Agent: KMail/1.9.7 References: <200706181634.31544.maikbeckmann@gmx.de> <20070618144438.GA22051@caradoc.them.org> In-Reply-To: <20070618144438.GA22051@caradoc.them.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200706181657.05961.maikbeckmann@gmx.de> X-Y-GMX-Trusted: 0 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: 2007-06/txt/msg00146.txt.bz2 Am Montag, 18. Juni 2007 16:44:38 schrieb Daniel Jacobowitz: > I don't know. It may just be broken. I did provoke an amusing > internal error trying to get it to work... > > (gdb) p 'int f'() > /space/debian/gdb/build-area/gdb-6.6.dfsg/gdb/valops.c:2112: > internal-error: find_oload_champ_namespace_loop: Assertion > `new_oload_champ != -1' failed. > A problem internal to GDB has been detected, This works: 1. start and run gdb: 2.look for the matching disassembly line 0x08048972 : call 0x8048b66 <_Z3fooIiEbT_> 3. let gdb say what it has to say: output _Z3fooIiEbT_ {bool (int)} 0x8048b66 (int)> 4. call it like this: p ({bool (int)} 0x8048b66)(i) $1 = true The gdb-bug causes one extra step. However, as far as I understand it should be possible to wrap this and the typename-storing stuff into convenience functions, if your plan to get python into gdb-business succeeds. many thanks to you Daniel, Maik Beckmann