Don't update target_dcache if it is not initialized
[deliverable/binutils-gdb.git] / gdb / nto-tdep.c
index 748869f84d8afc237dc9622fa09266f25ab5aead..674d572557f84cb5d1c84f27d87a062dbd7d4c7c 100644 (file)
@@ -20,8 +20,8 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "defs.h"
-#include "gdb_stat.h"
-#include "gdb_string.h"
+#include <sys/stat.h>
+#include <string.h>
 #include "nto-tdep.h"
 #include "top.h"
 #include "inferior.h"
@@ -128,7 +128,8 @@ nto_find_and_open_solib (char *solib, unsigned o_flags, char **temp_pathname)
             arch_path);
 
   base = lbasename (solib);
-  ret = openp (buf, 1, base, o_flags, temp_pathname);
+  ret = openp (buf, OPF_TRY_CWD_FIRST | OPF_RETURN_REALPATH, base, o_flags,
+              temp_pathname);
   if (ret < 0 && base != solib)
     {
       xsnprintf (arch_path, arch_len, "/%s", solib);
@@ -138,7 +139,7 @@ nto_find_and_open_solib (char *solib, unsigned o_flags, char **temp_pathname)
          if (ret >= 0)
            *temp_pathname = gdb_realpath (arch_path);
          else
-           **temp_pathname = '\0';
+           *temp_pathname = NULL;
        }
     }
   return ret;
@@ -306,7 +307,7 @@ nto_relocate_section_addresses (struct so_list *so, struct target_section *sec)
   /* Neutrino treats the l_addr base address field in link.h as different than
      the base address in the System V ABI and so the offset needs to be
      calculated and applied to relocations.  */
-  Elf_Internal_Phdr *phdr = find_load_phdr (sec->bfd);
+  Elf_Internal_Phdr *phdr = find_load_phdr (sec->the_bfd_section->owner);
   unsigned vaddr = phdr ? phdr->p_vaddr : 0;
 
   sec->addr = nto_truncate_ptr (sec->addr + lm_addr (so) - vaddr);
@@ -318,7 +319,7 @@ nto_relocate_section_addresses (struct so_list *so, struct target_section *sec)
 int
 nto_in_dynsym_resolve_code (CORE_ADDR pc)
 {
-  if (in_plt_section (pc, NULL))
+  if (in_plt_section (pc))
     return 1;
   return 0;
 }
This page took 0.027856 seconds and 4 git commands to generate.