OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [gdb-7.2/] [gdb/] [gdbserver/] [linux-or32-low.c] - Diff between revs 548 and 565

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 548 Rev 565
Line 59... Line 59...
 
 
   This must be in GDB order (r0-r1, ppc, npc, sr) to ptrace offset. As with
   This must be in GDB order (r0-r1, ppc, npc, sr) to ptrace offset. As with
   regs_or32, we substitute r31 for r0 and NPC for PPC.                       */
   regs_or32, we substitute r31 for r0 and NPC for PPC.                       */
/* -------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------- */
static int or32_regmap[] = {
static int or32_regmap[] = {
  GPR31, SP,    GPR2,  GPR3,  GPR4,  GPR5,  GPR6,  GPR7,
  PT_GPR31, PT_SP,    PT_GPR2,  PT_GPR3,
  GPR8,  GPR9,  GPR10, GPR11, GPR12, GPR13, GPR14, GPR15,
  PT_GPR4,  PT_GPR5,  PT_GPR6,  PT_GPR7,
  GPR16, GPR17, GPR18, GPR19, GPR20, GPR21, GPR22, GPR23,
  PT_GPR8,  PT_GPR9,  PT_GPR10, PT_GPR11,
  GPR24, GPR25, GPR26, GPR27, GPR28, GPR29, GPR30, GPR31,
  PT_GPR12, PT_GPR13, PT_GPR14, PT_GPR15,
  PC,    PC,    SR
  PT_GPR16, PT_GPR17, PT_GPR18, PT_GPR19,
 
  PT_GPR20, PT_GPR21, PT_GPR22, PT_GPR23,
 
  PT_GPR24, PT_GPR25, PT_GPR26, PT_GPR27,
 
  PT_GPR28, PT_GPR29, PT_GPR30, PT_GPR31,
 
  PT_PC,    PT_PC,    PT_SR
};
};
 
 
 
 
/* -------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------- */
/*!Predicate to indicate if a register can be read.
/*!Predicate to indicate if a register can be read.
Line 117... Line 121...
/* -------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------- */
static CORE_ADDR
static CORE_ADDR
or32_get_pc (struct regcache *regcache)
or32_get_pc (struct regcache *regcache)
{
{
  unsigned long int  npc;
  unsigned long int  npc;
  collect_register_by_name (regcache, "npc", &npc);
  collect_register_by_name (regcache, "pc", &npc);
 
 
    if (debug_threads)
    if (debug_threads)
    {
    {
      fprintf (stderr, "stop pc is %08lx\n", npc);
      fprintf (stderr, "stop pc is %08lx\n", npc);
    }
    }
Line 142... Line 146...
static void
static void
or32_set_pc (struct regcache *regcache,
or32_set_pc (struct regcache *regcache,
             CORE_ADDR        pc)
             CORE_ADDR        pc)
{
{
  unsigned long int  npc = pc;
  unsigned long int  npc = pc;
  supply_register_by_name (regcache, "npc", &npc);
  supply_register_by_name (regcache, "pc", &npc);
 
 
}       /* or32_set_pc () */
}       /* or32_set_pc () */
 
 
 
 
/*! The value of a breakpoint instruction (l.trap  1). */
/*! The value of a breakpoint instruction (l.trap  1). */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.