From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13002 invoked by alias); 12 May 2002 19:54:09 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 12803 invoked from network); 12 May 2002 19:54:08 -0000 Received: from unknown (HELO nevyn.them.org) (128.2.145.6) by sources.redhat.com with SMTP; 12 May 2002 19:54:08 -0000 Received: from drow by nevyn.them.org with local (Exim 3.35 #1 (Debian)) id 176zPw-0000NI-00; Sun, 12 May 2002 15:54:04 -0400 Date: Sun, 12 May 2002 12:54:00 -0000 From: Daniel Jacobowitz To: "Peter.Schauer" Cc: gdb-patches@sources.redhat.com Subject: Re: [RFA] Fix calling of static C++ member functions Message-ID: <20020512195404.GA1412@nevyn.them.org> Mail-Followup-To: "Peter.Schauer" , gdb-patches@sources.redhat.com References: <20020512022134.GA30626@nevyn.them.org> <200205121948.VAA02252@reisser.regent.e-technik.tu-muenchen.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200205121948.VAA02252@reisser.regent.e-technik.tu-muenchen.de> User-Agent: Mutt/1.5.1i X-SW-Source: 2002-05/txt/msg00427.txt.bz2 On Sun, May 12, 2002 at 09:48:56PM +0200, Peter.Schauer wrote: > > I had to make some substantial changes to this. First of all, I wanted > > to kill the now-obsolete static_memfuncp argument to find_method_list. > > Secondly, the way you were skipping THIS in typecmp caused segfaults > > for some methods which only expected one argument. Here's what I > > checked in. > > > > I -think- I'm caught up on all the patches you sent me now, Peter. > > Yes you are, thank you very much. > > Thanks also for fixing the segfaults, but I'd be interested in an example > where this happened. I tried to simplify the typcmp logic as much as possible, > but obviously failed. You incremented t1 after the check for whether the next type was VOID. If it was, the following type could be a garbage pointer. I got segfaults in userdef.exp, I believe. > > One minor nit, the comments should reflect the elimination of static_memfuncp: > > --- ./valops.c.orig Sun May 12 17:16:37 2002 > +++ ./valops.c Sun May 12 17:55:37 2002 > @@ -2515,7 +2516,6 @@ value_struct_elt (struct value **argp, s > * ARGP is a pointer to a pointer to a value (the object) > * METHOD is a string containing the method name > * OFFSET is the offset within the value > - * STATIC_MEMFUNCP is set if the method is static > * TYPE is the assumed type of the object > * NUM_FNS is the number of overloaded instances > * BASETYPE is set to the actual type of the subobject where the method is found > @@ -2606,7 +2606,6 @@ find_method_list (struct value **argp, c > * ARGP is a pointer to a pointer to a value (the object) > * METHOD is the method name > * OFFSET is the offset within the value contents > - * STATIC_MEMFUNCP is set if the method is static > * NUM_FNS is the number of overloaded instances > * BASETYPE is set to the type of the base subobject that defines the method > * BOFFSET is the offset of the base subobject which defines the method */ > > Thanks again, Quite right. Would you please commit that update? -- Daniel Jacobowitz Carnegie Mellon University MontaVista Software Debian GNU/Linux Developer