Sort includes for files gdb/[a-f]*.[chyl].
[deliverable/binutils-gdb.git] / gdb / arm-wince-tdep.c
index e63dc89d690e30aa50e3bf1f7b56c7bb05f70e60..0ca6c813ae28f8c11be32833690aa015024834c6 100644 (file)
@@ -1,7 +1,7 @@
 /* Target-dependent code for Windows CE running on ARM processors,
    for GDB.
 
-   Copyright (C) 2007-2013 Free Software Foundation, Inc.
+   Copyright (C) 2007-2019 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "defs.h"
-#include "osabi.h"
-#include "gdbcore.h"
-#include "target.h"
-#include "frame.h"
-
-#include <string.h>
 
+/* Local non-gdb includes.  */
+#include "arch/arm.h"
 #include "arm-tdep.h"
+#include "frame.h"
+#include "gdbcore.h"
+#include "osabi.h"
+#include "target.h"
 #include "windows-tdep.h"
 
 static const gdb_byte arm_wince_le_breakpoint[] = { 0x10, 0x00, 0x00, 0xe6 };
@@ -47,9 +47,12 @@ arm_pe_skip_trampoline_code (struct frame_info *frame, CORE_ADDR pc)
   CORE_ADDR next_pc;
 
   /* The format of an ARM DLL trampoline is:
+
        ldr  ip, [pc]
        ldr  pc, [ip]
-       .dw __imp_<func>  */
+       .dw __imp_<func>
+
+  */
 
   if (pc == 0
       || read_memory_unsigned_integer (pc + 0, 4, byte_order) != 0xe59fc000
@@ -64,8 +67,8 @@ arm_pe_skip_trampoline_code (struct frame_info *frame, CORE_ADDR pc)
   if (indsym.minsym == NULL)
     return 0;
 
-  symname = SYMBOL_LINKAGE_NAME (indsym.minsym);
-  if (symname == NULL || strncmp (symname, "__imp_", 6) != 0)
+  symname = MSYMBOL_LINKAGE_NAME (indsym.minsym);
+  if (symname == NULL || !startswith (symname, "__imp_"))
     return 0;
 
   next_pc = read_memory_unsigned_integer (indirect, 4, byte_order);
@@ -102,8 +105,8 @@ arm_wince_skip_main_prologue (struct gdbarch *gdbarch, CORE_ADDR pc)
       struct bound_minimal_symbol s = lookup_minimal_symbol_by_pc (call_dest);
 
       if (s.minsym != NULL
-         && SYMBOL_LINKAGE_NAME (s.minsym) != NULL
-         && strcmp (SYMBOL_LINKAGE_NAME (s.minsym), "__gccmain") == 0)
+         && MSYMBOL_LINKAGE_NAME (s.minsym) != NULL
+         && strcmp (MSYMBOL_LINKAGE_NAME (s.minsym), "__gccmain") == 0)
        pc += 4;
     }
 
@@ -152,9 +155,6 @@ arm_wince_osabi_sniffer (bfd *abfd)
   return GDB_OSABI_UNKNOWN;
 }
 
-/* Provide a prototype to silence -Wmissing-prototypes.  */
-void _initialize_arm_wince_tdep (void);
-
 void
 _initialize_arm_wince_tdep (void)
 {
This page took 0.024815 seconds and 4 git commands to generate.