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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [gdb-5.0/] [gdb/] [config/] [pa/] [tm-hppab.h] - Diff between revs 107 and 1765

Go to most recent revision | Only display areas with differences | Details | Blame | View Log

Rev 107 Rev 1765
/* Parameters for execution on an HP PA-RISC machine running BSD, for GDB.
/* Parameters for execution on an HP PA-RISC machine running BSD, for GDB.
   Contributed by the Center for Software Science at the
   Contributed by the Center for Software Science at the
   University of Utah (pa-gdb-bugs@cs.utah.edu).  */
   University of Utah (pa-gdb-bugs@cs.utah.edu).  */
 
 
/* For BSD:
/* For BSD:
 
 
   The signal context structure pointer is always saved at the base
   The signal context structure pointer is always saved at the base
   of the frame + 0x4.
   of the frame + 0x4.
 
 
   We get the PC & SP directly from the sigcontext structure itself.
   We get the PC & SP directly from the sigcontext structure itself.
   For other registers we have to dive in a little deeper:
   For other registers we have to dive in a little deeper:
 
 
   The hardware save state pointer is at offset 0x10 within the
   The hardware save state pointer is at offset 0x10 within the
   signal context structure.
   signal context structure.
 
 
   Within the hardware save state, registers are found in the same order
   Within the hardware save state, registers are found in the same order
   as the register numbers in GDB. */
   as the register numbers in GDB. */
 
 
#define FRAME_SAVED_PC_IN_SIGTRAMP(FRAME, TMP) \
#define FRAME_SAVED_PC_IN_SIGTRAMP(FRAME, TMP) \
{ \
{ \
  *(TMP) = read_memory_integer ((FRAME)->frame + 0x4, 4); \
  *(TMP) = read_memory_integer ((FRAME)->frame + 0x4, 4); \
  *(TMP) = read_memory_integer (*(TMP) + 0x18, 4); \
  *(TMP) = read_memory_integer (*(TMP) + 0x18, 4); \
}
}
 
 
#define FRAME_BASE_BEFORE_SIGTRAMP(FRAME, TMP) \
#define FRAME_BASE_BEFORE_SIGTRAMP(FRAME, TMP) \
{ \
{ \
  *(TMP) = read_memory_integer ((FRAME)->frame + 0x4, 4); \
  *(TMP) = read_memory_integer ((FRAME)->frame + 0x4, 4); \
  *(TMP) = read_memory_integer (*(TMP) + 0x8, 4); \
  *(TMP) = read_memory_integer (*(TMP) + 0x8, 4); \
}
}
 
 
#define FRAME_FIND_SAVED_REGS_IN_SIGTRAMP(FRAME, FSR) \
#define FRAME_FIND_SAVED_REGS_IN_SIGTRAMP(FRAME, FSR) \
{ \
{ \
  int i; \
  int i; \
  CORE_ADDR TMP; \
  CORE_ADDR TMP; \
  TMP = read_memory_integer ((FRAME)->frame + 0x4, 4); \
  TMP = read_memory_integer ((FRAME)->frame + 0x4, 4); \
  TMP = read_memory_integer (TMP + 0x10, 4); \
  TMP = read_memory_integer (TMP + 0x10, 4); \
  for (i = 0; i < NUM_REGS; i++) \
  for (i = 0; i < NUM_REGS; i++) \
    { \
    { \
      if (i == SP_REGNUM) \
      if (i == SP_REGNUM) \
        (FSR)->regs[SP_REGNUM] = read_memory_integer (TMP + SP_REGNUM * 4, 4); \
        (FSR)->regs[SP_REGNUM] = read_memory_integer (TMP + SP_REGNUM * 4, 4); \
      else \
      else \
        (FSR)->regs[i] = TMP + i * 4; \
        (FSR)->regs[i] = TMP + i * 4; \
    } \
    } \
}
}
 
 
/* It's mostly just the common stuff.  */
/* It's mostly just the common stuff.  */
#include "pa/tm-hppa.h"
#include "pa/tm-hppa.h"
 
 

powered by: WebSVN 2.1.0

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