From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27995 invoked by alias); 11 Oct 2007 08:55:55 -0000 Received: (qmail 27966 invoked by uid 22791); 11 Oct 2007 08:55:55 -0000 X-Spam-Check-By: sourceware.org Received: from mtagate2.de.ibm.com (HELO mtagate2.de.ibm.com) (195.212.29.151) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 11 Oct 2007 08:55:53 +0000 Received: from d12nrmr1607.megacenter.de.ibm.com (d12nrmr1607.megacenter.de.ibm.com [9.149.167.49]) by mtagate2.de.ibm.com (8.13.8/8.13.8) with ESMTP id l9B8toWI149912 for ; Thu, 11 Oct 2007 08:55:50 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 l9B8tnpN1593380 for ; Thu, 11 Oct 2007 10:55:49 +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 l9B8tnvk026190 for ; Thu, 11 Oct 2007 10:55:49 +0200 Received: from bbkeks.boeblingen.de.ibm.com (dyn-9-152-248-41.boeblingen.de.ibm.com [9.152.248.41]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.12.11) with ESMTP id l9B8tmsP026172 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 11 Oct 2007 10:55:48 +0200 Message-ID: <470DE4B6.1050708@de.ibm.com> Date: Thu, 11 Oct 2007 08:55:00 -0000 From: Markus Deuling User-Agent: Thunderbird 2.0.0.6 (X11/20070728) MIME-Version: 1.0 To: GDB Patches CC: Ulrich Weigand , cgf@alum.bu.edu Subject: [rfc] [13/17] Get rid of current_gdbarch in win32-nat.c Content-Type: multipart/mixed; boundary="------------080009020006040109090404" 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/msg00267.txt.bz2 This is a multi-part message in MIME format. --------------080009020006040109090404 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Content-length: 434 Hi, this patch gets rid of some of the current_gdbarch's in win32-nat.c. Maybe someone can test this? I have no idea how to :-) Thanks a lot. Is this ok to commit? ChangeLog: * win32-nat.c (do_win32_fetch_inferior_registers, win32_resume) (do_win32_store_inferior_registers): Use get_regcache_arch to get at the current architecture by regcache. -- Markus Deuling GNU Toolchain for Linux on Cell BE deuling@de.ibm.com --------------080009020006040109090404 Content-Type: text/plain; name="diff-win32-nat" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="diff-win32-nat" Content-length: 1190 diff -urpN src/gdb/win32-nat.c dev/gdb/win32-nat.c --- src/gdb/win32-nat.c 2007-09-04 03:12:18.000000000 +0200 +++ dev/gdb/win32-nat.c 2007-10-11 10:06:39.000000000 +0200 @@ -397,7 +397,7 @@ do_win32_fetch_inferior_registers (struc regcache_raw_supply (regcache, r, context_offset); else { - for (r = 0; r < gdbarch_num_regs (current_gdbarch); r++) + for (r = 0; r < gdbarch_num_regs (get_regcache_arch (regcache)); r++) do_win32_fetch_inferior_registers (regcache, r); } @@ -424,7 +424,7 @@ do_win32_store_inferior_registers (const ((char *) ¤t_thread->context) + mappings[r]); else { - for (r = 0; r < gdbarch_num_regs (current_gdbarch); r++) + for (r = 0; r < gdbarch_num_regs (get_regcache_arch (regcache)); r++) do_win32_store_inferior_registers (regcache, r); } } @@ -1211,7 +1211,8 @@ win32_resume (ptid_t ptid, int step, enu { /* Single step by setting t bit */ win32_fetch_inferior_registers (get_current_regcache (), - gdbarch_ps_regnum (current_gdbarch)); + gdbarch_ps_regnum (get_regcache_arch + (get_current_regcache ()))); th->context.EFlags |= FLAG_TRACE_BIT; } --------------080009020006040109090404--