From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 629 invoked by alias); 26 Aug 2008 16:41:44 -0000 Received: (qmail 616 invoked by uid 22791); 26 Aug 2008 16:41:43 -0000 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.31) with ESMTP; Tue, 26 Aug 2008 16:36:54 +0000 Received: from spaceape24.eur.corp.google.com (spaceape24.eur.corp.google.com [172.28.16.76]) by smtp-out3.google.com with ESMTP id m7QGad0d005800 for ; Tue, 26 Aug 2008 17:36:39 +0100 Received: from wa-out-1112.google.com (wahj5.prod.google.com [10.114.236.5]) by spaceape24.eur.corp.google.com with ESMTP id m7QGabQi031077 for ; Tue, 26 Aug 2008 09:36:38 -0700 Received: by wa-out-1112.google.com with SMTP id j5so1091395wah.18 for ; Tue, 26 Aug 2008 09:36:37 -0700 (PDT) Received: by 10.114.144.1 with SMTP id r1mr4853689wad.140.1219768595204; Tue, 26 Aug 2008 09:36:35 -0700 (PDT) Received: by 10.114.78.12 with HTTP; Tue, 26 Aug 2008 09:36:35 -0700 (PDT) Message-ID: <8ac60eac0808260936p247e0b92k38384ea54edbaa51@mail.gmail.com> Date: Wed, 27 Aug 2008 16:47:00 -0000 From: "Paul Pluzhnikov" To: "gdb Mailing List" Subject: Re: C++ debugging pain Cc: "Stefano Sabatini" In-Reply-To: <20080826162251.GA24398@geppetto> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20080826162251.GA24398@geppetto> 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: 2008-08/txt/msg00278.txt.bz2 On Tue, Aug 26, 2008 at 9:22 AM, Stefano Sabatini wrote: > * "class X does not have any method named Y": this happens with > virtual methods defined in a parent class rather than in the class > of the instance debugged Try "set print object on". (I am working on a fix which would make that unnecessary). > * "Cannot resolve method (null)X to any overloaded instance": > this happen when I try to invoke a method on some object This usually happens when you have a pointer to Foo, and do: print p.virtfn() Instead, try: print p->virtfn() (I am also working on that fix). > I've been already advised by Daniel Jacobowitz (thanks Daniel) that > it could depend on the method invoked being inlined. If you compiled without '-O*', no inlining should have happened. If you do compile with '-g -O2', you are inflicting pain on yourself. Cheers, -- Paul Pluzhnikov