This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[rfc] [12/17] Get rid of current_gdbarch in xcoffread.c
- From: Markus Deuling <deuling at de dot ibm dot com>
- To: GDB Patches <gdb-patches at sourceware dot org>
- Cc: Ulrich Weigand <uweigand at de dot ibm dot com>
- Date: Thu, 11 Oct 2007 10:54:11 +0200
- Subject: [rfc] [12/17] Get rid of current_gdbarch in xcoffread.c
Hi,
this patch gets rid of some of the current_gdbarch's in xcoffread.c
Is this ok to commit?
ChangeLog:
* xcoffread.c (process_xcoff_symbol): Use objfile->gdbarch to get at
the current architecture.
--
Markus Deuling
GNU Toolchain for Linux on Cell BE
deuling@de.ibm.com
diff -urpN src/gdb/xcoffread.c dev/gdb/xcoffread.c
--- src/gdb/xcoffread.c 2007-09-21 20:01:23.000000000 +0200
+++ dev/gdb/xcoffread.c 2007-10-11 10:02:42.000000000 +0200
@@ -1474,7 +1474,7 @@ process_xcoff_symbol (struct coff_symbol
patch_block_stabs (), unless the file was compiled without -g. */
DEPRECATED_SYMBOL_NAME (sym) = SYMNAME_ALLOC (name, symname_alloced);
- SYMBOL_TYPE (sym) = builtin_type (current_gdbarch)->nodebug_text_symbol;
+ SYMBOL_TYPE (sym) = builtin_type (objfile->gdbarch)->nodebug_text_symbol;
SYMBOL_CLASS (sym) = LOC_BLOCK;
SYMBOL_DUP (sym, sym2);
@@ -1487,7 +1487,7 @@ process_xcoff_symbol (struct coff_symbol
else
{
/* In case we can't figure out the type, provide default. */
- SYMBOL_TYPE (sym) = builtin_type (current_gdbarch)->nodebug_data_symbol;
+ SYMBOL_TYPE (sym) = builtin_type (objfile->gdbarch)->nodebug_data_symbol;
switch (cs->c_sclass)
{