home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / gnu / gdb-4.9 / gdb / config / sparc / tm-sun4sol2.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-05-12  |  2.4 KB  |  71 lines

  1. /* Macro definitions for GDB for a Sun 4 running Solaris 2
  2.    Copyright 1989, 1992, 1993 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 "sparc/tm-sparc.h"
  21. #include "tm-sysv4.h"
  22.  
  23. #undef IN_SOLIB_TRAMPOLINE
  24. #define IN_SOLIB_TRAMPOLINE(pc, name)    in_solib_trampoline((pc), (name))
  25.  
  26. /* The values of N_SLINE, N_LBRAC, N_RBRAC symbols in .stab sections are
  27.    relative to the current function, rather than being absolute or
  28.    relative to the current N_SO.  */
  29.  
  30. #define    BLOCK_ADDRESS_FUNCTION_RELATIVE
  31.  
  32. /* Variables in the debug stabs occur after the N_LBRAC, not before it,
  33.    in code generated by Sun C.  */
  34.  
  35. #define VARIABLES_INSIDE_BLOCK(desc, gcc_p) (!(gcc_p))
  36.  
  37. /* There's no need to correct LBRAC entries by guessing how they should
  38.    work.  In fact, this is harmful because the LBRAC entries now all appear
  39.    at the end of the function, not intermixed with the SLINE entries.  */
  40.  
  41. #define    SUN_FIXED_LBRAC_BUG
  42.  
  43. #if 0    /* FIXME Setjmp/longjmp are not as well doc'd in SunOS 5.x yet */
  44.  
  45. /* Offsets into jmp_buf.  Not defined by Sun, but at least documented in a
  46.    comment in <machine/setjmp.h>! */
  47.  
  48. #define JB_ELEMENT_SIZE 4    /* Size of each element in jmp_buf */
  49.  
  50. #define JB_ONSSTACK 0
  51. #define JB_SIGMASK 1
  52. #define JB_SP 2
  53. #define JB_PC 3
  54. #define JB_NPC 4
  55. #define JB_PSR 5
  56. #define JB_G1 6
  57. #define JB_O0 7
  58. #define JB_WBCNT 8
  59.  
  60. /* Figure out where the longjmp will land.  We expect that we have just entered
  61.    longjmp and haven't yet setup the stack frame, so the args are still in the
  62.    output regs.  %o0 (O0_REGNUM) points at the jmp_buf structure from which we
  63.    extract the pc (JB_PC) that we will land at.  The pc is copied into ADDR.
  64.    This routine returns true on success */
  65.  
  66. extern int
  67. get_longjmp_target PARAMS ((CORE_ADDR *));
  68.  
  69. #define GET_LONGJMP_TARGET(ADDR) get_longjmp_target(ADDR)
  70. #endif  /* 0 */
  71.