From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27243 invoked by alias); 11 Oct 2007 08:55:44 -0000 Received: (qmail 27214 invoked by uid 22791); 11 Oct 2007 08:55:44 -0000 X-Spam-Check-By: sourceware.org Received: from mtagate7.de.ibm.com (HELO mtagate7.de.ibm.com) (195.212.29.156) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 11 Oct 2007 08:55:42 +0000 Received: from d12nrmr1607.megacenter.de.ibm.com (d12nrmr1607.megacenter.de.ibm.com [9.149.167.49]) by mtagate7.de.ibm.com (8.13.8/8.13.8) with ESMTP id l9B8tGia074904 for ; Thu, 11 Oct 2007 08:55:16 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 l9B8tEAu561330 for ; Thu, 11 Oct 2007 10:55:14 +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 l9B8tDpa024621 for ; Thu, 11 Oct 2007 10:55:14 +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 l9B8tCdv024607 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 11 Oct 2007 10:55:13 +0200 Message-ID: <470DE493.3050505@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 Subject: [rfc] [01/17] Get rid of current_gdbarch in exec.c Content-Type: multipart/mixed; boundary="------------070102040608050107090704" 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/msg00263.txt.bz2 This is a multi-part message in MIME format. --------------070102040608050107090704 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Content-length: 366 Hi, this patch gets rid of some of the current_gdbarch's in exec.c Is this ok to commit? ChangeLog: * exec.c (arch-utils.h): New include. (print_section_info): Use gdbarch_from_bfd to get at the current architecture. Makefile.in (exec.o): Add new dependency to arch-utils.h. -- Markus Deuling GNU Toolchain for Linux on Cell BE deuling@de.ibm.com --------------070102040608050107090704 Content-Type: text/plain; name="diff-exec" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="diff-exec" Content-length: 1415 diff -urpN src/gdb/exec.c dev/gdb/exec.c --- src/gdb/exec.c 2007-08-23 20:08:28.000000000 +0200 +++ dev/gdb/exec.c 2007-10-11 07:56:14.000000000 +0200 @@ -41,6 +41,7 @@ #include "gdb_stat.h" #include "xcoffsolib.h" +#include "arch-utils.h" struct vmap *map_vmap (bfd *, bfd *); @@ -531,7 +532,7 @@ print_section_info (struct target_ops *t { struct section_table *p; /* FIXME: 16 is not wide enough when gdbarch_addr_bit > 64. */ - int wid = gdbarch_addr_bit (current_gdbarch) <= 32 ? 8 : 16; + int wid = gdbarch_addr_bit (gdbarch_from_bfd (abfd)) <= 32 ? 8 : 16; printf_filtered ("\t`%s', ", bfd_get_filename (abfd)); wrap_here (" "); diff -urpN src/gdb/Makefile.in dev/gdb/Makefile.in --- src/gdb/Makefile.in 2007-10-09 11:33:24.000000000 +0200 +++ dev/gdb/Makefile.in 2007-10-11 07:57:16.000000000 +0200 @@ -1992,7 +1992,7 @@ exceptions.o: exceptions.c $(defs_h) $(e exec.o: exec.c $(defs_h) $(frame_h) $(inferior_h) $(target_h) $(gdbcmd_h) \ $(language_h) $(symfile_h) $(objfiles_h) $(completer_h) $(value_h) \ $(exec_h) $(readline_h) $(gdb_string_h) $(gdbcore_h) $(gdb_stat_h) \ - $(xcoffsolib_h) $(observer_h) + $(xcoffsolib_h) $(observer_h) $(arch_utils_h) expprint.o: expprint.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(expression_h) \ $(value_h) $(language_h) $(parser_defs_h) $(user_regs_h) $(target_h) \ $(gdb_string_h) $(block_h) $(objfiles_h) $(gdb_assert_h) --------------070102040608050107090704--