From: Markus Deuling <deuling@de.ibm.com>
To: GDB Patches <gdb-patches@sourceware.org>
Cc: Ulrich Weigand <uweigand@de.ibm.com>
Subject: [rfc] [01/17] Get rid of current_gdbarch in exec.c
Date: Thu, 11 Oct 2007 08:55:00 -0000 [thread overview]
Message-ID: <470DE493.3050505@de.ibm.com> (raw)
[-- 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)
next reply other threads:[~2007-10-11 8:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-11 8:55 Markus Deuling [this message]
2007-10-11 13:54 ` Ulrich Weigand
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=470DE493.3050505@de.ibm.com \
--to=deuling@de.ibm.com \
--cc=gdb-patches@sourceware.org \
--cc=uweigand@de.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox