btrace: Fix memory leak in btrace_clear.
[deliverable/binutils-gdb.git] / gdb / mips-sde-tdep.c
index fa4d2a04667e6918e428adea94124d79479301c0..286ff1b7943b21b1f1e7e99a79409b247b8d3e8e 100644 (file)
@@ -1,6 +1,6 @@
 /* Target-dependent code for SDE on MIPS processors.
 
-   Copyright (C) 2014 Free Software Foundation, Inc.
+   Copyright (C) 2014-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -48,7 +48,7 @@ mips_sde_frame_cache (struct frame_info *this_frame, void **this_cache)
   int i;
 
   if (*this_cache != NULL)
-    return *this_cache;
+    return (struct trad_frame_cache *) *this_cache;
   cache = trad_frame_cache_zalloc (this_frame);
   *this_cache = cache;
 
@@ -205,14 +205,14 @@ static void
 mips_sde_elf_osabi_sniff_abi_tag_sections (bfd *abfd, asection *sect,
                                           void *obj)
 {
-  enum gdb_osabi *os_ident_ptr = obj;
+  enum gdb_osabi *os_ident_ptr = (enum gdb_osabi *) obj;
   const char *name;
 
   name = bfd_get_section_name (abfd, sect);
 
   /* The presence of a section with a ".sde" prefix is indicative
      of an SDE binary.  */
-  if (strncmp (name, ".sde", 4) == 0)
+  if (startswith (name, ".sde"))
     *os_ident_ptr = GDB_OSABI_SDE;
 }
 
This page took 0.026172 seconds and 4 git commands to generate.