linux-mips-low.c: Change "private" variable name
[deliverable/binutils-gdb.git] / gdb / bfin-tdep.c
index 4532e1b8535027ed28673a295ce1a693e4c76788..1d48225b420f2f5b6e629527a62ec5c30bc860de 100644 (file)
@@ -292,7 +292,7 @@ bfin_frame_cache (struct frame_info *this_frame, void **this_cache)
   int i;
 
   if (*this_cache)
-    return *this_cache;
+    return (struct bfin_frame_cache *) *this_cache;
 
   cache = bfin_alloc_frame_cache ();
   *this_cache = cache;
@@ -566,8 +566,8 @@ bfin_push_dummy_call (struct gdbarch *gdbarch,
 static int
 bfin_reg_to_regnum (struct gdbarch *gdbarch, int reg)
 {
-  if (reg > ARRAY_SIZE (map_gcc_gdb))
-    return 0;
+  if (reg < 0 || reg >= ARRAY_SIZE (map_gcc_gdb))
+    return -1;
 
   return map_gcc_gdb[reg];
 }
This page took 0.024723 seconds and 4 git commands to generate.