Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [rfc] [01/17] Get rid of current_gdbarch in exec.c
@ 2007-10-11  8:55 Markus Deuling
  2007-10-11 13:54 ` Ulrich Weigand
  0 siblings, 1 reply; 2+ messages in thread
From: Markus Deuling @ 2007-10-11  8:55 UTC (permalink / raw)
  To: GDB Patches; +Cc: Ulrich Weigand

[-- Attachment #1: Type: text/plain, Size: 366 bytes --]


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





[-- Attachment #2: diff-exec --]
[-- Type: text/plain, Size: 1415 bytes --]

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)




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-10-11 13:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-10-11  8:55 [rfc] [01/17] Get rid of current_gdbarch in exec.c Markus Deuling
2007-10-11 13:54 ` Ulrich Weigand

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox