From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15451 invoked by alias); 30 Apr 2009 00:19:52 -0000 Mailing-List: contact archer-help@sourceware.org; run by ezmlm Sender: Precedence: bulk List-Post: List-Help: List-Subscribe: List-Id: Received: (qmail 15435 invoked by uid 22791); 30 Apr 2009 00:19:49 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_26,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org To: Sami Wagiaalla Cc: Project Archer Subject: Re: [RFC] Koenig lookup patch 2 References: <49BABABE.9080606@redhat.com> <49F87751.8050405@redhat.com> From: Tom Tromey Reply-To: Tom Tromey Date: Thu, 30 Apr 2009 00:19:00 -0000 In-Reply-To: <49F87751.8050405@redhat.com> (Sami Wagiaalla's message of "Wed\, 29 Apr 2009 11\:50\:41 -0400") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2009-q2/txt/msg00070.txt.bz2 >>>>> "Sami" == Sami Wagiaalla writes: Sami> Recommit: Added support for ADL function lookup. Patch 2. Thanks. Sami> * c-exp.y: Created token UNKOWN_NAME. FYI, a typo in the ChangeLog -- missing an "N". A couple quick notes. I don't have time to pick nits... there were some formatting issues and whatnot -- these have to be fixed but are not very important overall. Sami> @@ -2083,9 +2086,37 @@ find_overload_match (struct value **argvec, int nargs, With the current code is there a need to have the values here? Or could this be reverted to the trunk's approach? Sami> + for (ix = 1; ix <= nargs; ix++){ Sami> arg_types[ix - 1] = value_type (argvec[ix]); BTW, my earlier note about needing the formal types was in error. I think GDB really only deals in formal types, unless it does special work to find the dynamic type. Sami> + if(cindex != NULL){ Sami> + prefix_len = (int)(cindex - type_name) - 1; Sami> + prefix = alloca(prefix_len+1); Sami> + strncpy(prefix, type_name, prefix_len); Sami> + prefix[prefix_len] = '\0'; Sami> + Sami> + concatenated_name = alloca (strlen (prefix) + 1 + strlen (name) + 1); Sami> + strcpy(concatenated_name, prefix); Sami> + strcat(concatenated_name, "::"); Sami> + strcat(concatenated_name, name); This could be reduced to a single allocation. Sami> + fsym = lookup_symbol(concatenated_name,NULL, VAR_DOMAIN, (int *) NULL); Does this really do the right thing in the case where the call has multiple arguments, each of which has a type from a different namespace? I don't understand how those would get added to the overload set. Tom