home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 9 / FreshFishVol9-CD2.bin / bbs / gnu / gdb-4.14-src.lha / gdb-4.14 / gdb / config / pa / tm-pro.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-12-09  |  1.5 KB  |  51 lines

  1. /* Parameters for execution on an HP PA-RISC machine running a ROM monitor,
  2.    for GDB. This is based on tm-hppab.h.
  3.    Contributed by the Center for Software Science at the
  4.    University of Utah (pa-gdb-bugs@cs.utah.edu).  */
  5.  
  6. /* For BSD:
  7.  
  8.    The signal context structure pointer is always saved at the base
  9.    of the frame + 0x4.
  10.  
  11.    We get the PC & SP directly from the sigcontext structure itself.
  12.    For other registers we have to dive in a little deeper: 
  13.  
  14.    The hardware save state pointer is at offset 0x10 within the 
  15.    signal context structure.
  16.  
  17.    Within the hardware save state, registers are found in the same order
  18.    as the register numbers in GDB. */
  19.  
  20. #define FRAME_SAVED_PC_IN_SIGTRAMP(FRAME, TMP) \
  21. { \
  22.   *(TMP) = read_memory_integer ((FRAME)->frame + 0x4, 4); \
  23.   *(TMP) = read_memory_integer (*(TMP) + 0x18, 4); \
  24. }
  25.  
  26. #define FRAME_BASE_BEFORE_SIGTRAMP(FRAME, TMP) \
  27. { \
  28.   *(TMP) = read_memory_integer ((FRAME)->frame + 0x4, 4); \
  29.   *(TMP) = read_memory_integer (*(TMP) + 0x8, 4); \
  30. }
  31.  
  32. #define FRAME_FIND_SAVED_REGS_IN_SIGTRAMP(FRAME, FSR) \
  33. { \
  34.   int i; \
  35.   CORE_ADDR TMP; \
  36.   TMP = read_memory_integer ((FRAME)->frame + 0x4, 4); \
  37.   TMP = read_memory_integer (TMP + 0x10, 4); \
  38.   for (i = 0; i < NUM_REGS; i++) \
  39.     { \
  40.       if (i == SP_REGNUM) \
  41.     (FSR)->regs[SP_REGNUM] = read_memory_integer (TMP + SP_REGNUM * 4, 4); \
  42.       else \
  43.     (FSR)->regs[i] = TMP + i * 4; \
  44.     } \
  45. }
  46.  
  47. /* It's mostly just the common stuff.  */
  48. #include "pa/tm-hppa.h"
  49.  
  50. #define GDB_TARGET_IS_PA_ELF
  51.