* archures.c: Update copyright.
[deliverable/binutils-gdb.git] / gdb / exec.c
index e2d6b995c90f13d4693a18eba3c181394996e8c4..7648b0317a6f3030597b55db4aa171bf2542b64c 100644 (file)
@@ -1,13 +1,14 @@
 /* Work with executable files, for GDB. 
 
    Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
-   1998, 1999, 2000, 2001, 2002, 2003, 2007 Free Software Foundation, Inc.
+   1998, 1999, 2000, 2001, 2002, 2003, 2007, 2008
+   Free Software Foundation, Inc.
 
    This file is part of GDB.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
+   the Free Software Foundation; either version 3 of the License, or
    (at your option) any later version.
 
    This program is distributed in the hope that it will be useful,
@@ -16,9 +17,7 @@
    GNU General Public License for more details.
 
    You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 51 Franklin Street, Fifth Floor,
-   Boston, MA 02110-1301, USA.  */
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "defs.h"
 #include "frame.h"
@@ -32,6 +31,7 @@
 #include "value.h"
 #include "exec.h"
 #include "observer.h"
+#include "arch-utils.c"
 
 #include <fcntl.h>
 #include "readline/readline.h"
@@ -479,7 +479,7 @@ xfer_memory (CORE_ADDR memaddr, gdb_byte *myaddr, int len, int write,
 
   for (p = target->to_sections; p < target->to_sections_end; p++)
     {
-      if (overlay_debugging && section && p->the_bfd_section &&
+      if (overlay_debugging && section && 
          strcmp (section->name, p->the_bfd_section->name) != 0)
        continue;               /* not the section we need */
       if (memaddr >= p->addr)
@@ -532,8 +532,8 @@ void
 print_section_info (struct target_ops *t, bfd *abfd)
 {
   struct section_table *p;
-  /* FIXME: 16 is not wide enough when TARGET_ADDR_BIT > 64.  */
-  int wid = TARGET_ADDR_BIT <= 32 ? 8 : 16;
+  /* FIXME: 16 is not wide enough when gdbarch_addr_bit > 64.  */
+  int wid = gdbarch_addr_bit (gdbarch_from_bfd (abfd)) <= 32 ? 8 : 16;
 
   printf_filtered ("\t`%s', ", bfd_get_filename (abfd));
   wrap_here ("        ");
@@ -541,8 +541,7 @@ print_section_info (struct target_ops *t, bfd *abfd)
   if (abfd == exec_bfd)
     {
       printf_filtered (_("\tEntry point: "));
-      deprecated_print_address_numeric (bfd_get_start_address (abfd), 1, gdb_stdout);
-      printf_filtered ("\n");
+      fputs_filtered (paddress (bfd_get_start_address (abfd)), gdb_stdout);
     }
   for (p = t->to_sections; p < t->to_sections_end; p++)
     {
This page took 0.024252 seconds and 4 git commands to generate.