From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2347 invoked by alias); 9 Oct 2007 18:22:57 -0000 Received: (qmail 2338 invoked by uid 22791); 9 Oct 2007 18:22:56 -0000 X-Spam-Check-By: sourceware.org Received: from mtagate3.de.ibm.com (HELO mtagate3.de.ibm.com) (195.212.29.152) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 09 Oct 2007 18:22:51 +0000 Received: from d12nrmr1607.megacenter.de.ibm.com (d12nrmr1607.megacenter.de.ibm.com [9.149.167.49]) by mtagate3.de.ibm.com (8.13.8/8.13.8) with ESMTP id l99IMkh0046406 for ; Tue, 9 Oct 2007 18:22:46 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 l99IMkXU2035902 for ; Tue, 9 Oct 2007 20:22:46 +0200 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 l99IMjtV017596 for ; Tue, 9 Oct 2007 20:22:46 +0200 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 l99IMjMk017593; Tue, 9 Oct 2007 20:22:45 +0200 Message-Id: <200710091822.l99IMjMk017593@d12av02.megacenter.de.ibm.com> Received: by tuxmaker.boeblingen.de.ibm.com (sSMTP sendmail emulation); Tue, 9 Oct 2007 20:22:45 +0200 Subject: Re: [rfc] [0/8] Get rid of current_gdbarch To: deuling@de.ibm.com (Markus Deuling) Date: Tue, 09 Oct 2007 18:34:00 -0000 From: "Ulrich Weigand" Cc: gdb-patches@sourceware.org (GDB Patches), brobecker@adacore.com (Joel Brobecker), drow@false.org (Daniel Jacobowitz), maxim@tensilica.com (Maxim Grigoriev) In-Reply-To: <470B6819.1070903@de.ibm.com> from "Markus Deuling" at Oct 09, 2007 01:38:01 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-10/txt/msg00210.txt.bz2 Markus Deuling wrote: > this is the next series of 8 mostly mechnical patches to get rid of of some trivial to replace occurences of current_gdbarch. I've checked in all of those except: - the xtensa-tdep.c patch (to give Maxim a chance to comment), and - the stack.c patch, because of this: @@ -1854,10 +1856,11 @@ If you continue, the return value that y if (return_value != NULL) { struct type *return_type = value_type (return_value); - gdb_assert (gdbarch_return_value (current_gdbarch, return_type, + gdb_assert (gdbarch_return_value (get_frame_arch (get_current_frame ()), + return_type, NULL, NULL, NULL) == RETURN_VALUE_REGISTER_CONVENTION); - gdbarch_return_value (current_gdbarch, return_type, + gdbarch_return_value (get_frame_arch (get_current_frame ()), return_type, get_current_regcache (), NULL /*read*/, value_contents (return_value) /*write*/); } At this point, there's no need to involve get_current_frame. The routine operates on the current regcache, and should simply consult its architecture. Thanks, Ulrich -- Dr. Ulrich Weigand GNU Toolchain for Linux on System z and Cell BE Ulrich.Weigand@de.ibm.com