[FT32] gdb: Correctly interpret function prologs
[deliverable/binutils-gdb.git] / gdb / arm-symbian-tdep.c
index 32f65f40a50aeccc8dc3ed894188dbd376f8050d..5a94293fe761013e16290f578b55f85f95dea682 100644 (file)
@@ -1,7 +1,6 @@
 /* ARM Symbian OS target support.
 
-   Copyright (C) 2008, 2009, 2010
-   Free Software Foundation, Inc.
+   Copyright (C) 2008-2015 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -30,7 +29,7 @@
 /* If PC is in a DLL import stub, return the address of the `real'
    function belonging to the stub.  */
 
-CORE_ADDR
+static CORE_ADDR
 arm_symbian_skip_trampoline_code (struct frame_info *frame, CORE_ADDR pc)
 {
   struct gdbarch *gdbarch;
@@ -39,7 +38,7 @@ arm_symbian_skip_trampoline_code (struct frame_info *frame, CORE_ADDR pc)
   CORE_ADDR dest;
   gdb_byte buf[4];
 
-  if (!in_plt_section (pc, NULL))
+  if (!in_plt_section (pc))
     return 0;
 
   if (target_read_memory (pc, buf, 4) != 0)
@@ -78,6 +77,10 @@ arm_symbian_init_abi (struct gdbarch_info info,
      corresponding ELF files on the host's filesystem.  */
   set_gdbarch_solib_symbols_extension (gdbarch, "sym");
 
+  /* Canonical paths on this target look like `c:\sys\bin\bar.dll',
+     for example.  */
+  set_gdbarch_has_dos_based_file_system (gdbarch, 1);
+
   set_solib_ops (gdbarch, &solib_target_so_ops);
 }
 
@@ -86,7 +89,7 @@ arm_symbian_init_abi (struct gdbarch_info info,
 static enum gdb_osabi
 arm_symbian_osabi_sniffer (bfd *abfd)
 {
-  Elf_Internal_Phdr *phdrs, **segments;
+  Elf_Internal_Phdr *phdrs;
   long phdrs_size;
   int num_phdrs, i;
 
@@ -105,7 +108,7 @@ arm_symbian_osabi_sniffer (bfd *abfd)
   if (phdrs_size == -1)
     return GDB_OSABI_UNKNOWN;
 
-  phdrs = alloca (phdrs_size);
+  phdrs = (Elf_Internal_Phdr *) alloca (phdrs_size);
   num_phdrs = bfd_get_elf_phdrs (abfd, phdrs);
   if (num_phdrs == -1)
     return GDB_OSABI_UNKNOWN;
@@ -118,6 +121,9 @@ arm_symbian_osabi_sniffer (bfd *abfd)
   return GDB_OSABI_SYMBIAN;
 }
 
+/* -Wmissing-prototypes */
+extern initialize_file_ftype _initialize_arm_symbian_tdep;
+
 void
 _initialize_arm_symbian_tdep (void)
 {
This page took 0.024871 seconds and 4 git commands to generate.