From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15222 invoked by alias); 5 Nov 2007 16:33:38 -0000 Received: (qmail 15200 invoked by uid 22791); 5 Nov 2007 16:33:35 -0000 X-Spam-Check-By: sourceware.org Received: from mtagate1.de.ibm.com (HELO mtagate1.de.ibm.com) (195.212.29.150) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 05 Nov 2007 16:33:31 +0000 Received: from d12nrmr1607.megacenter.de.ibm.com (d12nrmr1607.megacenter.de.ibm.com [9.149.167.49]) by mtagate1.de.ibm.com (8.13.8/8.13.8) with ESMTP id lA5GXSkq029868 for ; Mon, 5 Nov 2007 16:33:28 GMT Received: from d12av02.megacenter.de.ibm.com (d12av02.megacenter.de.ibm.com [9.149.165.228]) by d12nrmr1607.megacenter.de.ibm.com (8.13.8/8.13.8/NCO v8.5) with ESMTP id lA5GXSQ62244798 for ; Mon, 5 Nov 2007 17:33:28 +0100 Received: from d12av02.megacenter.de.ibm.com (loopback [127.0.0.1]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id lA5GXR31027730 for ; Mon, 5 Nov 2007 17:33:28 +0100 Received: from tuxmaker.boeblingen.de.ibm.com (tuxmaker.boeblingen.de.ibm.com [9.152.85.9]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.12.11) with SMTP id lA5GXRTe027727; Mon, 5 Nov 2007 17:33:27 +0100 Message-Id: <200711051633.lA5GXRTe027727@d12av02.megacenter.de.ibm.com> Received: by tuxmaker.boeblingen.de.ibm.com (sSMTP sendmail emulation); Mon, 5 Nov 2007 17:33:27 +0100 Subject: Re: [rfc] [08/09] Get rid of current_gdbarch (infcall) To: deuling@de.ibm.com (Markus Deuling) Date: Mon, 05 Nov 2007 16:33:00 -0000 From: "Ulrich Weigand" Cc: gdb-patches@sourceware.org (GDB Patches) In-Reply-To: <472F0AD5.10204@de.ibm.com> from "Markus Deuling" at Nov 05, 2007 01:21:41 PM X-Mailer: ELM [version 2.5 PL2] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2007-11/txt/msg00071.txt.bz2 Markus Deuling wrote: > * infcall.c (call_function_by_hand): Use get_frame_arch to get at the > current architecture by frame_info. This part is fine. However, I'm not convinced this: > (find_function_addr): Add gdbarch parameter. Replace current_gdbarch by > gdbarch. > * infcall.h (find_function_addr): Add gdbarch parameter. is the right way to go. Consider the call to find_function_addr in value_ind: there is no clear way how that function would know which architecture to use. I'm hoping that at some point in the future, a "struct value" for a function would contain enough information to identify the architecture the function is defined for, determined at the time the value is generated. If we can make that happen, there will be no need to pass an additional gdbarch parameter to find_function_addr. Thus, I'd prefer to defer this interface change until we have resolved that question. Bye, Ulrich -- Dr. Ulrich Weigand GNU Toolchain for Linux on System z and Cell BE Ulrich.Weigand@de.ibm.com