/* Target-dependent code for the Matsushita MN10300 for GDB, the GNU debugger.
Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
- 2007 Free Software Foundation, Inc.
+ 2007, 2008 Free Software Foundation, Inc.
This file is part of GDB.
{
struct trad_frame_cache *cache;
CORE_ADDR pc, start, end;
+ void *cache_p;
if (*this_prologue_cache)
return (*this_prologue_cache);
- cache = trad_frame_cache_zalloc (next_frame);
+ cache_p = trad_frame_cache_zalloc (next_frame);
pc = gdbarch_unwind_pc (get_frame_arch (next_frame), next_frame);
- mn10300_analyze_prologue (next_frame, (void **) &cache, pc);
+ mn10300_analyze_prologue (next_frame, &cache_p, pc);
+ cache = cache_p;
+
if (find_pc_partial_function (pc, NULL, &start, &end))
trad_frame_set_id (cache,
frame_id_build (trad_frame_get_this_base (cache),
32, 33, 34, 35, 36, 37, 38, 39,
40, 41, 42, 43, 44, 45, 46, 47,
48, 49, 50, 51, 52, 53, 54, 55,
- 56, 57, 58, 59, 60, 61, 62, 63
+ 56, 57, 58, 59, 60, 61, 62, 63,
+ 9
};
if (dwarf2 < 0
- || dwarf2 >= ARRAY_SIZE (dwarf2_to_gdb)
- || dwarf2_to_gdb[dwarf2] == -1)
+ || dwarf2 >= ARRAY_SIZE (dwarf2_to_gdb))
{
warning (_("Bogus register number in debug info: %d"), dwarf2);
- return 0;
+ return -1;
}
return dwarf2_to_gdb[dwarf2];