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 / nm-hppah.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-11-07  |  2.9 KB  |  78 lines

  1. /* Native support for HPPA-RISC machine running HPUX, for GDB.
  2.    Copyright 1991, 1992 Free Software Foundation, Inc. 
  3.  
  4. This file is part of GDB.
  5.  
  6. This program is free software; you can redistribute it and/or modify
  7. it under the terms of the GNU General Public License as published by
  8. the Free Software Foundation; either version 2 of the License, or
  9. (at your option) any later version.
  10.  
  11. This program is distributed in the hope that it will be useful,
  12. but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14. GNU General Public License for more details.
  15.  
  16. You should have received a copy of the GNU General Public License
  17. along with this program; if not, write to the Free Software
  18. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
  19.  
  20. #include "somsolib.h"
  21.  
  22. #define U_REGS_OFFSET 0
  23.  
  24. #define KERNEL_U_ADDR 0
  25.  
  26. /* What a coincidence! */
  27. #define REGISTER_U_ADDR(addr, blockend, regno)                \
  28. { addr = (int)(blockend) + REGISTER_BYTE (regno);}
  29.  
  30. /* HPUX 8.0, in its infinite wisdom, has chosen to prototype ptrace
  31.    with five arguments, so programs written for normal ptrace lose.  */
  32. #define FIVE_ARG_PTRACE
  33.  
  34. /* We need to figure out where the text region is so that we use the
  35.    appropriate ptrace operator to manipulate text.  Simply reading/writing
  36.    user space will crap out HPUX.  */
  37. #define NEED_TEXT_START_END
  38.  
  39. /* This macro defines the register numbers (from REGISTER_NAMES) that
  40.    are effectively unavailable to the user through ptrace().  It allows
  41.    us to include the whole register set in REGISTER_NAMES (inorder to
  42.    better support remote debugging).  If it is used in
  43.    fetch/store_inferior_registers() gdb will not complain about I/O errors
  44.    on fetching these registers.  If all registers in REGISTER_NAMES
  45.    are available, then return false (0).  */
  46.  
  47. #define CANNOT_STORE_REGISTER(regno)            \
  48.                    ((regno) == 0) ||     \
  49.                    ((regno) == PCSQ_HEAD_REGNUM) || \
  50.                    ((regno) >= PCSQ_TAIL_REGNUM && (regno) < IPSW_REGNUM) ||  \
  51.                    ((regno) > IPSW_REGNUM && (regno) < FP4_REGNUM)
  52.  
  53. /* fetch_inferior_registers is in hppah-nat.c.  */
  54. #define FETCH_INFERIOR_REGISTERS
  55.  
  56. /* child_xfer_memory is in hppah-nat.c.  */
  57. #define CHILD_XFER_MEMORY
  58.  
  59. /* So we can cleanly use code in infptrace.c.  */
  60. #define PT_KILL        PT_EXIT
  61. #define PT_STEP        PT_SINGLE
  62. #define PT_CONTINUE    PT_CONTIN
  63. #define PT_READ_U    PT_RDUAREA
  64. #define PT_WRITE_U    PT_WUAREA
  65. #define PT_READ_I    PT_RIUSER
  66. #define PT_READ_D    PT_RDUSER
  67. #define PT_WRITE_I    PT_WIUSER
  68. #define PT_WRITE_D    PT_WDUSER
  69.  
  70. /* attach/detach works to some extent under BSD and HPUX.  So long
  71.    as the process you're attaching to isn't blocked waiting on io,
  72.    blocked waiting on a signal, or in a system call things work 
  73.    fine.  (The problems in those cases are related to the fact that
  74.    the kernel can't provide complete register information for the
  75.    target process...  Which really pisses off GDB.)  */
  76.  
  77. #define ATTACH_DETACH
  78.