This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
+ the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor,
- Boston, MA 02110-1301, USA. */
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "defs.h"
#include "frame.h"
static CORE_ADDR
v850_analyze_prologue (CORE_ADDR func_addr, CORE_ADDR pc,
- struct v850_frame_cache *pi)
+ struct v850_frame_cache *pi, ULONGEST ctbp)
{
CORE_ADDR prologue_end, current_pc;
struct pifsr pifsrs[E_NUM_REGS + 1];
}
else if ((insn & 0xffc0) == 0x0200 && !regsave_func_p)
{ /* callt <imm6> */
- long ctbp = read_register (E_CTBP_REGNUM);
long adr = ctbp + ((insn & 0x3f) << 1);
save_pc = current_pc;
if (cache->base == 0)
return cache;
- cache->pc = frame_func_unwind (next_frame);
+ cache->pc = frame_func_unwind (next_frame, NORMAL_FRAME);
current_pc = frame_pc_unwind (next_frame);
if (cache->pc != 0)
- v850_analyze_prologue (cache->pc, current_pc, cache);
+ {
+ ULONGEST ctbp;
+ ctbp = frame_unwind_register_unsigned (next_frame, E_CTBP_REGNUM);
+ v850_analyze_prologue (cache->pc, current_pc, cache, ctbp);
+ }
if (!cache->uses_fp)
{
static CORE_ADDR
v850_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame)
{
- return frame_unwind_register_unsigned (next_frame, SP_REGNUM);
+ return frame_unwind_register_unsigned (next_frame,
+ gdbarch_sp_regnum (current_gdbarch));
}
static CORE_ADDR
v850_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
{
- return frame_unwind_register_unsigned (next_frame, PC_REGNUM);
+ return frame_unwind_register_unsigned (next_frame,
+ gdbarch_pc_regnum (current_gdbarch));
}
static struct frame_id