stabs.h 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  1. /* ----------------------------------------------------------------------- *
  2. *
  3. * Copyright 1996-2010 The NASM Authors - All Rights Reserved
  4. * See the file AUTHORS included with the NASM distribution for
  5. * the specific copyright holders.
  6. *
  7. * Redistribution and use in source and binary forms, with or without
  8. * modification, are permitted provided that the following
  9. * conditions are met:
  10. *
  11. * * Redistributions of source code must retain the above copyright
  12. * notice, this list of conditions and the following disclaimer.
  13. * * Redistributions in binary form must reproduce the above
  14. * copyright notice, this list of conditions and the following
  15. * disclaimer in the documentation and/or other materials provided
  16. * with the distribution.
  17. *
  18. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
  19. * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
  20. * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  21. * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  22. * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
  23. * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  24. * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
  25. * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
  26. * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  27. * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  28. * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
  29. * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
  30. * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  31. *
  32. * ----------------------------------------------------------------------- */
  33. #ifndef STABS_H_
  34. #define STABS_H_
  35. #include <ctype.h>
  36. #include "compiler.h"
  37. #include "nasmlib.h"
  38. #include "nasm.h"
  39. /* offsets */
  40. enum stab_offsets {
  41. STAB_strdxoff = 0,
  42. STAB_typeoff = 4,
  43. STAB_otheroff = 5,
  44. STAB_descoff = 6,
  45. STAB_valoff = 8,
  46. STAB_stabsize = 12
  47. };
  48. /* stab/non-stab types */
  49. enum stab_types {
  50. N_UNDF = 0x00,
  51. N_ABS = 0x02,
  52. N_ABS_EXT = 0x03,
  53. N_TEXT = 0x04,
  54. N_TEXT_EXT = 0x05,
  55. N_DATA = 0x06,
  56. N_DATA_EXT = 0x07,
  57. N_BSS = 0x08,
  58. N_BSS_EXT = 0x09,
  59. N_FN_SEQ = 0x0c,
  60. N_INDR = 0x0a,
  61. N_COMM = 0x12,
  62. N_SETA = 0x14,
  63. N_SETA_EXT = 0x15,
  64. N_SETT = 0x16,
  65. N_SETT_EXT = 0x17,
  66. N_SETD = 0x18,
  67. N_SETD_EXT = 0x19,
  68. N_SETB = 0x1a,
  69. N_SETB_EXT = 0x1b,
  70. N_SETV = 0x1c,
  71. N_SETV_EXT = 0x1d,
  72. N_WARNING = 0x1e,
  73. N_FN = 0x1f,
  74. N_GSYM = 0x20,
  75. N_FNAME = 0x22,
  76. N_FUN = 0x24,
  77. N_STSYM = 0x26,
  78. N_LCSYM = 0x28,
  79. N_MAIN = 0x2a,
  80. N_ROSYM = 0x2c,
  81. N_BNSYM = 0x2e,
  82. N_PC = 0x30,
  83. N_NSYMS = 0x32,
  84. N_NOMAP = 0x34,
  85. N_OBJ = 0x38,
  86. N_OPT = 0x3c,
  87. N_RSYM = 0x40,
  88. N_M2C = 0x42,
  89. N_SLINE = 0x44,
  90. N_DSLINE = 0x46,
  91. N_BSLINE = 0x48,
  92. N_BROWS = 0x48,
  93. N_DEFD = 0x4a,
  94. N_FLINE = 0x4c,
  95. N_ENSYM = 0x4e,
  96. N_EHDECL = 0x50,
  97. N_MOD2 = 0x50,
  98. N_CATCH = 0x54,
  99. N_SSYM = 0x60,
  100. N_ENDM = 0x62,
  101. N_SO = 0x64, /* ID for main source file */
  102. N_OSO = 0x66,
  103. N_ALIAS = 0x6c,
  104. N_LSYM = 0x80,
  105. N_BINCL = 0x82,
  106. N_SOL = 0x84, /* ID for sub-source file */
  107. N_PSYM = 0xa0,
  108. N_EINCL = 0xa2,
  109. N_ENTRY = 0xa4,
  110. N_LBRAC = 0xc0,
  111. N_EXCL = 0xc2,
  112. N_SCOPE = 0xc4,
  113. N_PATCH = 0xd0,
  114. N_RBRAC = 0xe0,
  115. N_BCOMM = 0xe2,
  116. N_ECOMM = 0xe4,
  117. N_ECOML = 0xe8,
  118. N_WITH = 0xea,
  119. N_NBTEXT = 0xf0,
  120. N_NBDATA = 0xf2,
  121. N_NBBSS = 0xf4,
  122. N_NBSTS = 0xf6,
  123. N_NBLCS = 0xf8,
  124. N_LENG = 0xfe
  125. };
  126. enum stab_source_file {
  127. N_SO_AS = 0x01,
  128. N_SO_C = 0x02,
  129. N_SO_ANSI_C = 0x03,
  130. N_SO_CC = 0x04,
  131. N_SO_FORTRAN = 0x05,
  132. N_SO_PASCAL = 0x06,
  133. N_SO_FORTRAN90 = 0x07,
  134. N_SO_OBJC = 0x32,
  135. N_SO_OBJCPLUS = 0x33
  136. };
  137. #endif /* STABS_H_ */