/* GNU/Linux/Nios II specific low level interface, for the remote server for
GDB.
- Copyright (C) 2008-2016 Free Software Foundation, Inc.
+ Copyright (C) 2008-2018 Free Software Foundation, Inc.
Contributed by Mentor Graphics, Inc.
return 0;
}
-/* Implement the get_pc linux_target_ops method. */
-
-static CORE_ADDR
-nios2_get_pc (struct regcache *regcache)
-{
- union nios2_register pc;
-
- collect_register_by_name (regcache, "pc", pc.buf);
- return pc.reg32;
-}
-
-/* Implement the set_pc linux_target_ops method. */
-
-static void
-nios2_set_pc (struct regcache *regcache, CORE_ADDR pc)
-{
- union nios2_register newpc;
-
- newpc.reg32 = pc;
- supply_register_by_name (regcache, "pc", newpc.buf);
-}
-
/* Breakpoint support. Also see comments on nios2_breakpoint_from_pc
in nios2-tdep.c. */
/* Fetch the thread-local storage pointer for libthread_db. */
ps_err_e
-ps_get_thread_area (const struct ps_prochandle *ph,
+ps_get_thread_area (struct ps_prochandle *ph,
lwpid_t lwpid, int idx, void **base)
{
if (ptrace (PTRACE_GET_THREAD_AREA, lwpid, NULL, base) != 0)
static void
nios2_fill_gregset (struct regcache *regcache, void *buf)
{
- union nios2_register *regset = buf;
+ union nios2_register *regset = (union nios2_register *) buf;
int i;
for (i = 1; i < nios2_num_regs; i++)
static void
nios2_store_gregset (struct regcache *regcache, const void *buf)
{
- const union nios2_register *regset = buf;
+ const union nios2_register *regset = (union nios2_register *) buf;
int i;
for (i = 0; i < nios2_num_regs; i++)
nios2_cannot_fetch_register,
nios2_cannot_store_register,
NULL,
- nios2_get_pc,
- nios2_set_pc,
+ linux_get_pc_32bit,
+ linux_set_pc_32bit,
NULL, /* breakpoint_kind_from_pc */
nios2_sw_breakpoint_from_kind,
NULL, /* get_next_pcs */