hp-symtab.h 63 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867
  1. /* Definitions and structures for reading debug symbols from the
  2. native HP C compiler.
  3. Written by the Center for Software Science at the University of Utah
  4. and by Cygnus Support.
  5. Copyright (C) 1994-2022 Free Software Foundation, Inc.
  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 3 of the License, or
  9. (at your option) any later version.
  10. This program is distributed in the hope that it will be useful,
  11. but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. GNU General Public License for more details.
  14. You should have received a copy of the GNU General Public License
  15. along with this program; if not, write to the Free Software
  16. Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
  17. MA 02110-1301, USA. */
  18. #ifndef HP_SYMTAB_INCLUDED
  19. #define HP_SYMTAB_INCLUDED
  20. /* General information:
  21. This header file defines and describes only the data structures
  22. necessary to read debug symbols produced by the HP C compiler,
  23. HP ANSI C++ compiler, and HP FORTRAN 90 compiler using the
  24. SOM object file format.
  25. (For a full description of the debug format, ftp hpux-symtab.h from
  26. jaguar.cs.utah.edu:/dist).
  27. Additional notes (Rich Title)
  28. This file is a reverse-engineered version of a file called
  29. "symtab.h" which exists internal to HP's Computer Languages Organization
  30. in /CLO/Components/DDE/obj/som/symtab.h. Because HP's version of
  31. the file is copyrighted and not distributed, it is necessary for
  32. GDB to use the reverse-engineered version that follows.
  33. Work was done by Cygnus to reverse-engineer the C subset of symtab.h.
  34. The WDB project has extended this to also contain the C++
  35. symbol definitions, the F90 symbol definitions,
  36. and the DOC (debugging-optimized-code) symbol definitions.
  37. In some cases (the C++ symbol definitions)
  38. I have added internal documentation here that
  39. goes beyond what is supplied in HP's symtab.h. If we someday
  40. unify these files again, the extra comments should be merged back
  41. into HP's symtab.h.
  42. -------------------------------------------------------------------
  43. Debug symbols are contained entirely within an unloadable space called
  44. $DEBUG$. $DEBUG$ contains several subspaces which group related
  45. debug symbols.
  46. $GNTT$ contains information for global variables, types and contants.
  47. $LNTT$ contains information for procedures (including nesting), scoping
  48. information, local variables, types, and constants.
  49. $SLT$ contains source line information so that code addresses may be
  50. mapped to source lines.
  51. $VT$ contains various strings and constants for named objects (variables,
  52. typedefs, functions, etc). Strings are stored as null-terminated character
  53. lists. Constants always begin on word boundaries. The first byte of
  54. the VT must be zero (a null string).
  55. $XT$ is not currently used by GDB.
  56. Many structures within the subspaces point to other structures within
  57. the same subspace, or to structures within a different subspace. These
  58. pointers are represented as a structure index from the beginning of
  59. the appropriate subspace. */
  60. /* Used to describe where a constant is stored. */
  61. enum location_type
  62. {
  63. LOCATION_IMMEDIATE,
  64. LOCATION_PTR,
  65. LOCATION_VT,
  66. };
  67. /* Languages supported by this debug format. Within the data structures
  68. this type is limited to 4 bits for a maximum of 16 languages. */
  69. enum hp_language
  70. {
  71. HP_LANGUAGE_UNKNOWN,
  72. HP_LANGUAGE_C,
  73. HP_LANGUAGE_FORTRAN,
  74. HP_LANGUAGE_F77 = HP_LANGUAGE_FORTRAN,
  75. HP_LANGUAGE_PASCAL,
  76. HP_LANGUAGE_MODCAL,
  77. HP_LANGUAGE_COBOL,
  78. HP_LANGUAGE_BASIC,
  79. HP_LANGUAGE_ADA,
  80. HP_LANGUAGE_CPLUSPLUS,
  81. HP_LANGUAGE_DMPASCAL
  82. };
  83. /* Basic data types available in this debug format. Within the data
  84. structures this type is limited to 5 bits for a maximum of 32 basic
  85. data types. */
  86. enum hp_type
  87. {
  88. HP_TYPE_UNDEFINED, /* 0 */
  89. HP_TYPE_BOOLEAN, /* 1 */
  90. HP_TYPE_CHAR, /* 2 */
  91. HP_TYPE_INT, /* 3 */
  92. HP_TYPE_UNSIGNED_INT, /* 4 */
  93. HP_TYPE_REAL, /* 5 */
  94. HP_TYPE_COMPLEX, /* 6 */
  95. HP_TYPE_STRING200, /* 7 */
  96. HP_TYPE_LONGSTRING200, /* 8 */
  97. HP_TYPE_TEXT, /* 9 */
  98. HP_TYPE_FLABEL, /* 10 */
  99. HP_TYPE_FTN_STRING_SPEC, /* 11 */
  100. HP_TYPE_MOD_STRING_SPEC, /* 12 */
  101. HP_TYPE_PACKED_DECIMAL, /* 13 */
  102. HP_TYPE_REAL_3000, /* 14 */
  103. HP_TYPE_MOD_STRING_3000, /* 15 */
  104. HP_TYPE_ANYPOINTER, /* 16 */
  105. HP_TYPE_GLOBAL_ANYPOINTER, /* 17 */
  106. HP_TYPE_LOCAL_ANYPOINTER, /* 18 */
  107. HP_TYPE_COMPLEXS3000, /* 19 */
  108. HP_TYPE_FTN_STRING_S300_COMPAT, /* 20 */
  109. HP_TYPE_FTN_STRING_VAX_COMPAT, /* 21 */
  110. HP_TYPE_BOOLEAN_S300_COMPAT, /* 22 */
  111. HP_TYPE_BOOLEAN_VAX_COMPAT, /* 23 */
  112. HP_TYPE_WIDE_CHAR, /* 24 */
  113. HP_TYPE_LONG, /* 25 */
  114. HP_TYPE_UNSIGNED_LONG, /* 26 */
  115. HP_TYPE_DOUBLE, /* 27 */
  116. HP_TYPE_TEMPLATE_ARG, /* 28 */
  117. HP_TYPE_VOID /* 29 */
  118. };
  119. /* An immediate name and type table entry.
  120. extension and immediate will always be one.
  121. global will always be zero.
  122. hp_type is the basic type this entry describes.
  123. bitlength is the length in bits for the basic type. */
  124. struct dnttp_immediate
  125. {
  126. unsigned int extension: 1;
  127. unsigned int immediate: 1;
  128. unsigned int global: 1;
  129. unsigned int type: 5;
  130. unsigned int bitlength: 24;
  131. };
  132. /* A nonimmediate name and type table entry.
  133. extension will always be one.
  134. immediate will always be zero.
  135. if global is zero, this entry points into the LNTT
  136. if global is one, this entry points into the GNTT
  137. index is the index within the GNTT or LNTT for this entry. */
  138. struct dnttp_nonimmediate
  139. {
  140. unsigned int extension: 1;
  141. unsigned int immediate: 1;
  142. unsigned int global: 1;
  143. unsigned int index: 29;
  144. };
  145. /* A pointer to an entry in the GNTT and LNTT tables. It has two
  146. forms depending on the type being described.
  147. The immediate form is used for simple entries and is one
  148. word.
  149. The nonimmediate form is used for complex entries and contains
  150. an index into the LNTT or GNTT which describes the entire type.
  151. If a dnttpointer is -1, then it is a NIL entry. */
  152. #define DNTTNIL (-1)
  153. typedef union dnttpointer
  154. {
  155. struct dnttp_immediate dntti;
  156. struct dnttp_nonimmediate dnttp;
  157. int word;
  158. } dnttpointer;
  159. /* An index into the source line table. As with dnttpointers, a sltpointer
  160. of -1 indicates a NIL entry. */
  161. #define SLTNIL (-1)
  162. typedef int sltpointer;
  163. /* Index into DOC (= "Debugging Optimized Code") line table. */
  164. #define LTNIL (-1)
  165. typedef int ltpointer;
  166. /* Index into context table. */
  167. #define CTXTNIL (-1)
  168. typedef int ctxtpointer;
  169. /* Unsigned byte offset into the VT. */
  170. typedef unsigned int vtpointer;
  171. /* A DNTT entry (used within the GNTT and LNTT).
  172. DNTT entries are variable sized objects, but are always a multiple
  173. of 3 words (we call each group of 3 words a "block").
  174. The first bit in each block is an extension bit. This bit is zero
  175. for the first block of a DNTT entry. If the entry requires more
  176. than one block, then this bit is set to one in all blocks after
  177. the first one. */
  178. /* Each DNTT entry describes a particular debug symbol (beginning of
  179. a source file, a function, variables, structures, etc.
  180. The type of the DNTT entry is stored in the "kind" field within the
  181. DNTT entry itself. */
  182. enum dntt_entry_type
  183. {
  184. DNTT_TYPE_NIL = -1,
  185. DNTT_TYPE_SRCFILE,
  186. DNTT_TYPE_MODULE,
  187. DNTT_TYPE_FUNCTION,
  188. DNTT_TYPE_ENTRY,
  189. DNTT_TYPE_BEGIN,
  190. DNTT_TYPE_END,
  191. DNTT_TYPE_IMPORT,
  192. DNTT_TYPE_LABEL,
  193. DNTT_TYPE_FPARAM,
  194. DNTT_TYPE_SVAR,
  195. DNTT_TYPE_DVAR,
  196. DNTT_TYPE_HOLE1,
  197. DNTT_TYPE_CONST,
  198. DNTT_TYPE_TYPEDEF,
  199. DNTT_TYPE_TAGDEF,
  200. DNTT_TYPE_POINTER,
  201. DNTT_TYPE_ENUM,
  202. DNTT_TYPE_MEMENUM,
  203. DNTT_TYPE_SET,
  204. DNTT_TYPE_SUBRANGE,
  205. DNTT_TYPE_ARRAY,
  206. DNTT_TYPE_STRUCT,
  207. DNTT_TYPE_UNION,
  208. DNTT_TYPE_FIELD,
  209. DNTT_TYPE_VARIANT,
  210. DNTT_TYPE_FILE,
  211. DNTT_TYPE_FUNCTYPE,
  212. DNTT_TYPE_WITH,
  213. DNTT_TYPE_COMMON,
  214. DNTT_TYPE_COBSTRUCT,
  215. DNTT_TYPE_XREF,
  216. DNTT_TYPE_SA,
  217. DNTT_TYPE_MACRO,
  218. DNTT_TYPE_BLOCKDATA,
  219. DNTT_TYPE_CLASS_SCOPE,
  220. DNTT_TYPE_REFERENCE,
  221. DNTT_TYPE_PTRMEM,
  222. DNTT_TYPE_PTRMEMFUNC,
  223. DNTT_TYPE_CLASS,
  224. DNTT_TYPE_GENFIELD,
  225. DNTT_TYPE_VFUNC,
  226. DNTT_TYPE_MEMACCESS,
  227. DNTT_TYPE_INHERITANCE,
  228. DNTT_TYPE_FRIEND_CLASS,
  229. DNTT_TYPE_FRIEND_FUNC,
  230. DNTT_TYPE_MODIFIER,
  231. DNTT_TYPE_OBJECT_ID,
  232. DNTT_TYPE_MEMFUNC,
  233. DNTT_TYPE_TEMPLATE,
  234. DNTT_TYPE_TEMPLATE_ARG,
  235. DNTT_TYPE_FUNC_TEMPLATE,
  236. DNTT_TYPE_LINK,
  237. DNTT_TYPE_DYN_ARRAY_DESC,
  238. DNTT_TYPE_DESC_SUBRANGE,
  239. DNTT_TYPE_BEGIN_EXT,
  240. DNTT_TYPE_INLN,
  241. DNTT_TYPE_INLN_LIST,
  242. DNTT_TYPE_ALIAS,
  243. DNTT_TYPE_DOC_FUNCTION,
  244. DNTT_TYPE_DOC_MEMFUNC,
  245. DNTT_TYPE_MAX
  246. };
  247. /* DNTT_TYPE_SRCFILE:
  248. One DNTT_TYPE_SRCFILE symbol is output for the start of each source
  249. file and at the begin and end of an included file. A DNTT_TYPE_SRCFILE
  250. entry is also output before each DNTT_TYPE_FUNC symbol so that debuggers
  251. can determine what file a function was defined in.
  252. LANGUAGE describes the source file's language.
  253. NAME points to an VT entry providing the source file's name.
  254. Note the name used for DNTT_TYPE_SRCFILE entries are exactly as seen
  255. by the compiler (ie they may be relative or absolute). C include files
  256. via <> inclusion must use absolute paths.
  257. ADDRESS points to an SLT entry from which line number and code locations
  258. may be determined. */
  259. struct dntt_type_srcfile
  260. {
  261. unsigned int extension: 1;
  262. unsigned int kind: 10; /* DNTT_TYPE_SRCFILE */
  263. unsigned int language: 4;
  264. unsigned int unused: 17;
  265. vtpointer name;
  266. sltpointer address;
  267. };
  268. /* DNTT_TYPE_MODULE:
  269. A DNTT_TYPE_MODULE symbol is emitted for the start of a pascal
  270. module or C source file. A module indicates a compilation unit
  271. for name-scoping purposes; in that regard there should be
  272. a 1-1 correspondence between GDB "symtab"'s and MODULE symbol records.
  273. Each DNTT_TYPE_MODULE must have an associated DNTT_TYPE_END symbol.
  274. NAME points to a VT entry providing the module's name. Note C
  275. source files are considered nameless modules.
  276. ALIAS point to a VT entry providing a secondary name.
  277. ADDRESS points to an SLT entry from which line number and code locations
  278. may be determined. */
  279. struct dntt_type_module
  280. {
  281. unsigned int extension: 1;
  282. unsigned int kind: 10; /* DNTT_TYPE_MODULE */
  283. unsigned int unused: 21;
  284. vtpointer name;
  285. vtpointer alias;
  286. dnttpointer unused2;
  287. sltpointer address;
  288. };
  289. /* DNTT_TYPE_FUNCTION,
  290. DNTT_TYPE_ENTRY,
  291. DNTT_TYPE_BLOCKDATA,
  292. DNTT_TYPE_MEMFUNC:
  293. A DNTT_TYPE_FUNCTION symbol is emitted for each function definition;
  294. a DNTT_TYPE_ENTRY symbols is used for secondary entry points. Both
  295. symbols used the dntt_type_function structure.
  296. A DNTT_TYPE_BLOCKDATA symbol is emitted ...?
  297. A DNTT_TYPE_MEMFUNC symbol is emitted for inlined member functions (C++).
  298. Each of DNTT_TYPE_FUNCTION must have a matching DNTT_TYPE_END.
  299. GLOBAL is nonzero if the function has global scope.
  300. LANGUAGE describes the function's source language.
  301. OPT_LEVEL describes the optimization level the function was compiled
  302. with.
  303. VARARGS is nonzero if the function uses varargs.
  304. NAME points to a VT entry providing the function's name.
  305. ALIAS points to a VT entry providing a secondary name for the function.
  306. FIRSTPARAM points to a LNTT entry which describes the parameter list.
  307. ADDRESS points to an SLT entry from which line number and code locations
  308. may be determined.
  309. ENTRYADDR is the memory address corresponding the function's entry point
  310. RETVAL points to a LNTT entry describing the function's return value.
  311. LOWADDR is the lowest memory address associated with this function.
  312. HIADDR is the highest memory address associated with this function. */
  313. struct dntt_type_function
  314. {
  315. unsigned int extension: 1;
  316. unsigned int kind: 10; /* DNTT_TYPE_FUNCTION,
  317. DNTT_TYPE_ENTRY,
  318. DNTT_TYPE_BLOCKDATA
  319. or DNTT_TYPE_MEMFUNC */
  320. unsigned int global: 1;
  321. unsigned int language: 4;
  322. unsigned int nest_level: 5;
  323. unsigned int opt_level: 2;
  324. unsigned int varargs: 1;
  325. unsigned int lang_info: 4;
  326. unsigned int inlined: 1;
  327. unsigned int localalloc: 1;
  328. unsigned int expansion: 1;
  329. unsigned int unused: 1;
  330. vtpointer name;
  331. vtpointer alias;
  332. dnttpointer firstparam;
  333. sltpointer address;
  334. CORE_ADDR entryaddr;
  335. dnttpointer retval;
  336. CORE_ADDR lowaddr;
  337. CORE_ADDR hiaddr;
  338. };
  339. /* DNTT_TYPE_BEGIN:
  340. A DNTT_TYPE_BEGIN symbol is emitted to begin a new nested scope.
  341. Every DNTT_TYPE_BEGIN symbol must have a matching DNTT_TYPE_END symbol.
  342. CLASSFLAG is nonzero if this is the beginning of a c++ class definition.
  343. ADDRESS points to an SLT entry from which line number and code locations
  344. may be determined. */
  345. struct dntt_type_begin
  346. {
  347. unsigned int extension: 1;
  348. unsigned int kind: 10;
  349. unsigned int classflag: 1;
  350. unsigned int unused: 20;
  351. sltpointer address;
  352. };
  353. /* DNTT_TYPE_END:
  354. A DNTT_TYPE_END symbol is emitted when closing a scope started by
  355. a DNTT_TYPE_MODULE, DNTT_TYPE_FUNCTION, DNTT_TYPE_WITH,
  356. DNTT_TYPE_COMMON, DNTT_TYPE_BEGIN, and DNTT_TYPE_CLASS_SCOPE symbols.
  357. ENDKIND describes what type of scope the DNTT_TYPE_END is closing
  358. (one of the above 6 kinds).
  359. CLASSFLAG is nonzero if this is the end of a c++ class definition.
  360. ADDRESS points to an SLT entry from which line number and code locations
  361. may be determined.
  362. BEGINSCOPE points to the LNTT entry which opened the scope. */
  363. struct dntt_type_end
  364. {
  365. unsigned int extension: 1;
  366. unsigned int kind: 10;
  367. unsigned int endkind: 10;
  368. unsigned int classflag: 1;
  369. unsigned int unused: 10;
  370. sltpointer address;
  371. dnttpointer beginscope;
  372. };
  373. /* DNTT_TYPE_IMPORT is unused by GDB. */
  374. /* DNTT_TYPE_LABEL is unused by GDB. */
  375. /* DNTT_TYPE_FPARAM:
  376. A DNTT_TYPE_FPARAM symbol is emitted for a function argument. When
  377. chained together the symbols represent an argument list for a function.
  378. REGPARAM is nonzero if this parameter was passed in a register.
  379. INDIRECT is nonzero if this parameter is a pointer to the parameter
  380. (pass by reference or pass by value for large items).
  381. LONGADDR is nonzero if the parameter is a 64bit pointer.
  382. NAME is a pointer into the VT for the parameter's name.
  383. LOCATION describes where the parameter is stored. Depending on the
  384. parameter type LOCATION could be a register number, or an offset
  385. from the stack pointer.
  386. TYPE points to a NTT entry describing the type of this parameter.
  387. NEXTPARAM points to the LNTT entry describing the next parameter. */
  388. struct dntt_type_fparam
  389. {
  390. unsigned int extension: 1;
  391. unsigned int kind: 10;
  392. unsigned int regparam: 1;
  393. unsigned int indirect: 1;
  394. unsigned int longaddr: 1;
  395. unsigned int copyparam: 1;
  396. unsigned int dflt: 1;
  397. unsigned int doc_ranges: 1;
  398. unsigned int misc_kind: 1;
  399. unsigned int unused: 14;
  400. vtpointer name;
  401. CORE_ADDR location;
  402. dnttpointer type;
  403. dnttpointer nextparam;
  404. int misc;
  405. };
  406. /* DNTT_TYPE_SVAR:
  407. A DNTT_TYPE_SVAR is emitted to describe a variable in static storage.
  408. GLOBAL is nonzero if the variable has global scope.
  409. INDIRECT is nonzero if the variable is a pointer to an object.
  410. LONGADDR is nonzero if the variable is in long pointer space.
  411. STATICMEM is nonzero if the variable is a member of a class.
  412. A_UNION is nonzero if the variable is an anonymous union member.
  413. NAME is a pointer into the VT for the variable's name.
  414. LOCATION provides the memory address for the variable.
  415. TYPE is a pointer into either the GNTT or LNTT which describes
  416. the type of this variable. */
  417. struct dntt_type_svar
  418. {
  419. unsigned int extension: 1;
  420. unsigned int kind: 10;
  421. unsigned int global: 1;
  422. unsigned int indirect: 1;
  423. unsigned int longaddr: 1;
  424. unsigned int staticmem: 1;
  425. unsigned int a_union: 1;
  426. unsigned int unused1: 1;
  427. unsigned int thread_specific: 1;
  428. unsigned int unused2: 14;
  429. vtpointer name;
  430. CORE_ADDR location;
  431. dnttpointer type;
  432. unsigned int offset;
  433. unsigned int displacement;
  434. };
  435. /* DNTT_TYPE_DVAR:
  436. A DNTT_TYPE_DVAR is emitted to describe automatic variables and variables
  437. held in registers.
  438. GLOBAL is nonzero if the variable has global scope.
  439. INDIRECT is nonzero if the variable is a pointer to an object.
  440. REGVAR is nonzero if the variable is in a register.
  441. A_UNION is nonzero if the variable is an anonymous union member.
  442. NAME is a pointer into the VT for the variable's name.
  443. LOCATION provides the memory address or register number for the variable.
  444. TYPE is a pointer into either the GNTT or LNTT which describes
  445. the type of this variable. */
  446. struct dntt_type_dvar
  447. {
  448. unsigned int extension: 1;
  449. unsigned int kind: 10;
  450. unsigned int global: 1;
  451. unsigned int indirect: 1;
  452. unsigned int regvar: 1;
  453. unsigned int a_union: 1;
  454. unsigned int unused: 17;
  455. vtpointer name;
  456. int location;
  457. dnttpointer type;
  458. unsigned int offset;
  459. };
  460. /* DNTT_TYPE_CONST:
  461. A DNTT_TYPE_CONST symbol is emitted for program constants.
  462. GLOBAL is nonzero if the constant has global scope.
  463. INDIRECT is nonzero if the constant is a pointer to an object.
  464. LOCATION_TYPE describes where to find the constant's value
  465. (in the VT, memory, or embedded in an instruction).
  466. CLASSMEM is nonzero if the constant is a member of a class.
  467. NAME is a pointer into the VT for the constant's name.
  468. LOCATION provides the memory address, register number or pointer
  469. into the VT for the constant's value.
  470. TYPE is a pointer into either the GNTT or LNTT which describes
  471. the type of this variable. */
  472. struct dntt_type_const
  473. {
  474. unsigned int extension: 1;
  475. unsigned int kind: 10;
  476. unsigned int global: 1;
  477. unsigned int indirect: 1;
  478. unsigned int location_type: 3;
  479. unsigned int classmem: 1;
  480. unsigned int unused: 15;
  481. vtpointer name;
  482. CORE_ADDR location;
  483. dnttpointer type;
  484. unsigned int offset;
  485. unsigned int displacement;
  486. };
  487. /* DNTT_TYPE_TYPEDEF and DNTT_TYPE_TAGDEF:
  488. The same structure is used to describe typedefs and tagdefs.
  489. DNTT_TYPE_TYPEDEFS are associated with C "typedefs".
  490. DNTT_TYPE_TAGDEFs are associated with C "struct", "union", and "enum"
  491. tags, which may have the same name as a typedef in the same scope.
  492. Also they are associated with C++ "class" tags, which implicitly have
  493. the same name as the class type.
  494. GLOBAL is nonzero if the typedef/tagdef has global scope.
  495. TYPEINFO is used to determine if full type information is available
  496. for a tag. (usually 1, but can be zero for opaque types in C).
  497. NAME is a pointer into the VT for the constant's name.
  498. TYPE points to the underlying type for the typedef/tagdef in the
  499. GNTT or LNTT. */
  500. struct dntt_type_type
  501. {
  502. unsigned int extension: 1;
  503. unsigned int kind: 10; /* DNTT_TYPE_TYPEDEF or
  504. DNTT_TYPE_TAGDEF. */
  505. unsigned int global: 1;
  506. unsigned int typeinfo: 1;
  507. unsigned int unused: 19;
  508. vtpointer name;
  509. dnttpointer type; /* Underlying type, which for TAGDEF's may be
  510. DNTT_TYPE_STRUCT, DNTT_TYPE_UNION,
  511. DNTT_TYPE_ENUM, or DNTT_TYPE_CLASS.
  512. For TYPEDEF's other underlying types
  513. are also possible. */
  514. };
  515. /* DNTT_TYPE_POINTER:
  516. Used to describe a pointer to an underlying type.
  517. POINTSTO is a pointer into the GNTT or LNTT for the type which this
  518. pointer points to.
  519. BITLENGTH is the length of the pointer (not the underlying type). */
  520. struct dntt_type_pointer
  521. {
  522. unsigned int extension: 1;
  523. unsigned int kind: 10;
  524. unsigned int unused: 21;
  525. dnttpointer pointsto;
  526. unsigned int bitlength;
  527. };
  528. /* DNTT_TYPE_ENUM:
  529. Used to describe enumerated types.
  530. FIRSTMEM is a pointer to a DNTT_TYPE_MEMENUM in the GNTT/LNTT which
  531. describes the first member (and contains a pointer to the chain of
  532. members).
  533. BITLENGTH is the number of bits used to hold the values of the enum's
  534. members. */
  535. struct dntt_type_enum
  536. {
  537. unsigned int extension: 1;
  538. unsigned int kind: 10;
  539. unsigned int unused: 21;
  540. dnttpointer firstmem;
  541. unsigned int bitlength;
  542. };
  543. /* DNTT_TYPE_MEMENUM
  544. Used to describe members of an enumerated type.
  545. CLASSMEM is nonzero if this member is part of a class.
  546. NAME points into the VT for the name of this member.
  547. VALUE is the value of this enumeration member.
  548. NEXTMEM points to the next DNTT_TYPE_MEMENUM in the chain. */
  549. struct dntt_type_memenum
  550. {
  551. unsigned int extension: 1;
  552. unsigned int kind: 10;
  553. unsigned int classmem: 1;
  554. unsigned int unused: 20;
  555. vtpointer name;
  556. unsigned int value;
  557. dnttpointer nextmem;
  558. };
  559. /* DNTT_TYPE_SET
  560. Used to describe PASCAL "set" type.
  561. DECLARATION describes the bitpacking of the set.
  562. SUBTYPE points to a DNTT entry describing the type of the members.
  563. BITLENGTH is the size of the set. */
  564. struct dntt_type_set
  565. {
  566. unsigned int extension: 1;
  567. unsigned int kind: 10;
  568. unsigned int declaration: 2;
  569. unsigned int unused: 19;
  570. dnttpointer subtype;
  571. unsigned int bitlength;
  572. };
  573. /* DNTT_TYPE_SUBRANGE
  574. Used to describe subrange type.
  575. DYN_LOW describes the lower bound of the subrange:
  576. 00 for a constant lower bound (found in LOWBOUND).
  577. 01 for a dynamic lower bound with the lower bound found in the
  578. memory address pointed to by LOWBOUND.
  579. 10 for a dynamic lower bound described by an variable found in the
  580. DNTT/LNTT (LOWBOUND would be a pointer into the DNTT/LNTT).
  581. DYN_HIGH is similar to DYN_LOW, except it describes the upper bound.
  582. SUBTYPE points to the type of the subrange.
  583. BITLENGTH is the length in bits needed to describe the subrange's
  584. values. */
  585. struct dntt_type_subrange
  586. {
  587. unsigned int extension: 1;
  588. unsigned int kind: 10;
  589. unsigned int dyn_low: 2;
  590. unsigned int dyn_high: 2;
  591. unsigned int unused: 17;
  592. int lowbound;
  593. int highbound;
  594. dnttpointer subtype;
  595. unsigned int bitlength;
  596. };
  597. /* DNTT_TYPE_ARRAY
  598. Used to describe an array type.
  599. DECLARATION describes the bit packing used in the array.
  600. ARRAYISBYTES is nonzero if the field in arraylength describes the
  601. length in bytes rather than in bits. A value of zero is used to
  602. describe an array with size 2**32.
  603. ELEMISBYTES is nonzero if the length if each element in the array
  604. is describes in bytes rather than bits. A value of zero is used
  605. to an element with size 2**32.
  606. ELEMORDER is nonzero if the elements are indexed in increasing order.
  607. JUSTIFIED if the elements are left justified to index zero.
  608. ARRAYLENGTH is the length of the array.
  609. INDEXTYPE is a DNTT pointer to the type used to index the array.
  610. ELEMTYPE is a DNTT pointer to the type for the array elements.
  611. ELEMLENGTH is the length of each element in the array (including
  612. any padding).
  613. Multi-dimensional arrays are represented by ELEMTYPE pointing to
  614. another DNTT_TYPE_ARRAY. */
  615. struct dntt_type_array
  616. {
  617. unsigned int extension: 1;
  618. unsigned int kind: 10;
  619. unsigned int declaration: 2;
  620. unsigned int dyn_low: 2;
  621. unsigned int dyn_high: 2;
  622. unsigned int arrayisbytes: 1;
  623. unsigned int elemisbytes: 1;
  624. unsigned int elemorder: 1;
  625. unsigned int justified: 1;
  626. unsigned int unused: 11;
  627. unsigned int arraylength;
  628. dnttpointer indextype;
  629. dnttpointer elemtype;
  630. unsigned int elemlength;
  631. };
  632. /* DNTT_TYPE_STRUCT
  633. DNTT_TYPE_STRUCT is used to describe a C structure.
  634. DECLARATION describes the bitpacking used.
  635. FIRSTFIELD is a DNTT pointer to the first field of the structure
  636. (each field contains a pointer to the next field, walk the list
  637. to access all fields of the structure).
  638. VARTAGFIELD and VARLIST are used for Pascal variant records.
  639. BITLENGTH is the size of the structure in bits. */
  640. struct dntt_type_struct
  641. {
  642. unsigned int extension: 1;
  643. unsigned int kind: 10;
  644. unsigned int declaration: 2;
  645. unsigned int unused: 19;
  646. dnttpointer firstfield;
  647. dnttpointer vartagfield;
  648. dnttpointer varlist;
  649. unsigned int bitlength;
  650. };
  651. /* DNTT_TYPE_UNION
  652. DNTT_TYPE_UNION is used to describe a C union.
  653. FIRSTFIELD is a DNTT pointer to the beginning of the field chain.
  654. BITLENGTH is the size of the union in bits. */
  655. struct dntt_type_union
  656. {
  657. unsigned int extension: 1;
  658. unsigned int kind: 10;
  659. unsigned int unused: 21;
  660. dnttpointer firstfield;
  661. unsigned int bitlength;
  662. };
  663. /* DNTT_TYPE_FIELD
  664. DNTT_TYPE_FIELD describes one field in a structure or union
  665. or C++ class.
  666. VISIBILITY is used to describe the visibility of the field
  667. (for c++. public = 0, protected = 1, private = 2).
  668. A_UNION is nonzero if this field is a member of an anonymous union.
  669. STATICMEM is nonzero if this field is a static member of a template.
  670. NAME is a pointer into the VT for the name of the field.
  671. BITOFFSET gives the offset of this field in bits from the beginning
  672. of the structure or union this field is a member of.
  673. TYPE is a DNTT pointer to the type describing this field.
  674. BITLENGTH is the size of the entry in bits.
  675. NEXTFIELD is a DNTT pointer to the next field in the chain. */
  676. struct dntt_type_field
  677. {
  678. unsigned int extension: 1;
  679. unsigned int kind: 10;
  680. unsigned int visibility: 2;
  681. unsigned int a_union: 1;
  682. unsigned int staticmem: 1;
  683. unsigned int unused: 17;
  684. vtpointer name;
  685. unsigned int bitoffset;
  686. dnttpointer type;
  687. unsigned int bitlength;
  688. dnttpointer nextfield;
  689. };
  690. /* DNTT_TYPE_VARIANT is unused by GDB. */
  691. /* DNTT_TYPE_FILE is unused by GDB. */
  692. /* DNTT_TYPE_FUNCTYPE
  693. I think this is used to describe a function type (e.g., would
  694. be emitted as part of a function-pointer description).
  695. VARARGS is nonzero if this function uses varargs.
  696. FIRSTPARAM is a DNTT pointer to the first entry in the parameter
  697. chain.
  698. RETVAL is a DNTT pointer to the type of the return value. */
  699. struct dntt_type_functype
  700. {
  701. unsigned int extension: 1;
  702. unsigned int kind: 10;
  703. unsigned int varargs: 1;
  704. unsigned int info: 4;
  705. unsigned int unused: 16;
  706. unsigned int bitlength;
  707. dnttpointer firstparam;
  708. dnttpointer retval;
  709. };
  710. /* DNTT_TYPE_WITH is emitted by C++ to indicate "with" scoping semantics.
  711. (Probably also emitted by PASCAL to support "with"...).
  712. C++ example: Say "memfunc" is a method of class "c", and say
  713. "m" is a data member of class "c". Then from within "memfunc",
  714. it is legal to reference "m" directly (e.g. you don't have to
  715. say "this->m". The symbol table indicates
  716. this by emitting a DNTT_TYPE_WITH symbol within the function "memfunc",
  717. pointing to the type symbol for class "c".
  718. In GDB, this symbol record is unnecessary,
  719. because GDB's symbol lookup algorithm
  720. infers the "with" semantics when it sees a "this" argument to the member
  721. function. So GDB can safely ignore the DNTT_TYPE_WITH record.
  722. A DNTT_TYPE_WITH has a matching DNTT_TYPE_END symbol. */
  723. struct dntt_type_with
  724. {
  725. unsigned int extension: 1; /* always zero */
  726. unsigned int kind: 10; /* always DNTT_TYPE_WITH */
  727. unsigned int addrtype: 2; /* 0 => STATTYPE */
  728. /* 1 => DYNTYPE */
  729. /* 2 => REGTYPE */
  730. unsigned int indirect: 1; /* 1 => pointer to object */
  731. unsigned int longaddr: 1; /* 1 => in long pointer space */
  732. unsigned int nestlevel: 6; /* # of nesting levels back */
  733. unsigned int doc_ranges: 1; /* 1 => location is range list */
  734. unsigned int unused: 10;
  735. long location; /* where stored (allocated) */
  736. sltpointer address;
  737. dnttpointer type; /* type of with expression */
  738. vtpointer name; /* name of with expression */
  739. unsigned long offset; /* byte offset from location */
  740. };
  741. /* DNTT_TYPE_COMMON is unsupported by GDB. */
  742. /* A DNTT_TYPE_COMMON symbol must have a matching DNTT_TYPE_END symbol */
  743. /* DNTT_TYPE_COBSTRUCT is unsupported by GDB. */
  744. /* DNTT_TYPE_XREF is unsupported by GDB. */
  745. /* DNTT_TYPE_SA is unsupported by GDB. */
  746. /* DNTT_TYPE_MACRO is unsupported by GDB */
  747. /* DNTT_TYPE_BLOCKDATA has the same structure as DNTT_TYPE_FUNCTION */
  748. /* The following are the C++ specific SOM records */
  749. /* The purpose of the DNTT_TYPE_CLASS_SCOPE is to bracket C++ methods
  750. and indicate the method name belongs in the "class scope" rather
  751. than in the module they are being defined in. For example:
  752. class c {
  753. ...
  754. void memfunc(); // member function
  755. };
  756. void c::memfunc() // definition of class c's "memfunc"
  757. {
  758. ...
  759. }
  760. main()
  761. {
  762. ...
  763. }
  764. In the above, the name "memfunc" is not directly visible from "main".
  765. I.e., you have to say "break c::memfunc".
  766. If it were a normal function (not a method), it would be visible
  767. via the simple "break memfunc". Since "memfunc" otherwise looks
  768. like a normal FUNCTION in the symbol table, the bracketing
  769. CLASS_SCOPE is what is used to indicate it is really a method.
  770. A DNTT_TYPE_CLASS_SCOPE symbol must have a matching DNTT_TYPE_END symbol. */
  771. struct dntt_type_class_scope
  772. {
  773. unsigned int extension: 1; /* Always zero. */
  774. unsigned int kind: 10; /* Always DNTT_TYPE_CLASS_SCOPE. */
  775. unsigned int unused: 21;
  776. sltpointer address ; /* Pointer to SLT entry. */
  777. dnttpointer type ; /* Pointer to class type DNTT. */
  778. };
  779. /* C++ reference parameter.
  780. The structure of this record is the same as DNTT_TYPE_POINTER -
  781. refer to struct dntt_type_pointer. */
  782. /* The next two describe C++ pointer-to-data-member type, and
  783. pointer-to-member-function type, respectively.
  784. DNTT_TYPE_PTRMEM and DNTT_TYPE_PTRMEMFUNC have the same structure. */
  785. struct dntt_type_ptrmem
  786. {
  787. unsigned int extension: 1; /* Always zero. */
  788. unsigned int kind: 10; /* Always DNTT_TYPE_PTRMEM. */
  789. unsigned int unused: 21;
  790. dnttpointer pointsto ; /* Pointer to class DNTT. */
  791. dnttpointer memtype ; /* Type of member. */
  792. };
  793. struct dntt_type_ptrmemfunc
  794. {
  795. unsigned int extension: 1; /* Always zero. */
  796. unsigned int kind: 10; /* Always DNTT_TYPE_PTRMEMFUNC. */
  797. unsigned int unused: 21;
  798. dnttpointer pointsto ; /* Pointer to class DNTT. */
  799. dnttpointer memtype ; /* Type of member. */
  800. };
  801. /* The DNTT_TYPE_CLASS symbol is emitted to describe a class type.
  802. "memberlist" points to a chained list of FIELD or GENFIELD records
  803. indicating the class members. "parentlist" points to a chained list
  804. of INHERITANCE records indicating classes from which we inherit
  805. fields. */
  806. struct dntt_type_class
  807. {
  808. unsigned int extension: 1; /* Always zero. */
  809. unsigned int kind: 10; /* Always DNTT_TYPE_CLASS. */
  810. unsigned int abstract: 1; /* Is this an abstract class? */
  811. unsigned int class_decl: 2; /* 0=class,1=union,2=struct. */
  812. unsigned int expansion: 1; /* 1=template expansion. */
  813. unsigned int unused: 17;
  814. dnttpointer memberlist ; /* Ptr to chain of [GEN]FIELDs. */
  815. unsigned long vtbl_loc ; /* Offset in obj of ptr to vtbl. */
  816. dnttpointer parentlist ; /* Ptr to K_INHERITANCE list. */
  817. unsigned long bitlength ; /* Total at this level. */
  818. dnttpointer identlist ; /* Ptr to chain of class ident's. */
  819. dnttpointer friendlist ; /* Ptr to K_FRIEND list. */
  820. dnttpointer templateptr ; /* Ptr to template. */
  821. dnttpointer nextexp ; /* Ptr to next expansion. */
  822. };
  823. /* Class members are indicated via either the FIELD record (for
  824. data members, same as for C struct fields), or by the GENFIELD record
  825. (for member functions). */
  826. struct dntt_type_genfield
  827. {
  828. unsigned int extension: 1; /* Always zero. */
  829. unsigned int kind: 10; /* Always DNTT_TYPE_GENFIELD. */
  830. unsigned int visibility: 2; /* Pub = 0, prot = 1, priv = 2. */
  831. unsigned int a_union: 1; /* 1 => anonymous union member. */
  832. unsigned int unused: 18;
  833. dnttpointer field ; /* Pointer to field or qualifier. */
  834. dnttpointer nextfield ; /* Pointer to next field. */
  835. };
  836. /* C++ virtual functions. */
  837. struct dntt_type_vfunc
  838. {
  839. unsigned int extension: 1; /* always zero */
  840. unsigned int kind: 10; /* always DNTT_TYPE_VFUNC */
  841. unsigned int pure: 1; /* pure virtual function ? */
  842. unsigned int unused: 20;
  843. dnttpointer funcptr ; /* points to FUNCTION symbol */
  844. unsigned long vtbl_offset ; /* offset into vtbl for virtual */
  845. };
  846. /* Not precisely sure what this is intended for - DDE ignores it. */
  847. struct dntt_type_memaccess
  848. {
  849. unsigned int extension: 1; /* always zero */
  850. unsigned int kind: 10; /* always DNTT_TYPE_MEMACCESS */
  851. unsigned int unused: 21;
  852. dnttpointer classptr ; /* pointer to base class */
  853. dnttpointer field ; /* pointer field */
  854. };
  855. /* The DNTT_TYPE_INHERITANCE record describes derived classes.
  856. In particular, the "parentlist" field of the CLASS record points
  857. to a list of INHERITANCE records for classes from which we
  858. inherit members. */
  859. struct dntt_type_inheritance
  860. {
  861. unsigned int extension: 1; /* always zero */
  862. unsigned int kind: 10; /* always DNTT_TYPE_INHERITANCE */
  863. unsigned int Virtual: 1; /* virtual base class ? */
  864. unsigned int visibility: 2; /* pub = 0, prot = 1, priv = 2 */
  865. unsigned int unused: 18;
  866. dnttpointer classname ; /* first parent class, if any */
  867. unsigned long offset ; /* offset to start of base class */
  868. dnttpointer next ; /* pointer to next K_INHERITANCE */
  869. unsigned long future[2] ; /* padding to 3-word block end */
  870. };
  871. /* C++ "friend" classes ... */
  872. struct dntt_type_friend_class
  873. {
  874. unsigned int extension: 1; /* always zero */
  875. unsigned int kind: 10; /* always DNTT_TYPE_FRIEND_CLASS */
  876. unsigned int unused: 21;
  877. dnttpointer classptr ; /* pointer to class DNTT */
  878. dnttpointer next ; /* next DNTT_FRIEND */
  879. };
  880. struct dntt_type_friend_func
  881. {
  882. unsigned int extension: 1; /* always zero */
  883. unsigned int kind: 10; /* always DNTT_TYPE_FRIEND_FUNC */
  884. unsigned int unused: 21;
  885. dnttpointer funcptr ; /* pointer to function */
  886. dnttpointer classptr ; /* pointer to class DNTT */
  887. dnttpointer next ; /* next DNTT_FRIEND */
  888. unsigned long future[2] ; /* padding to 3-word block end */
  889. };
  890. /* DDE appears to ignore the DNTT_TYPE_MODIFIER record.
  891. It could perhaps be used to give better "ptype" output in GDB;
  892. otherwise it is probably safe for GDB to ignore it also. */
  893. struct dntt_type_modifier
  894. {
  895. unsigned int extension: 1; /* always zero */
  896. unsigned int kind: 10; /* always DNTT_TYPE_MODIFIER */
  897. unsigned int m_const: 1; /* const */
  898. unsigned int m_static: 1; /* static */
  899. unsigned int m_void: 1; /* void */
  900. unsigned int m_volatile: 1; /* volatile */
  901. unsigned int m_duplicate: 1; /* duplicate */
  902. unsigned int unused: 16;
  903. dnttpointer type ; /* subtype */
  904. unsigned long future ; /* padding to 3-word block end */
  905. };
  906. /* I'm not sure what this was intended for - DDE ignores it. */
  907. struct dntt_type_object_id
  908. {
  909. unsigned int extension: 1; /* always zero */
  910. unsigned int kind: 10; /* always DNTT_TYPE_OBJECT_ID */
  911. unsigned int indirect: 1; /* Is object_ident addr of addr? */
  912. unsigned int unused: 20;
  913. unsigned long object_ident ; /* object identifier */
  914. unsigned long offset ; /* offset to start of base class */
  915. dnttpointer next ; /* pointer to next K_OBJECT_ID */
  916. unsigned long segoffset ; /* for linker fixup */
  917. unsigned long future ; /* padding to 3-word block end */
  918. };
  919. /* No separate dntt_type_memfunc; same as dntt_type_func */
  920. /* Symbol records to support templates. These only get used
  921. in DDE's "describe" output (like GDB's "ptype"). */
  922. /* The TEMPLATE record is the header for a template-class.
  923. Like the CLASS record, a TEMPLATE record has a memberlist that
  924. points to a list of template members. It also has an arglist
  925. pointing to a list of TEMPLATE_ARG records. */
  926. struct dntt_type_template
  927. {
  928. unsigned int extension: 1; /* always zero */
  929. unsigned int kind: 10; /* always DNTT_TYPE_TEMPLATE */
  930. unsigned int abstract: 1; /* is this an abstract class? */
  931. unsigned int class_decl: 2; /* 0=class,1=union,2=struct */
  932. unsigned int unused: 18;
  933. dnttpointer memberlist ; /* ptr to chain of K_[GEN]FIELDs */
  934. long unused2 ; /* offset in obj of ptr to vtbl */
  935. dnttpointer parentlist ; /* ptr to K_INHERITANCE list */
  936. unsigned long bitlength ; /* total at this level */
  937. dnttpointer identlist ; /* ptr to chain of class ident's */
  938. dnttpointer friendlist ; /* ptr to K_FRIEND list */
  939. dnttpointer arglist ; /* ptr to argument list */
  940. dnttpointer expansions ; /* ptr to expansion list */
  941. };
  942. /* Template-class arguments are a list of TEMPL_ARG records
  943. chained together. The "name" field is the name of the formal.
  944. E.g.:
  945. template <class T> class q { ... };
  946. Then "T" is the name of the formal argument. */
  947. struct dntt_type_templ_arg
  948. {
  949. unsigned int extension: 1; /* always zero */
  950. unsigned int kind: 10; /* always DNTT_TYPE_TEMPL_ARG */
  951. unsigned int usagetype: 1; /* 0 type-name 1 expression */
  952. unsigned int unused: 20;
  953. vtpointer name ; /* name of argument */
  954. dnttpointer type ; /* for non type arguments */
  955. dnttpointer nextarg ; /* Next argument if any */
  956. long future[2] ; /* padding to 3-word block end */
  957. };
  958. /* FUNC_TEMPLATE records are sort of like FUNCTION, but are emitted
  959. for template member functions. E.g.,
  960. template <class T> class q
  961. {
  962. ...
  963. void f();
  964. ...
  965. };
  966. Within the list of FIELDs/GENFIELDs defining the member list
  967. of the template "q", "f" would appear as a FUNC_TEMPLATE.
  968. We'll also see instances of FUNCTION "f" records for each
  969. instantiation of the template. */
  970. struct dntt_type_func_template
  971. {
  972. unsigned int extension: 1; /* always zero */
  973. unsigned int kind: 10; /* always DNTT_TYPE_FUNC_TEMPLATE */
  974. unsigned int public: 1; /* 1 => globally visible */
  975. unsigned int language: 4; /* type of language */
  976. unsigned int level: 5; /* nesting level (top level = 0)*/
  977. unsigned int optimize: 2; /* level of optimization */
  978. unsigned int varargs: 1; /* ellipses. Pascal/800 later */
  979. unsigned int info: 4; /* lang-specific stuff; F_xxxx */
  980. unsigned int inlined: 1;
  981. unsigned int localloc: 1; /* 0 at top, 1 at end of block */
  982. unsigned int unused: 2;
  983. vtpointer name ; /* name of function */
  984. vtpointer alias ; /* alternate name, if any */
  985. dnttpointer firstparam ; /* first FPARAM, if any */
  986. dnttpointer retval ; /* return type, if any */
  987. dnttpointer arglist ; /* ptr to argument list */
  988. };
  989. /* LINK is apparently intended to link together function template
  990. definitions with their instantiations. However, it is not clear
  991. why this would be needed, except to provide the information on
  992. a "ptype" command. And as far as I can tell, aCC does not
  993. generate this record. */
  994. struct dntt_type_link
  995. {
  996. unsigned int extension: 1; /* always zero */
  997. unsigned int kind: 10; /* always DNTT_TYPE_LINK */
  998. unsigned int linkKind: 4; /* always LINK_UNKNOWN */
  999. unsigned int unused: 17;
  1000. long future1 ; /* expansion */
  1001. dnttpointer ptr1 ; /* link from template */
  1002. dnttpointer ptr2 ; /* to expansion */
  1003. long future[2] ; /* padding to 3-word block end */
  1004. };
  1005. /* end of C++ specific SOM's. */
  1006. /* DNTT_TYPE_DYN_ARRAY_DESC is unused by GDB */
  1007. /* DNTT_TYPE_DESC_SUBRANGE is unused by GDB */
  1008. /* DNTT_TYPE_BEGIN_EXT is unused by GDB */
  1009. /* DNTT_TYPE_INLN is unused by GDB */
  1010. /* DNTT_TYPE_INLN_LIST is unused by GDB */
  1011. /* DNTT_TYPE_ALIAS is unused by GDB */
  1012. struct dntt_type_doc_function
  1013. {
  1014. unsigned int extension: 1; /* always zero */
  1015. unsigned int kind: 10; /* K_DOC_FUNCTION or */
  1016. /* K_DOC_MEMFUNC */
  1017. unsigned int global: 1; /* 1 => globally visible */
  1018. unsigned int language: 4; /* type of language */
  1019. unsigned int level: 5; /* nesting level (top level = 0)*/
  1020. unsigned int optimize: 2; /* level of optimization */
  1021. unsigned int varargs: 1; /* ellipses. Pascal/800 later */
  1022. unsigned int info: 4; /* lang-specific stuff; F_xxxx */
  1023. unsigned int inlined: 1;
  1024. unsigned int localloc: 1; /* 0 at top, 1 at end of block */
  1025. unsigned int expansion: 1; /* 1 = function expansion */
  1026. unsigned int doc_clone: 1;
  1027. vtpointer name; /* name of function */
  1028. vtpointer alias; /* alternate name, if any */
  1029. dnttpointer firstparam; /* first FPARAM, if any */
  1030. sltpointer address; /* code and text locations */
  1031. CORE_ADDR entryaddr; /* address of entry point */
  1032. dnttpointer retval; /* return type, if any */
  1033. CORE_ADDR lowaddr; /* lowest address of function */
  1034. CORE_ADDR hiaddr; /* highest address of function */
  1035. dnttpointer inline_list; /* pointer to first inline */
  1036. ltpointer lt_offset; /* start of frag/cp line table */
  1037. ctxtpointer ctxt_offset; /* start of context table for this routine */
  1038. };
  1039. /* DNTT_TYPE_DOC_MEMFUNC is unused by GDB */
  1040. /* DNTT_TYPE_GENERIC and DNTT_TYPE_BLOCK are convience structures
  1041. so we can examine a DNTT entry in a generic fashion. */
  1042. struct dntt_type_generic
  1043. {
  1044. unsigned int word[9];
  1045. };
  1046. struct dntt_type_block
  1047. {
  1048. unsigned int extension: 1;
  1049. unsigned int kind: 10;
  1050. unsigned int unused: 21;
  1051. unsigned int word[2];
  1052. };
  1053. /* One entry in a DNTT (either the LNTT or GNTT).
  1054. This is a union of the above 60 or so structure definitions. */
  1055. union dnttentry
  1056. {
  1057. struct dntt_type_srcfile dsfile;
  1058. struct dntt_type_module dmodule;
  1059. struct dntt_type_function dfunc;
  1060. struct dntt_type_function dentry;
  1061. struct dntt_type_begin dbegin;
  1062. struct dntt_type_end dend;
  1063. struct dntt_type_fparam dfparam;
  1064. struct dntt_type_svar dsvar;
  1065. struct dntt_type_dvar ddvar;
  1066. struct dntt_type_const dconst;
  1067. struct dntt_type_type dtype;
  1068. struct dntt_type_type dtag;
  1069. struct dntt_type_pointer dptr;
  1070. struct dntt_type_enum denum;
  1071. struct dntt_type_memenum dmember;
  1072. struct dntt_type_set dset;
  1073. struct dntt_type_subrange dsubr;
  1074. struct dntt_type_array darray;
  1075. struct dntt_type_struct dstruct;
  1076. struct dntt_type_union dunion;
  1077. struct dntt_type_field dfield;
  1078. struct dntt_type_functype dfunctype;
  1079. struct dntt_type_with dwith;
  1080. struct dntt_type_function dblockdata;
  1081. struct dntt_type_class_scope dclass_scope;
  1082. struct dntt_type_pointer dreference;
  1083. struct dntt_type_ptrmem dptrmem;
  1084. struct dntt_type_ptrmemfunc dptrmemfunc;
  1085. struct dntt_type_class dclass;
  1086. struct dntt_type_genfield dgenfield;
  1087. struct dntt_type_vfunc dvfunc;
  1088. struct dntt_type_memaccess dmemaccess;
  1089. struct dntt_type_inheritance dinheritance;
  1090. struct dntt_type_friend_class dfriend_class;
  1091. struct dntt_type_friend_func dfriend_func;
  1092. struct dntt_type_modifier dmodifier;
  1093. struct dntt_type_object_id dobject_id;
  1094. struct dntt_type_template dtemplate;
  1095. struct dntt_type_templ_arg dtempl_arg;
  1096. struct dntt_type_func_template dfunc_template;
  1097. struct dntt_type_link dlink;
  1098. struct dntt_type_doc_function ddocfunc;
  1099. struct dntt_type_generic dgeneric;
  1100. struct dntt_type_block dblock;
  1101. };
  1102. /* Source line entry types. */
  1103. enum slttype
  1104. {
  1105. SLT_NORMAL,
  1106. SLT_SRCFILE,
  1107. SLT_MODULE,
  1108. SLT_FUNCTION,
  1109. SLT_ENTRY,
  1110. SLT_BEGIN,
  1111. SLT_END,
  1112. SLT_WITH,
  1113. SLT_EXIT,
  1114. SLT_ASSIST,
  1115. SLT_MARKER,
  1116. SLT_CLASS_SCOPE,
  1117. SLT_INLN,
  1118. SLT_NORMAL_OFFSET,
  1119. };
  1120. /* A normal source line entry. Simply provides a mapping of a source
  1121. line number to a code address.
  1122. SLTDESC will always be SLT_NORMAL or SLT_EXIT. */
  1123. struct slt_normal
  1124. {
  1125. unsigned int sltdesc: 4;
  1126. unsigned int line: 28;
  1127. CORE_ADDR address;
  1128. };
  1129. struct slt_normal_off
  1130. {
  1131. unsigned int sltdesc: 4;
  1132. unsigned int offset: 6;
  1133. unsigned int line: 22;
  1134. CORE_ADDR address;
  1135. };
  1136. /* A special source line entry. Provides a mapping of a declaration
  1137. to a line number. These entries point back into the DNTT which
  1138. references them. */
  1139. struct slt_special
  1140. {
  1141. unsigned int sltdesc: 4;
  1142. unsigned int line: 28;
  1143. dnttpointer backptr;
  1144. };
  1145. /* Used to describe nesting.
  1146. For nested languages, an slt_assist entry must follow each SLT_FUNC
  1147. entry in the SLT. The address field will point forward to the
  1148. first slt_normal entry within the function's scope. */
  1149. struct slt_assist
  1150. {
  1151. unsigned int sltdesc: 4;
  1152. unsigned int unused: 28;
  1153. sltpointer address;
  1154. };
  1155. struct slt_generic
  1156. {
  1157. unsigned int word[2];
  1158. };
  1159. union sltentry
  1160. {
  1161. struct slt_normal snorm;
  1162. struct slt_normal_off snormoff;
  1163. struct slt_special sspec;
  1164. struct slt_assist sasst;
  1165. struct slt_generic sgeneric;
  1166. };
  1167. /* $LINES$ declarations
  1168. This is the line table used for optimized code, which is only present
  1169. in the new $PROGRAM_INFO$ debug space. */
  1170. #define DST_LN_ESCAPE_FLAG1 15
  1171. #define DST_LN_ESCAPE_FLAG2 14
  1172. #define DST_LN_CTX_SPEC1 13
  1173. #define DST_LN_CTX_SPEC2 12
  1174. /* Escape function codes: */
  1175. typedef enum
  1176. {
  1177. dst_ln_pad, /* pad byte */
  1178. dst_ln_escape_1, /* reserved */
  1179. dst_ln_dpc1_dln1, /* 1 byte line delta, 1 byte pc delta */
  1180. dst_ln_dpc2_dln2, /* 2 bytes line delta, 2 bytes pc delta */
  1181. dst_ln_pc4_ln4, /* 4 bytes ABSOLUTE line number, 4 bytes ABSOLUTE pc */
  1182. dst_ln_dpc0_dln1, /* 1 byte line delta, pc delta = 0 */
  1183. dst_ln_ln_off_1, /* statement escape, stmt # = 1 (2nd stmt on line) */
  1184. dst_ln_ln_off, /* statement escape, stmt # = next byte */
  1185. dst_ln_entry, /* entry escape, next byte is entry number */
  1186. dst_ln_exit, /* exit escape */
  1187. dst_ln_stmt_end, /* gap escape, 4 bytes pc delta */
  1188. dst_ln_stmt_cp, /* current stmt is a critical point */
  1189. dst_ln_escape_12, /* reserved */
  1190. dst_ln_escape_13, /* this is an exception site record */
  1191. dst_ln_nxt_byte, /* next byte contains the real escape code */
  1192. dst_ln_end, /* end escape, final entry follows */
  1193. dst_ln_escape1_END_OF_ENUM
  1194. }
  1195. dst_ln_escape1_t;
  1196. typedef enum
  1197. {
  1198. dst_ln_ctx_1, /* next byte describes context switch with 5-bit */
  1199. /* index into the image table and 3-bit run length. */
  1200. /* If run length is 0, end with another cxt specifier or ctx_end */
  1201. dst_ln_ctx_2, /* next 2 bytes switch context: 13 bit index, 3 bit run length */
  1202. dst_ln_ctx_4, /* next 4 bytes switch context: 29 bit index, 3 bit run length */
  1203. dst_ln_ctx_end, /* end current context */
  1204. dst_ln_col_run_1, /* next byte is column position of start of next statement, */
  1205. /* following byte is length of statement */
  1206. dst_ln_col_run_2, /* next 2 bytes is column position of start of next statement, */
  1207. /* following 2 bytes is length of statement */
  1208. dst_ln_init_base1, /* next 4 bytes are absolute PC, followed by 1 byte of line number */
  1209. dst_ln_init_base2, /* next 4 bytes are absolute PC, followed by 2 bytes of line number */
  1210. dst_ln_init_base3, /* next 4 bytes are absolute PC, followed by 3 bytes of line number */
  1211. dst_ln_escape2_END_OF_ENUM
  1212. }
  1213. dst_ln_escape2_t;
  1214. typedef union
  1215. {
  1216. struct
  1217. {
  1218. unsigned int pc_delta : 4; /* 4 bit pc delta */
  1219. int ln_delta : 4; /* 4 bit line number delta */
  1220. }
  1221. delta;
  1222. struct
  1223. {
  1224. unsigned int esc_flag : 4; /* alias for pc_delta */
  1225. unsigned int esc_code : 4; /* escape function code (dst_ln_escape1_t, or ...2_t */
  1226. }
  1227. esc;
  1228. struct
  1229. {
  1230. unsigned int esc_flag : 4; /* dst_ln_ctx_spec1, or dst_ln_ctx_spec2 */
  1231. unsigned int run_length : 2;
  1232. unsigned int ctx_index : 2; /* ...spec2 contains index; ...spec1, index - 4 */
  1233. }
  1234. ctx_spec;
  1235. char sdata; /* signed data byte */
  1236. unsigned char udata; /* unsigned data byte */
  1237. }
  1238. dst_ln_entry_t,
  1239. * dst_ln_entry_ptr_t;
  1240. /* Warning: although the above union occupies only 1 byte the compiler treats
  1241. it as having size 2 (the minimum size of a struct). Therefore a sequence of
  1242. dst_ln_entry_t's cannot be described as an array, and walking through such a
  1243. sequence requires convoluted code such as
  1244. ln_ptr = (dst_ln_entry_ptr_t) (char*) ln_ptr + 1
  1245. We regret the inconvenience. */
  1246. /* Structure for interpreting the byte following a dst_ln_ctx1 entry. */
  1247. typedef struct
  1248. {
  1249. unsigned int ctx1_index : 5; /* 5 bit index into context table */
  1250. unsigned int ctx1_run_length : 3; /* 3 bit run length */
  1251. } dst_ln_ctx1_t,
  1252. *dst_ln_ctx1_ptr_t;
  1253. /* Structure for interpreting the bytes following a dst_ln_ctx2 entry. */
  1254. typedef struct
  1255. {
  1256. unsigned int ctx2_index : 13; /* 13 bit index into context table */
  1257. unsigned int ctx2_run_length : 3; /* 3 bit run length */
  1258. } dst_ln_ctx2_t,
  1259. *dst_ln_ctx2_ptr_t;
  1260. /* Structure for interpreting the bytes following a dst_ln_ctx4 entry. */
  1261. typedef struct
  1262. {
  1263. unsigned int ctx4_index : 29; /* 29 bit index into context table */
  1264. unsigned int ctx4_run_length : 3; /* 3 bit run length */
  1265. } dst_ln_ctx4_t,
  1266. *dst_ln_ctx4_ptr_t;
  1267. /* PXDB definitions.
  1268. PXDB is a post-processor which takes the executable file
  1269. and massages the debug information so that the debugger may
  1270. start up and run more efficiently. Some of the tasks
  1271. performed by PXDB are:
  1272. o Remove duplicate global type and variable information
  1273. from the GNTT,
  1274. o Append the GNTT onto the end of the LNTT and place both
  1275. back in the LNTT section,
  1276. o Build quick look-up tables (description follows) for
  1277. files, procedures, modules, and paragraphs (for Cobol),
  1278. placing these in the GNTT section,
  1279. o Reconstruct the header appearing in the header section
  1280. to access this information.
  1281. The "quick look-up" tables are in the $GNTT$ sub-space, in
  1282. the following order:
  1283. Procedures -sorted by address
  1284. Source files -sorted by address (of the
  1285. generated code from routines)
  1286. Modules -sorted by address
  1287. Classes -<unsorted?>
  1288. Address Alias -sorted by index <?>
  1289. Object IDs -sorted by object identifier
  1290. Most quick entries have (0-based) indices into the LNTT tables to
  1291. the full entries for the item it describes.
  1292. The post-PXDB header is in the $HEADER$ sub-space. Alas, it
  1293. occurs in different forms, depending on the optimization level
  1294. in the compilation step and whether PXDB was run or not. The
  1295. worst part is the forms aren't self-describing, so we'll have
  1296. to grovel in the bits to figure out what kind we're looking at
  1297. (see hp_get_header in hp-psymtab-read.c). */
  1298. /* PXDB versions. */
  1299. #define PXDB_VERSION_CPLUSPLUS 1
  1300. #define PXDB_VERSION_7_4 2
  1301. #define PXDB_VERSION_CPP_30 3
  1302. #define PXDB_VERSION_DDE_3_2A 4
  1303. #define PXDB_VERSION_DDE_3_2 5
  1304. #define PXDB_VERSION_DDE_4_0 6
  1305. #define PXDB_VERSION_2_1 1
  1306. /* Header version for the case that there is no DOC info
  1307. but the executable has been processed by pxdb (the easy
  1308. case, from "cc -g"). */
  1309. typedef struct PXDB_struct
  1310. {
  1311. int pd_entries; /* # of entries in function look-up table */
  1312. int fd_entries; /* # of entries in file look-up table */
  1313. int md_entries; /* # of entries in module look-up table */
  1314. unsigned int pxdbed : 1; /* 1 => file has been preprocessed */
  1315. unsigned int bighdr : 1; /* 1 => this header contains 'time' word */
  1316. unsigned int sa_header : 1;/* 1 => created by SA version of pxdb */
  1317. /* used for version check in xdb */
  1318. unsigned int inlined: 1; /* one or more functions have been inlined */
  1319. unsigned int spare:12;
  1320. short version; /* pxdb header version */
  1321. int globals; /* index into the DNTT where GNTT begins */
  1322. unsigned int time; /* modify time of file before being pxdbed */
  1323. int pg_entries; /* # of entries in label look-up table */
  1324. int functions; /* actual number of functions */
  1325. int files; /* actual number of files */
  1326. int cd_entries; /* # of entries in class look-up table */
  1327. int aa_entries; /* # of entries in addr alias look-up table */
  1328. int oi_entries; /* # of entries in object id look-up table */
  1329. } PXDB_header, *PXDB_header_ptr;
  1330. /* Header version for the case that there is no DOC info and the
  1331. executable has NOT been processed by pxdb. */
  1332. typedef struct XDB_header_struct
  1333. {
  1334. long gntt_length;
  1335. long lntt_length;
  1336. long slt_length;
  1337. long vt_length;
  1338. long xt_length;
  1339. } XDB_header;
  1340. /* Header version for the case that there is DOC info and the
  1341. executable has been processed by pxdb. */
  1342. typedef struct DOC_info_PXDB_header_struct
  1343. {
  1344. unsigned int xdb_header: 1; /* bit set if this is post-3.1 xdb */
  1345. unsigned int doc_header: 1; /* bit set if this is doc-style header */
  1346. unsigned int version: 8; /* version of pxdb see defines
  1347. PXDB_VERSION_* in this file. */
  1348. unsigned int reserved_for_flags: 16;/* for future use; -- must be
  1349. set to zero. */
  1350. unsigned int has_aux_pd_table: 1; /* $GNTT$ has aux PD table */
  1351. unsigned int has_expr_table: 1; /* space has $EXPR$ */
  1352. unsigned int has_range_table: 1; /* space has $RANGE$ */
  1353. unsigned int has_context_table: 1; /* space has $SRC_CTXT$ */
  1354. unsigned int has_lines_table: 1; /* space contains a $LINES$
  1355. subspace for line tables. */
  1356. unsigned int has_lt_offset_map: 1; /* space contains an lt_offset
  1357. subspace for line table mapping. */
  1358. /* The following fields are the same as those in the PXDB_header in $DEBUG$ */
  1359. int pd_entries; /* # of entries in function look-up table */
  1360. int fd_entries; /* # of entries in file look-up table */
  1361. int md_entries; /* # of entries in module look-up table */
  1362. unsigned int pxdbed : 1; /* 1 => file has been preprocessed */
  1363. unsigned int bighdr : 1; /* 1 => this header contains 'time' word */
  1364. unsigned int sa_header : 1;/* 1 => created by SA version of pxdb */
  1365. /* used for version check in xdb */
  1366. unsigned int inlined: 1; /* one or more functions have been inlined */
  1367. unsigned int spare : 28;
  1368. int globals; /* index into the DNTT where GNTT begins */
  1369. unsigned int time; /* modify time of file before being pxdbed */
  1370. int pg_entries; /* # of entries in label look-up table */
  1371. int functions; /* actual number of functions */
  1372. int files; /* actual number of files */
  1373. int cd_entries; /* # of entries in class look-up table */
  1374. int aa_entries; /* # of entries in addr alias look-up table */
  1375. int oi_entries; /* # of entries in object id look-up table */
  1376. } DOC_info_PXDB_header;
  1377. /* Header version for the case that there is DOC info and the
  1378. executable has NOT been processed by pxdb. */
  1379. typedef struct DOC_info_header_struct
  1380. {
  1381. unsigned int xdb_header: 1; /* bit set if this is post-3.1 xdb */
  1382. unsigned int doc_header: 1; /* bit set if this is doc-style header*/
  1383. unsigned int version: 8; /* version of debug/header
  1384. format. For 10.0 the value
  1385. will be 1. For "Davis" the value is 2. */
  1386. unsigned int reserved_for_flags: 18; /* for future use; -- must be set to zero. */
  1387. unsigned int has_range_table: 1; /* space contains a $RANGE$ subspace for variable ranges. */
  1388. unsigned int has_context_table: 1; /* space contains a $CTXT$ subspace for context/inline table. */
  1389. unsigned int has_lines_table: 1; /* space contains a $LINES$ subspace for line tables. */
  1390. unsigned int has_lt_offset_map: 1; /* space contains an lt_offset subspace for line table mapping. */
  1391. long gntt_length; /* same as old header */
  1392. long lntt_length; /* same as old header */
  1393. long slt_length; /* same as old header */
  1394. long vt_length; /* same as old header */
  1395. long xt_length; /* same as old header */
  1396. long ctxt_length; /* present only if version >= 2 */
  1397. long range_length; /* present only if version >= 2 */
  1398. long expr_length; /* present only if version >= 2 */
  1399. } DOC_info_header;
  1400. typedef union GenericDebugHeader_union
  1401. {
  1402. PXDB_header no_doc;
  1403. DOC_info_PXDB_header doc;
  1404. XDB_header no_pxdb_no_doc;
  1405. DOC_info_header no_pxdb_doc;
  1406. } GenericDebugHeader;
  1407. /* Procedure Descriptor:
  1408. An element of the procedure quick look-up table. */
  1409. typedef struct quick_procedure
  1410. {
  1411. long isym; /* 0-based index of first symbol
  1412. for procedure in $LNTT$,
  1413. i.e. the procedure itself. */
  1414. CORE_ADDR adrStart; /* memory adr of start of proc */
  1415. CORE_ADDR adrEnd; /* memory adr of end of proc */
  1416. char *sbAlias; /* alias name of procedure */
  1417. char *sbProc; /* real name of procedure */
  1418. CORE_ADDR adrBp; /* address of entry breakpoint */
  1419. CORE_ADDR adrExitBp; /* address of exit breakpoint */
  1420. int icd; /* member of this class (index) */
  1421. unsigned int ipd; /* index of template for this */
  1422. /* function (index) */
  1423. unsigned int unused: 5;
  1424. unsigned int no_lt_offset: 1;/* no entry in lt_offset table */
  1425. unsigned int fTemplate: 1; /* function template */
  1426. unsigned int fExpansion: 1; /* function expansion */
  1427. unsigned int linked : 1; /* linked with other expansions */
  1428. unsigned int duplicate: 1; /* clone of another procedure */
  1429. unsigned int overloaded:1; /* overloaded function */
  1430. unsigned int member: 1; /* class member function */
  1431. unsigned int constructor:1; /* constructor function */
  1432. unsigned int destructor:1; /* destructor function */
  1433. unsigned int Static: 1; /* static function */
  1434. unsigned int Virtual: 1; /* virtual function */
  1435. unsigned int constant: 1; /* constant function */
  1436. unsigned int pure: 1; /* pure (virtual) function */
  1437. unsigned int language: 4; /* procedure's language */
  1438. unsigned int inlined: 1; /* function has been inlined */
  1439. unsigned int Operator: 1; /* operator function */
  1440. unsigned int stub: 1; /* bodyless function */
  1441. unsigned int optimize: 2; /* optimization level */
  1442. unsigned int level: 5; /* nesting level (top=0) */
  1443. } quick_procedure_entry, *quick_procedure_entry_ptr;
  1444. /* Source File Descriptor:
  1445. An element of the source file quick look-up table. */
  1446. typedef struct quick_source
  1447. {
  1448. long isym; /* 0-based index in $LNTT$ of
  1449. first symbol for this file. */
  1450. CORE_ADDR adrStart; /* mem adr of start of file's code */
  1451. CORE_ADDR adrEnd; /* mem adr of end of file's code */
  1452. char *sbFile; /* name of source file */
  1453. unsigned int fHasDecl: 1; /* do we have a .d file? */
  1454. unsigned int fWarned: 1; /* have warned about age problems? */
  1455. unsigned int fSrcfile: 1; /* 0 => include 1=> source */
  1456. unsigned short ilnMac; /* lines in file (0 if don't know) */
  1457. int ipd; /* 0-based index of first procedure
  1458. in this file, in the quick
  1459. look-up table of procedures. */
  1460. unsigned int *rgLn; /* line pointer array, if any */
  1461. } quick_file_entry, *quick_file_entry_ptr;
  1462. /* Module Descriptor:
  1463. An element of the module quick reference table. */
  1464. typedef struct quick_module
  1465. {
  1466. long isym; /* 0-based index of first
  1467. symbol for module. */
  1468. CORE_ADDR adrStart; /* adr of start of mod. */
  1469. CORE_ADDR adrEnd; /* adr of end of mod. */
  1470. char *sbAlias; /* alias name of module */
  1471. char *sbMod; /* real name of module */
  1472. unsigned int imports: 1; /* module have any imports? */
  1473. unsigned int vars_in_front: 1; /* module globals in front? */
  1474. unsigned int vars_in_gaps: 1; /* module globals in gaps? */
  1475. unsigned int language: 4; /* type of language */
  1476. unsigned int unused : 25;
  1477. unsigned int unused2; /* space for future stuff */
  1478. } quick_module_entry, *quick_module_entry_ptr;
  1479. /* Auxiliary Procedure Descriptor:
  1480. An element of the auxiliary procedure quick look-up table. */
  1481. typedef struct quick_aux_procedure
  1482. {
  1483. long isym_inln; /* start on inline list for proc */
  1484. long spare;
  1485. } quick_aux_procedure_entry, *quick_aux_procedure_entry_ptr;
  1486. /* Paragraph Descriptor:
  1487. An element of the paragraph quick look-up table. */
  1488. typedef struct quick_paragraph
  1489. {
  1490. long isym; /* first symbol for label (index) */
  1491. CORE_ADDR adrStart; /* memory adr of start of label */
  1492. CORE_ADDR adrEnd; /* memory adr of end of label */
  1493. char *sbLab; /* name of label */
  1494. unsigned int inst; /* Used in xdb to store inst @ bp */
  1495. unsigned int sect: 1; /* true = section, false = parag. */
  1496. unsigned int unused: 31; /* future use */
  1497. } quick_paragraph_entry, *quick_paragraph_entry_ptr;
  1498. /* Class Descriptor:
  1499. An element of the class quick look-up table. */
  1500. typedef struct quick_class
  1501. {
  1502. char *sbClass; /* name of class */
  1503. long isym; /* class symbol (tag) */
  1504. unsigned int type : 2; /* 0=class, 1=union, 2=struct */
  1505. unsigned int fTemplate : 1;/* class template */
  1506. unsigned int expansion : 1;/* template expansion */
  1507. unsigned int unused :28;
  1508. sltpointer lowscope; /* beginning of defined scope */
  1509. sltpointer hiscope; /* end of defined scope */
  1510. } quick_class_entry, *quick_class_entry_ptr;
  1511. /* Address Alias Entry
  1512. An element of the address alias quick look-up table. */
  1513. typedef struct quick_alias
  1514. {
  1515. CORE_ADDR low;
  1516. CORE_ADDR high;
  1517. int index;
  1518. unsigned int unused : 31;
  1519. unsigned int alternate : 1; /* alternate unnamed aliases? */
  1520. } quick_alias_entry, *quick_alias_entry_ptr;
  1521. /* Object Identification Entry
  1522. An element of the object identification quick look-up table. */
  1523. typedef struct quick_obj_ID
  1524. {
  1525. CORE_ADDR obj_ident; /* class identifier */
  1526. long isym; /* class symbol */
  1527. long offset; /* offset to object start */
  1528. } quick_obj_ID_entry, *quick_obj_ID_entry_ptr;
  1529. #endif /* HP_SYMTAB_INCLUDED */