* win32-low.c (attaching): New global.
[deliverable/binutils-gdb.git] / gdb / nto-tdep.c
index 1949f6f578957709841bc4d7f54cc862483598a2..4f9281e43aac73e336675d6782aeabb25c43eb6a 100644 (file)
@@ -8,7 +8,7 @@
 
    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,
@@ -17,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 "gdb_stat.h"
 #include "gdb_string.h"
@@ -108,20 +106,22 @@ nto_find_and_open_solib (char *solib, unsigned o_flags, char **temp_pathname)
 #define PATH_FMT "%s/lib:%s/usr/lib:%s/usr/photon/lib:%s/usr/photon/dll:%s/lib/dll"
 
   nto_root = nto_target ();
-  if (strcmp (TARGET_ARCHITECTURE->arch_name, "i386") == 0)
+  if (strcmp (gdbarch_bfd_arch_info (current_gdbarch)->arch_name, "i386") == 0)
     {
       arch = "x86";
       endian = "";
     }
-  else if (strcmp (TARGET_ARCHITECTURE->arch_name, "rs6000") == 0
-          || strcmp (TARGET_ARCHITECTURE->arch_name, "powerpc") == 0)
+  else if (strcmp (gdbarch_bfd_arch_info (current_gdbarch)->arch_name,
+                  "rs6000") == 0
+          || strcmp (gdbarch_bfd_arch_info (current_gdbarch)->arch_name,
+                  "powerpc") == 0)
     {
       arch = "ppc";
       endian = "be";
     }
   else
     {
-      arch = TARGET_ARCHITECTURE->arch_name;
+      arch = gdbarch_bfd_arch_info (current_gdbarch)->arch_name;
       endian = gdbarch_byte_order (current_gdbarch)
               == BFD_ENDIAN_BIG ? "be" : "le";
     }
@@ -168,20 +168,22 @@ nto_init_solib_absolute_prefix (void)
   const char *arch;
 
   nto_root = nto_target ();
-  if (strcmp (TARGET_ARCHITECTURE->arch_name, "i386") == 0)
+  if (strcmp (gdbarch_bfd_arch_info (current_gdbarch)->arch_name, "i386") == 0)
     {
       arch = "x86";
       endian = "";
     }
-  else if (strcmp (TARGET_ARCHITECTURE->arch_name, "rs6000") == 0
-          || strcmp (TARGET_ARCHITECTURE->arch_name, "powerpc") == 0)
+  else if (strcmp (gdbarch_bfd_arch_info (current_gdbarch)->arch_name,
+                  "rs6000") == 0
+          || strcmp (gdbarch_bfd_arch_info (current_gdbarch)->arch_name,
+                  "powerpc") == 0)
     {
       arch = "ppc";
       endian = "be";
     }
   else
     {
-      arch = TARGET_ARCHITECTURE->arch_name;
+      arch = gdbarch_bfd_arch_info (current_gdbarch)->arch_name;
       endian = gdbarch_byte_order (current_gdbarch)
               == BFD_ENDIAN_BIG ? "be" : "le";
     }
@@ -262,9 +264,8 @@ LM_ADDR (struct so_list *so)
 {
   struct link_map_offsets *lmo = nto_fetch_link_map_offsets ();
 
-  return (CORE_ADDR) extract_signed_integer (so->lm_info->lm +
-                                            lmo->l_addr_offset,
-                                            lmo->l_addr_size);
+  return extract_typed_address (so->lm_info->lm + lmo->l_addr_offset,
+                                builtin_type_void_data_ptr);
 }
 
 static CORE_ADDR
This page took 0.028383 seconds and 4 git commands to generate.