4 |
Written by the Center for Software Science at the University of Utah |
Written by the Center for Software Science at the University of Utah |
5 |
and by Cygnus Support. |
and by Cygnus Support. |
6 |
|
|
7 |
Copyright 1994, 1995, 1998, 1999 Free Software Foundation, Inc. |
Copyright 1994, 1995, 1998, 1999, 2003 Free Software Foundation, Inc. |
8 |
|
|
9 |
This program is free software; you can redistribute it and/or modify |
This program is free software; you can redistribute it and/or modify |
10 |
it under the terms of the GNU General Public License as published by |
it under the terms of the GNU General Public License as published by |
191 |
#define SLTNIL (-1) |
#define SLTNIL (-1) |
192 |
typedef int sltpointer; |
typedef int sltpointer; |
193 |
|
|
194 |
/* Index into DOC (= "Debugging Optimized Code") line table */ |
/* Index into DOC (= "Debugging Optimized Code") line table. */ |
195 |
#define LTNIL (-1) |
#define LTNIL (-1) |
196 |
typedef int ltpointer; |
typedef int ltpointer; |
197 |
|
|
198 |
/* Index into context table */ |
/* Index into context table. */ |
199 |
#define CTXTNIL (-1) |
#define CTXTNIL (-1) |
200 |
typedef int ctxtpointer; |
typedef int ctxtpointer; |
201 |
|
|
371 |
ADDRESS points to an SLT entry from which line number and code locations |
ADDRESS points to an SLT entry from which line number and code locations |
372 |
may be determined. |
may be determined. |
373 |
|
|
374 |
ENTRYADDR is the memory address corresponding the the function's entry point |
ENTRYADDR is the memory address corresponding the function's entry point |
375 |
|
|
376 |
RETVAL points to a LNTT entry describing the function's return value. |
RETVAL points to a LNTT entry describing the function's return value. |
377 |
|
|
633 |
{ |
{ |
634 |
unsigned int extension: 1; |
unsigned int extension: 1; |
635 |
unsigned int kind: 10; /* DNTT_TYPE_TYPEDEF or |
unsigned int kind: 10; /* DNTT_TYPE_TYPEDEF or |
636 |
DNTT_TYPE_TAGDEF |
DNTT_TYPE_TAGDEF. */ |
|
*/ |
|
637 |
unsigned int global: 1; |
unsigned int global: 1; |
638 |
unsigned int typeinfo: 1; |
unsigned int typeinfo: 1; |
639 |
unsigned int unused: 19; |
unsigned int unused: 19; |
640 |
vtpointer name; |
vtpointer name; |
641 |
dnttpointer type; /* Underlying type, which for TAGDEF's may be |
dnttpointer type; /* Underlying type, which for TAGDEF's may be |
642 |
* DNTT_TYPE_STRUCT, DNTT_TYPE_UNION, |
DNTT_TYPE_STRUCT, DNTT_TYPE_UNION, |
643 |
* DNTT_TYPE_ENUM, or DNTT_TYPE_CLASS. |
DNTT_TYPE_ENUM, or DNTT_TYPE_CLASS. |
644 |
* For TYPEDEF's other underlying types |
For TYPEDEF's other underlying types |
645 |
* are also possible. |
are also possible. */ |
|
*/ |
|
646 |
}; |
}; |
647 |
|
|
648 |
/* DNTT_TYPE_POINTER: |
/* DNTT_TYPE_POINTER: |
735 |
|
|
736 |
00 for a constant lower bound (found in LOWBOUND). |
00 for a constant lower bound (found in LOWBOUND). |
737 |
|
|
738 |
01 for a dynamic lower bound with the lower bound found in the the |
01 for a dynamic lower bound with the lower bound found in the |
739 |
memory address pointed to by LOWBOUND. |
memory address pointed to by LOWBOUND. |
740 |
|
|
741 |
10 for a dynamic lower bound described by an variable found in the |
10 for a dynamic lower bound described by an variable found in the |
932 |
infers the "with" semantics when it sees a "this" argument to the member |
infers the "with" semantics when it sees a "this" argument to the member |
933 |
function. So GDB can safely ignore the DNTT_TYPE_WITH record. |
function. So GDB can safely ignore the DNTT_TYPE_WITH record. |
934 |
|
|
935 |
A DNTT_TYPE_WITH has a matching DNTT_TYPE_END symbol |
A DNTT_TYPE_WITH has a matching DNTT_TYPE_END symbol. */ |
|
*/ |
|
936 |
|
|
937 |
struct dntt_type_with { |
struct dntt_type_with |
938 |
|
{ |
939 |
unsigned int extension: 1; /* always zero */ |
unsigned int extension: 1; /* always zero */ |
940 |
unsigned int kind: 10; /* always DNTT_TYPE_WITH */ |
unsigned int kind: 10; /* always DNTT_TYPE_WITH */ |
941 |
unsigned int addrtype: 2; /* 0 => STATTYPE */ |
unsigned int addrtype: 2; /* 0 => STATTYPE */ |
992 |
CLASS_SCOPE is what is used to indicate it is really a method. |
CLASS_SCOPE is what is used to indicate it is really a method. |
993 |
|
|
994 |
|
|
995 |
A DNTT_TYPE_CLASS_SCOPE symbol must have a matching DNTT_TYPE_END symbol |
A DNTT_TYPE_CLASS_SCOPE symbol must have a matching DNTT_TYPE_END symbol. */ |
|
*/ |
|
996 |
|
|
997 |
struct dntt_type_class_scope { |
struct dntt_type_class_scope |
998 |
unsigned int extension: 1; /* always zero */ |
{ |
999 |
unsigned int kind: 10; /* always DNTT_TYPE_CLASS_SCOPE */ |
unsigned int extension: 1; /* Always zero. */ |
1000 |
|
unsigned int kind: 10; /* Always DNTT_TYPE_CLASS_SCOPE. */ |
1001 |
unsigned int unused: 21; |
unsigned int unused: 21; |
1002 |
sltpointer address ; /* pointer to SLT entry */ |
sltpointer address ; /* Pointer to SLT entry. */ |
1003 |
dnttpointer type ; /* pointer to class type DNTT */ |
dnttpointer type ; /* Pointer to class type DNTT. */ |
1004 |
}; |
}; |
1005 |
|
|
1006 |
/* C++ reference parameter. |
/* C++ reference parameter. |
1007 |
The structure of this record is the same as DNTT_TYPE_POINTER - |
The structure of this record is the same as DNTT_TYPE_POINTER - |
1008 |
refer to struct dntt_type_pointer. |
refer to struct dntt_type_pointer. */ |
|
*/ |
|
1009 |
|
|
1010 |
/* The next two describe C++ pointer-to-data-member type, and |
/* The next two describe C++ pointer-to-data-member type, and |
1011 |
pointer-to-member-function type, respectively. |
pointer-to-member-function type, respectively. |
1012 |
DNTT_TYPE_PTRMEM and DNTT_TYPE_PTRMEMFUNC have the same structure |
DNTT_TYPE_PTRMEM and DNTT_TYPE_PTRMEMFUNC have the same structure. */ |
|
*/ |
|
1013 |
|
|
1014 |
struct dntt_type_ptrmem { |
struct dntt_type_ptrmem |
1015 |
unsigned int extension: 1; /* always zero */ |
{ |
1016 |
unsigned int kind: 10; /* always DNTT_TYPE_PTRMEM */ |
unsigned int extension: 1; /* Always zero. */ |
1017 |
|
unsigned int kind: 10; /* Always DNTT_TYPE_PTRMEM. */ |
1018 |
unsigned int unused: 21; |
unsigned int unused: 21; |
1019 |
dnttpointer pointsto ; /* pointer to class DNTT */ |
dnttpointer pointsto ; /* Pointer to class DNTT. */ |
1020 |
dnttpointer memtype ; /* type of member */ |
dnttpointer memtype ; /* Type of member. */ |
1021 |
}; |
}; |
1022 |
|
|
1023 |
struct dntt_type_ptrmemfunc { |
struct dntt_type_ptrmemfunc |
1024 |
unsigned int extension: 1; /* always zero */ |
{ |
1025 |
unsigned int kind: 10; /* always DNTT_TYPE_PTRMEMFUNC */ |
unsigned int extension: 1; /* Always zero. */ |
1026 |
|
unsigned int kind: 10; /* Always DNTT_TYPE_PTRMEMFUNC. */ |
1027 |
unsigned int unused: 21; |
unsigned int unused: 21; |
1028 |
dnttpointer pointsto ; /* pointer to class DNTT */ |
dnttpointer pointsto ; /* Pointer to class DNTT. */ |
1029 |
dnttpointer memtype ; /* type of member */ |
dnttpointer memtype ; /* Type of member. */ |
1030 |
}; |
}; |
1031 |
|
|
1032 |
/* The DNTT_TYPE_CLASS symbol is emitted to describe a class type. |
/* The DNTT_TYPE_CLASS symbol is emitted to describe a class type. |
1033 |
* "memberlist" points to a chained list of FIELD or GENFIELD records |
"memberlist" points to a chained list of FIELD or GENFIELD records |
1034 |
* indicating the class members. "parentlist" points to a chained list |
indicating the class members. "parentlist" points to a chained list |
1035 |
* of INHERITANCE records indicating classes from which we inherit |
of INHERITANCE records indicating classes from which we inherit |
1036 |
* fields. |
fields. */ |
|
*/ |
|
1037 |
|
|
1038 |
struct dntt_type_class |
struct dntt_type_class |
1039 |
{ |
{ |
1040 |
unsigned int extension: 1; /* always 0 */ |
unsigned int extension: 1; /* Always zero. */ |
1041 |
unsigned int kind: 10; /* always DNTT_TYPE_CLASS */ |
unsigned int kind: 10; /* Always DNTT_TYPE_CLASS. */ |
1042 |
unsigned int abstract: 1; /* is this an abstract class? */ |
unsigned int abstract: 1; /* Is this an abstract class? */ |
1043 |
unsigned int class_decl: 2; /* 0=class,1=union,2=struct */ |
unsigned int class_decl: 2; /* 0=class,1=union,2=struct. */ |
1044 |
unsigned int expansion: 1; /* 1=template expansion */ |
unsigned int expansion: 1; /* 1=template expansion. */ |
1045 |
unsigned int unused: 17; |
unsigned int unused: 17; |
1046 |
dnttpointer memberlist ; /* ptr to chain of [GEN]FIELDs */ |
dnttpointer memberlist ; /* Ptr to chain of [GEN]FIELDs. */ |
1047 |
unsigned long vtbl_loc ; /* offset in obj of ptr to vtbl */ |
unsigned long vtbl_loc ; /* Offset in obj of ptr to vtbl. */ |
1048 |
dnttpointer parentlist ; /* ptr to K_INHERITANCE list */ |
dnttpointer parentlist ; /* Ptr to K_INHERITANCE list. */ |
1049 |
unsigned long bitlength ; /* total at this level */ |
unsigned long bitlength ; /* Total at this level. */ |
1050 |
dnttpointer identlist ; /* ptr to chain of class ident's */ |
dnttpointer identlist ; /* Ptr to chain of class ident's. */ |
1051 |
dnttpointer friendlist ; /* ptr to K_FRIEND list */ |
dnttpointer friendlist ; /* Ptr to K_FRIEND list. */ |
1052 |
dnttpointer templateptr ; /* ptr to template */ |
dnttpointer templateptr ; /* Ptr to template. */ |
1053 |
dnttpointer nextexp ; /* ptr to next expansion */ |
dnttpointer nextexp ; /* Ptr to next expansion. */ |
1054 |
}; |
}; |
1055 |
|
|
1056 |
/* Class members are indicated via either the FIELD record (for |
/* Class members are indicated via either the FIELD record (for |
1057 |
data members, same as for C struct fields), or by the GENFIELD record |
data members, same as for C struct fields), or by the GENFIELD record |
1058 |
(for member functions). |
(for member functions). */ |
|
*/ |
|
1059 |
|
|
1060 |
struct dntt_type_genfield { |
struct dntt_type_genfield |
1061 |
unsigned int extension: 1; /* always zero */ |
{ |
1062 |
unsigned int kind: 10; /* always DNTT_TYPE_GENFIELD */ |
unsigned int extension: 1; /* Always zero. */ |
1063 |
unsigned int visibility: 2; /* pub = 0, prot = 1, priv = 2 */ |
unsigned int kind: 10; /* Always DNTT_TYPE_GENFIELD. */ |
1064 |
unsigned int a_union: 1; /* 1 => anonymous union member */ |
unsigned int visibility: 2; /* Pub = 0, prot = 1, priv = 2. */ |
1065 |
|
unsigned int a_union: 1; /* 1 => anonymous union member. */ |
1066 |
unsigned int unused: 18; |
unsigned int unused: 18; |
1067 |
dnttpointer field ; /* pointer to field or qualifier */ |
dnttpointer field ; /* Pointer to field or qualifier. */ |
1068 |
dnttpointer nextfield ; /* pointer to next field */ |
dnttpointer nextfield ; /* Pointer to next field. */ |
1069 |
}; |
}; |
1070 |
|
|
1071 |
/* C++ virtual functions */ |
/* C++ virtual functions. */ |
1072 |
|
|
1073 |
struct dntt_type_vfunc { |
struct dntt_type_vfunc |
1074 |
|
{ |
1075 |
unsigned int extension: 1; /* always zero */ |
unsigned int extension: 1; /* always zero */ |
1076 |
unsigned int kind: 10; /* always DNTT_TYPE_VFUNC */ |
unsigned int kind: 10; /* always DNTT_TYPE_VFUNC */ |
1077 |
unsigned int pure: 1; /* pure virtual function ? */ |
unsigned int pure: 1; /* pure virtual function ? */ |
1080 |
unsigned long vtbl_offset ; /* offset into vtbl for virtual */ |
unsigned long vtbl_offset ; /* offset into vtbl for virtual */ |
1081 |
}; |
}; |
1082 |
|
|
1083 |
/* Not precisely sure what this is intended for - DDE ignores it */ |
/* Not precisely sure what this is intended for - DDE ignores it. */ |
1084 |
|
|
1085 |
struct dntt_type_memaccess { |
struct dntt_type_memaccess |
1086 |
|
{ |
1087 |
unsigned int extension: 1; /* always zero */ |
unsigned int extension: 1; /* always zero */ |
1088 |
unsigned int kind: 10; /* always DNTT_TYPE_MEMACCESS */ |
unsigned int kind: 10; /* always DNTT_TYPE_MEMACCESS */ |
1089 |
unsigned int unused: 21; |
unsigned int unused: 21; |
1092 |
}; |
}; |
1093 |
|
|
1094 |
/* The DNTT_TYPE_INHERITANCE record describes derived classes. |
/* The DNTT_TYPE_INHERITANCE record describes derived classes. |
1095 |
* In particular, the "parentlist" field of the CLASS record points |
In particular, the "parentlist" field of the CLASS record points |
1096 |
* to a list of INHERITANCE records for classes from which we |
to a list of INHERITANCE records for classes from which we |
1097 |
* inherit members. |
inherit members. */ |
|
*/ |
|
1098 |
|
|
1099 |
struct dntt_type_inheritance { |
struct dntt_type_inheritance |
1100 |
|
{ |
1101 |
unsigned int extension: 1; /* always zero */ |
unsigned int extension: 1; /* always zero */ |
1102 |
unsigned int kind: 10; /* always DNTT_TYPE_INHERITANCE */ |
unsigned int kind: 10; /* always DNTT_TYPE_INHERITANCE */ |
1103 |
unsigned int Virtual: 1; /* virtual base class ? */ |
unsigned int Virtual: 1; /* virtual base class ? */ |
1111 |
|
|
1112 |
/* C++ "friend" classes ... */ |
/* C++ "friend" classes ... */ |
1113 |
|
|
1114 |
struct dntt_type_friend_class { |
struct dntt_type_friend_class |
1115 |
|
{ |
1116 |
unsigned int extension: 1; /* always zero */ |
unsigned int extension: 1; /* always zero */ |
1117 |
unsigned int kind: 10; /* always DNTT_TYPE_FRIEND_CLASS */ |
unsigned int kind: 10; /* always DNTT_TYPE_FRIEND_CLASS */ |
1118 |
unsigned int unused: 21; |
unsigned int unused: 21; |
1120 |
dnttpointer next ; /* next DNTT_FRIEND */ |
dnttpointer next ; /* next DNTT_FRIEND */ |
1121 |
}; |
}; |
1122 |
|
|
1123 |
struct dntt_type_friend_func { |
struct dntt_type_friend_func |
1124 |
|
{ |
1125 |
unsigned int extension: 1; /* always zero */ |
unsigned int extension: 1; /* always zero */ |
1126 |
unsigned int kind: 10; /* always DNTT_TYPE_FRIEND_FUNC */ |
unsigned int kind: 10; /* always DNTT_TYPE_FRIEND_FUNC */ |
1127 |
unsigned int unused: 21; |
unsigned int unused: 21; |
1132 |
}; |
}; |
1133 |
|
|
1134 |
/* DDE appears to ignore the DNTT_TYPE_MODIFIER record. |
/* DDE appears to ignore the DNTT_TYPE_MODIFIER record. |
1135 |
* It could perhaps be used to give better "ptype" output in GDB; |
It could perhaps be used to give better "ptype" output in GDB; |
1136 |
* otherwise it is probably safe for GDB to ignore it also. |
otherwise it is probably safe for GDB to ignore it also. */ |
|
*/ |
|
1137 |
|
|
1138 |
struct dntt_type_modifier { |
struct dntt_type_modifier |
1139 |
|
{ |
1140 |
unsigned int extension: 1; /* always zero */ |
unsigned int extension: 1; /* always zero */ |
1141 |
unsigned int kind: 10; /* always DNTT_TYPE_MODIFIER */ |
unsigned int kind: 10; /* always DNTT_TYPE_MODIFIER */ |
1142 |
unsigned int m_const: 1; /* const */ |
unsigned int m_const: 1; /* const */ |
1149 |
unsigned long future ; /* padding to 3-word block end */ |
unsigned long future ; /* padding to 3-word block end */ |
1150 |
}; |
}; |
1151 |
|
|
1152 |
/* I'm not sure what this was intended for - DDE ignores it */ |
/* I'm not sure what this was intended for - DDE ignores it. */ |
1153 |
|
|
1154 |
struct dntt_type_object_id { |
struct dntt_type_object_id |
1155 |
|
{ |
1156 |
unsigned int extension: 1; /* always zero */ |
unsigned int extension: 1; /* always zero */ |
1157 |
unsigned int kind: 10; /* always DNTT_TYPE_OBJECT_ID */ |
unsigned int kind: 10; /* always DNTT_TYPE_OBJECT_ID */ |
1158 |
unsigned int indirect: 1; /* Is object_ident addr of addr? */ |
unsigned int indirect: 1; /* Is object_ident addr of addr? */ |
1167 |
/* No separate dntt_type_memfunc; same as dntt_type_func */ |
/* No separate dntt_type_memfunc; same as dntt_type_func */ |
1168 |
|
|
1169 |
/* Symbol records to support templates. These only get used |
/* Symbol records to support templates. These only get used |
1170 |
* in DDE's "describe" output (like GDB's "ptype"). |
in DDE's "describe" output (like GDB's "ptype"). */ |
|
*/ |
|
1171 |
|
|
1172 |
/* The TEMPLATE record is the header for a template-class. |
/* The TEMPLATE record is the header for a template-class. |
1173 |
* Like the CLASS record, a TEMPLATE record has a memberlist that |
Like the CLASS record, a TEMPLATE record has a memberlist that |
1174 |
* points to a list of template members. It also has an arglist |
points to a list of template members. It also has an arglist |
1175 |
* pointing to a list of TEMPLATE_ARG records. |
pointing to a list of TEMPLATE_ARG records. */ |
|
*/ |
|
1176 |
|
|
1177 |
struct dntt_type_template { |
struct dntt_type_template |
1178 |
|
{ |
1179 |
unsigned int extension: 1; /* always zero */ |
unsigned int extension: 1; /* always zero */ |
1180 |
unsigned int kind: 10; /* always DNTT_TYPE_TEMPLATE */ |
unsigned int kind: 10; /* always DNTT_TYPE_TEMPLATE */ |
1181 |
unsigned int abstract: 1; /* is this an abstract class? */ |
unsigned int abstract: 1; /* is this an abstract class? */ |
1192 |
}; |
}; |
1193 |
|
|
1194 |
/* Template-class arguments are a list of TEMPL_ARG records |
/* Template-class arguments are a list of TEMPL_ARG records |
1195 |
* chained together. The "name" field is the name of the formal. |
chained together. The "name" field is the name of the formal. |
1196 |
* E.g.: |
E.g.: |
1197 |
* template <class T> class q { ... }; |
|
1198 |
* Then "T" is the name of the formal argument. |
template <class T> class q { ... }; |
1199 |
*/ |
|
1200 |
struct dntt_type_templ_arg { |
Then "T" is the name of the formal argument. */ |
1201 |
|
|
1202 |
|
struct dntt_type_templ_arg |
1203 |
|
{ |
1204 |
unsigned int extension: 1; /* always zero */ |
unsigned int extension: 1; /* always zero */ |
1205 |
unsigned int kind: 10; /* always DNTT_TYPE_TEMPL_ARG */ |
unsigned int kind: 10; /* always DNTT_TYPE_TEMPL_ARG */ |
1206 |
unsigned int usagetype: 1; /* 0 type-name 1 expression */ |
unsigned int usagetype: 1; /* 0 type-name 1 expression */ |
1212 |
}; |
}; |
1213 |
|
|
1214 |
/* FUNC_TEMPLATE records are sort of like FUNCTION, but are emitted |
/* FUNC_TEMPLATE records are sort of like FUNCTION, but are emitted |
1215 |
* for template member functions. E.g., |
for template member functions. E.g., |
1216 |
* template <class T> class q { |
|
1217 |
... |
template <class T> class q |
1218 |
void f(); |
{ |
1219 |
... |
... |
1220 |
}; |
void f(); |
1221 |
* Within the list of FIELDs/GENFIELDs defining the member list |
... |
1222 |
* of the template "q", "f" would appear as a FUNC_TEMPLATE. |
}; |
1223 |
* We'll also see instances of FUNCTION "f" records for each |
|
1224 |
* instantiation of the template. |
Within the list of FIELDs/GENFIELDs defining the member list |
1225 |
*/ |
of the template "q", "f" would appear as a FUNC_TEMPLATE. |
1226 |
|
We'll also see instances of FUNCTION "f" records for each |
1227 |
|
instantiation of the template. */ |
1228 |
|
|
1229 |
struct dntt_type_func_template { |
struct dntt_type_func_template |
1230 |
|
{ |
1231 |
unsigned int extension: 1; /* always zero */ |
unsigned int extension: 1; /* always zero */ |
1232 |
unsigned int kind: 10; /* always DNTT_TYPE_FUNC_TEMPLATE */ |
unsigned int kind: 10; /* always DNTT_TYPE_FUNC_TEMPLATE */ |
1233 |
unsigned int public: 1; /* 1 => globally visible */ |
unsigned int public: 1; /* 1 => globally visible */ |
1247 |
}; |
}; |
1248 |
|
|
1249 |
/* LINK is apparently intended to link together function template |
/* LINK is apparently intended to link together function template |
1250 |
* definitions with their instantiations. However, it is not clear |
definitions with their instantiations. However, it is not clear |
1251 |
* why this would be needed, except to provide the information on |
why this would be needed, except to provide the information on |
1252 |
* a "ptype" command. And as far as I can tell, aCC does not |
a "ptype" command. And as far as I can tell, aCC does not |
1253 |
* generate this record. |
generate this record. */ |
|
*/ |
|
1254 |
|
|
1255 |
struct dntt_type_link { |
struct dntt_type_link |
1256 |
|
{ |
1257 |
unsigned int extension: 1; /* always zero */ |
unsigned int extension: 1; /* always zero */ |
1258 |
unsigned int kind: 10; /* always DNTT_TYPE_LINK */ |
unsigned int kind: 10; /* always DNTT_TYPE_LINK */ |
1259 |
unsigned int linkKind: 4; /* always LINK_UNKNOWN */ |
unsigned int linkKind: 4; /* always LINK_UNKNOWN */ |
1264 |
long future[2] ; /* padding to 3-word block end */ |
long future[2] ; /* padding to 3-word block end */ |
1265 |
}; |
}; |
1266 |
|
|
1267 |
/* end of C++ specific SOM's */ |
/* end of C++ specific SOM's. */ |
1268 |
|
|
1269 |
/* DNTT_TYPE_DYN_ARRAY_DESC is unused by GDB */ |
/* DNTT_TYPE_DYN_ARRAY_DESC is unused by GDB */ |
1270 |
/* DNTT_TYPE_DESC_SUBRANGE is unused by GDB */ |
/* DNTT_TYPE_DESC_SUBRANGE is unused by GDB */ |
1273 |
/* DNTT_TYPE_INLN_LIST is unused by GDB */ |
/* DNTT_TYPE_INLN_LIST is unused by GDB */ |
1274 |
/* DNTT_TYPE_ALIAS is unused by GDB */ |
/* DNTT_TYPE_ALIAS is unused by GDB */ |
1275 |
|
|
1276 |
struct dntt_type_doc_function { |
struct dntt_type_doc_function |
1277 |
|
{ |
1278 |
unsigned int extension: 1; /* always zero */ |
unsigned int extension: 1; /* always zero */ |
1279 |
unsigned int kind: 10; /* K_DOC_FUNCTION or */ |
unsigned int kind: 10; /* K_DOC_FUNCTION or */ |
1280 |
/* K_DOC_MEMFUNC */ |
/* K_DOC_MEMFUNC */ |
1319 |
}; |
}; |
1320 |
|
|
1321 |
/* One entry in a DNTT (either the LNTT or GNTT). |
/* One entry in a DNTT (either the LNTT or GNTT). |
1322 |
* This is a union of the above 60 or so structure definitions. |
This is a union of the above 60 or so structure definitions. */ |
1323 |
*/ |
|
1324 |
union dnttentry |
union dnttentry |
1325 |
{ |
{ |
1326 |
struct dntt_type_srcfile dsfile; |
struct dntt_type_srcfile dsfile; |
1446 |
struct slt_generic sgeneric; |
struct slt_generic sgeneric; |
1447 |
}; |
}; |
1448 |
|
|
1449 |
/* $LINES$ declarations |
/* $LINES$ declarations |
1450 |
* This is the line table used for optimized code, which is only present |
This is the line table used for optimized code, which is only present |
1451 |
* in the new $PROGRAM_INFO$ debug space. |
in the new $PROGRAM_INFO$ debug space. */ |
|
*/ |
|
1452 |
|
|
1453 |
#define DST_LN_ESCAPE_FLAG1 15 |
#define DST_LN_ESCAPE_FLAG1 15 |
1454 |
#define DST_LN_ESCAPE_FLAG2 14 |
#define DST_LN_ESCAPE_FLAG2 14 |
1455 |
#define DST_LN_CTX_SPEC1 13 |
#define DST_LN_CTX_SPEC1 13 |
1456 |
#define DST_LN_CTX_SPEC2 12 |
#define DST_LN_CTX_SPEC2 12 |
1457 |
|
|
1458 |
/* |
/* Escape function codes: */ |
1459 |
Escape function codes: |
|
|
*/ |
|
1460 |
typedef enum |
typedef enum |
1461 |
{ |
{ |
1462 |
dst_ln_pad, /* pad byte */ |
dst_ln_pad, /* pad byte */ |
1463 |
dst_ln_escape_1, /* reserved */ |
dst_ln_escape_1, /* reserved */ |
1464 |
dst_ln_dpc1_dln1, /* 1 byte line delta, 1 byte pc delta */ |
dst_ln_dpc1_dln1, /* 1 byte line delta, 1 byte pc delta */ |
1465 |
dst_ln_dpc2_dln2, /* 2 bytes line delta, 2 bytes pc delta */ |
dst_ln_dpc2_dln2, /* 2 bytes line delta, 2 bytes pc delta */ |
1466 |
dst_ln_pc4_ln4, /* 4 bytes ABSOLUTE line number, 4 bytes ABSOLUTE pc */ |
dst_ln_pc4_ln4, /* 4 bytes ABSOLUTE line number, 4 bytes ABSOLUTE pc */ |
1467 |
dst_ln_dpc0_dln1, /* 1 byte line delta, pc delta = 0 */ |
dst_ln_dpc0_dln1, /* 1 byte line delta, pc delta = 0 */ |
1468 |
dst_ln_ln_off_1, /* statement escape, stmt # = 1 (2nd stmt on line) */ |
dst_ln_ln_off_1, /* statement escape, stmt # = 1 (2nd stmt on line) */ |
1469 |
dst_ln_ln_off, /* statement escape, stmt # = next byte */ |
dst_ln_ln_off, /* statement escape, stmt # = next byte */ |
1470 |
dst_ln_entry, /* entry escape, next byte is entry number */ |
dst_ln_entry, /* entry escape, next byte is entry number */ |
1471 |
dst_ln_exit, /* exit escape */ |
dst_ln_exit, /* exit escape */ |
1472 |
dst_ln_stmt_end, /* gap escape, 4 bytes pc delta */ |
dst_ln_stmt_end, /* gap escape, 4 bytes pc delta */ |
1473 |
dst_ln_stmt_cp, /* current stmt is a critical point */ |
dst_ln_stmt_cp, /* current stmt is a critical point */ |
1474 |
dst_ln_escape_12, /* reserved */ |
dst_ln_escape_12, /* reserved */ |
1475 |
dst_ln_escape_13, /* this is an exception site record */ |
dst_ln_escape_13, /* this is an exception site record */ |
1476 |
dst_ln_nxt_byte, /* next byte contains the real escape code */ |
dst_ln_nxt_byte, /* next byte contains the real escape code */ |
1477 |
dst_ln_end, /* end escape, final entry follows */ |
dst_ln_end, /* end escape, final entry follows */ |
1478 |
dst_ln_escape1_END_OF_ENUM |
dst_ln_escape1_END_OF_ENUM |
1479 |
} |
} |
1480 |
dst_ln_escape1_t; |
dst_ln_escape1_t; |
1481 |
|
|
1482 |
typedef enum |
typedef enum |
1483 |
{ |
{ |
1484 |
dst_ln_ctx_1, /* next byte describes context switch with 5-bit */ |
dst_ln_ctx_1, /* next byte describes context switch with 5-bit */ |
1485 |
/* index into the image table and 3-bit run length. */ |
/* index into the image table and 3-bit run length. */ |
1486 |
/* If run length is 0, end with another cxt specifier or ctx_end */ |
/* If run length is 0, end with another cxt specifier or ctx_end */ |
1487 |
dst_ln_ctx_2, /* next 2 bytes switch context: 13 bit index, 3 bit run length */ |
dst_ln_ctx_2, /* next 2 bytes switch context: 13 bit index, 3 bit run length */ |
1488 |
dst_ln_ctx_4, /* next 4 bytes switch context: 29 bit index, 3 bit run length */ |
dst_ln_ctx_4, /* next 4 bytes switch context: 29 bit index, 3 bit run length */ |
1489 |
dst_ln_ctx_end, /* end current context */ |
dst_ln_ctx_end, /* end current context */ |
1490 |
dst_ln_col_run_1, /* next byte is column position of start of next statement, */ |
dst_ln_col_run_1, /* next byte is column position of start of next statement, */ |
1491 |
/* following byte is length of statement */ |
/* following byte is length of statement */ |
1492 |
dst_ln_col_run_2, /* next 2 bytes is column position of start of next statement, */ |
dst_ln_col_run_2, /* next 2 bytes is column position of start of next statement, */ |
1493 |
/* following 2 bytes is length of statement */ |
/* following 2 bytes is length of statement */ |
1494 |
dst_ln_init_base1, /* next 4 bytes are absolute PC, followed by 1 byte of line number */ |
dst_ln_init_base1, /* next 4 bytes are absolute PC, followed by 1 byte of line number */ |
1495 |
dst_ln_init_base2, /* next 4 bytes are absolute PC, followed by 2 bytes of line number */ |
dst_ln_init_base2, /* next 4 bytes are absolute PC, followed by 2 bytes of line number */ |
1496 |
dst_ln_init_base3, /* next 4 bytes are absolute PC, followed by 3 bytes of line number */ |
dst_ln_init_base3, /* next 4 bytes are absolute PC, followed by 3 bytes of line number */ |
1497 |
dst_ln_escape2_END_OF_ENUM |
dst_ln_escape2_END_OF_ENUM |
1498 |
} |
} |
1499 |
dst_ln_escape2_t; |
dst_ln_escape2_t; |
1500 |
|
|
1501 |
typedef union |
typedef union |
1502 |
{ |
{ |
1503 |
struct |
struct |
1504 |
{ |
{ |
1505 |
unsigned int pc_delta : 4; /* 4 bit pc delta */ |
unsigned int pc_delta : 4; /* 4 bit pc delta */ |
1506 |
int ln_delta : 4; /* 4 bit line number delta */ |
int ln_delta : 4; /* 4 bit line number delta */ |
1507 |
} |
} |
1508 |
delta; |
delta; |
1509 |
|
|
1510 |
struct |
struct |
1511 |
{ |
{ |
1512 |
unsigned int esc_flag : 4; /* alias for pc_delta */ |
unsigned int esc_flag : 4; /* alias for pc_delta */ |
1513 |
unsigned int esc_code : 4; /* escape function code (dst_ln_escape1_t, or ...2_t */ |
unsigned int esc_code : 4; /* escape function code (dst_ln_escape1_t, or ...2_t */ |
1514 |
} |
} |
1515 |
esc; |
esc; |
1516 |
|
|
1517 |
struct |
struct |
1518 |
{ |
{ |
1519 |
unsigned int esc_flag : 4; /* dst_ln_ctx_spec1, or dst_ln_ctx_spec2 */ |
unsigned int esc_flag : 4; /* dst_ln_ctx_spec1, or dst_ln_ctx_spec2 */ |
1520 |
unsigned int run_length : 2; |
unsigned int run_length : 2; |
1521 |
unsigned int ctx_index : 2; /* ...spec2 contains index; ...spec1, index - 4 */ |
unsigned int ctx_index : 2; /* ...spec2 contains index; ...spec1, index - 4 */ |
1522 |
} |
} |
1523 |
ctx_spec; |
ctx_spec; |
1524 |
|
|
1525 |
char sdata; /* signed data byte */ |
char sdata; /* signed data byte */ |
1526 |
unsigned char udata; /* unsigned data byte */ |
unsigned char udata; /* unsigned data byte */ |
1527 |
} |
} |
1528 |
dst_ln_entry_t, |
dst_ln_entry_t, |
1529 |
*dst_ln_entry_ptr_t; |
* dst_ln_entry_ptr_t; |
1530 |
|
|
1531 |
/* Warning: although the above union occupies only 1 byte the compiler treats |
/* Warning: although the above union occupies only 1 byte the compiler treats |
1532 |
* it as having size 2 (the minimum size of a struct). Therefore a sequence of |
it as having size 2 (the minimum size of a struct). Therefore a sequence of |
1533 |
* dst_ln_entry_t's cannot be described as an array, and walking through such a |
dst_ln_entry_t's cannot be described as an array, and walking through such a |
1534 |
* sequence requires convoluted code such as |
sequence requires convoluted code such as |
1535 |
* ln_ptr = (dst_ln_entry_ptr_t) (char*) ln_ptr + 1 |
ln_ptr = (dst_ln_entry_ptr_t) (char*) ln_ptr + 1 |
1536 |
* We regret the inconvenience. */ |
We regret the inconvenience. */ |
1537 |
|
|
1538 |
/* Structure for interpreting the byte following a dst_ln_ctx1 entry */ |
/* Structure for interpreting the byte following a dst_ln_ctx1 entry. */ |
1539 |
typedef struct { |
typedef struct |
1540 |
unsigned int ctx1_index : 5; /* 5 bit index into context table */ |
{ |
1541 |
unsigned int ctx1_run_length : 3; /* 3 bit run length */ |
unsigned int ctx1_index : 5; /* 5 bit index into context table */ |
1542 |
|
unsigned int ctx1_run_length : 3; /* 3 bit run length */ |
1543 |
} dst_ln_ctx1_t, |
} dst_ln_ctx1_t, |
1544 |
*dst_ln_ctx1_ptr_t; |
*dst_ln_ctx1_ptr_t; |
1545 |
|
|
1546 |
/* Structure for interpreting the bytes following a dst_ln_ctx2 entry */ |
/* Structure for interpreting the bytes following a dst_ln_ctx2 entry. */ |
1547 |
typedef struct { |
typedef struct |
1548 |
unsigned int ctx2_index : 13; /* 13 bit index into context table */ |
{ |
1549 |
unsigned int ctx2_run_length : 3; /* 3 bit run length */ |
unsigned int ctx2_index : 13; /* 13 bit index into context table */ |
1550 |
|
unsigned int ctx2_run_length : 3; /* 3 bit run length */ |
1551 |
} dst_ln_ctx2_t, |
} dst_ln_ctx2_t, |
1552 |
*dst_ln_ctx2_ptr_t; |
*dst_ln_ctx2_ptr_t; |
1553 |
|
|
1554 |
/* Structure for interpreting the bytes following a dst_ln_ctx4 entry */ |
/* Structure for interpreting the bytes following a dst_ln_ctx4 entry. */ |
1555 |
typedef struct { |
typedef struct |
1556 |
unsigned int ctx4_index : 29; /* 29 bit index into context table */ |
{ |
1557 |
unsigned int ctx4_run_length : 3; /* 3 bit run length */ |
unsigned int ctx4_index : 29; /* 29 bit index into context table */ |
1558 |
|
unsigned int ctx4_run_length : 3; /* 3 bit run length */ |
1559 |
} dst_ln_ctx4_t, |
} dst_ln_ctx4_t, |
1560 |
*dst_ln_ctx4_ptr_t; |
*dst_ln_ctx4_ptr_t; |
1561 |
|
|
1562 |
|
|
1563 |
/* PXDB definitions. |
/* PXDB definitions. |
1564 |
* |
|
1565 |
* PXDB is a post-processor which takes the executable file |
PXDB is a post-processor which takes the executable file |
1566 |
* and massages the debug information so that the debugger may |
and massages the debug information so that the debugger may |
1567 |
* start up and run more efficiently. Some of the tasks |
start up and run more efficiently. Some of the tasks |
1568 |
* performed by PXDB are: |
performed by PXDB are: |
1569 |
* |
|
1570 |
* o Remove duplicate global type and variable information |
o Remove duplicate global type and variable information |
1571 |
* from the GNTT, |
from the GNTT, |
1572 |
* |
|
1573 |
* o Append the GNTT onto the end of the LNTT and place both |
o Append the GNTT onto the end of the LNTT and place both |
1574 |
* back in the LNTT section, |
back in the LNTT section, |
1575 |
* |
|
1576 |
* o Build quick look-up tables (description follows) for |
o Build quick look-up tables (description follows) for |
1577 |
* files, procedures, modules, and paragraphs (for Cobol), |
files, procedures, modules, and paragraphs (for Cobol), |
1578 |
* placing these in the GNTT section, |
placing these in the GNTT section, |
1579 |
* |
|
1580 |
* o Reconstruct the header appearing in the header section |
o Reconstruct the header appearing in the header section |
1581 |
* to access this information. |
to access this information. |
1582 |
* |
|
1583 |
* The "quick look-up" tables are in the $GNTT$ sub-space, in |
The "quick look-up" tables are in the $GNTT$ sub-space, in |
1584 |
* the following order: |
the following order: |
1585 |
* |
|
1586 |
* Procedures -sorted by address |
Procedures -sorted by address |
1587 |
* Source files -sorted by address (of the |
Source files -sorted by address (of the |
1588 |
* generated code from routines) |
generated code from routines) |
1589 |
* Modules -sorted by address |
Modules -sorted by address |
1590 |
* Classes -<unsorted?> |
Classes -<unsorted?> |
1591 |
* Address Alias -sorted by index <?> |
Address Alias -sorted by index <?> |
1592 |
* Object IDs -sorted by object identifier |
Object IDs -sorted by object identifier |
1593 |
* |
|
1594 |
* Most quick entries have (0-based) indices into the LNTT tables to |
Most quick entries have (0-based) indices into the LNTT tables to |
1595 |
* the full entries for the item it describes. |
the full entries for the item it describes. |
1596 |
* |
|
1597 |
* The post-PXDB header is in the $HEADER$ sub-space. Alas, it |
The post-PXDB header is in the $HEADER$ sub-space. Alas, it |
1598 |
* occurs in different forms, depending on the optimization level |
occurs in different forms, depending on the optimization level |
1599 |
* in the compilation step and whether PXDB was run or not. The |
in the compilation step and whether PXDB was run or not. The |
1600 |
* worst part is the forms aren't self-describing, so we'll have |
worst part is the forms aren't self-describing, so we'll have |
1601 |
* to grovel in the bits to figure out what kind we're looking at |
to grovel in the bits to figure out what kind we're looking at |
1602 |
* (see hp_get_header in hp-psymtab-read.c). |
(see hp_get_header in hp-psymtab-read.c). */ |
1603 |
*/ |
|
1604 |
|
/* PXDB versions. */ |
1605 |
|
|
|
/* PXDB versions |
|
|
*/ |
|
1606 |
#define PXDB_VERSION_CPLUSPLUS 1 |
#define PXDB_VERSION_CPLUSPLUS 1 |
1607 |
#define PXDB_VERSION_7_4 2 |
#define PXDB_VERSION_7_4 2 |
1608 |
#define PXDB_VERSION_CPP_30 3 |
#define PXDB_VERSION_CPP_30 3 |
1613 |
#define PXDB_VERSION_2_1 1 |
#define PXDB_VERSION_2_1 1 |
1614 |
|
|
1615 |
/* Header version for the case that there is no DOC info |
/* Header version for the case that there is no DOC info |
1616 |
* but the executable has been processed by pxdb (the easy |
but the executable has been processed by pxdb (the easy |
1617 |
* case, from "cc -g"). |
case, from "cc -g"). */ |
1618 |
*/ |
|
1619 |
typedef struct PXDB_struct { |
typedef struct PXDB_struct |
1620 |
int pd_entries; /* # of entries in function look-up table */ |
{ |
1621 |
int fd_entries; /* # of entries in file look-up table */ |
int pd_entries; /* # of entries in function look-up table */ |
1622 |
int md_entries; /* # of entries in module look-up table */ |
int fd_entries; /* # of entries in file look-up table */ |
1623 |
unsigned int pxdbed : 1; /* 1 => file has been preprocessed */ |
int md_entries; /* # of entries in module look-up table */ |
1624 |
unsigned int bighdr : 1; /* 1 => this header contains 'time' word */ |
unsigned int pxdbed : 1; /* 1 => file has been preprocessed */ |
1625 |
unsigned int sa_header : 1;/* 1 => created by SA version of pxdb */ |
unsigned int bighdr : 1; /* 1 => this header contains 'time' word */ |
1626 |
|
unsigned int sa_header : 1;/* 1 => created by SA version of pxdb */ |
1627 |
/* used for version check in xdb */ |
/* used for version check in xdb */ |
1628 |
unsigned int inlined: 1; /* one or more functions have been inlined */ |
unsigned int inlined: 1; /* one or more functions have been inlined */ |
1629 |
unsigned int spare:12; |
unsigned int spare:12; |
1630 |
short version; /* pxdb header version */ |
short version; /* pxdb header version */ |
1631 |
int globals; /* index into the DNTT where GNTT begins */ |
int globals; /* index into the DNTT where GNTT begins */ |
1632 |
unsigned int time; /* modify time of file before being pxdbed */ |
unsigned int time; /* modify time of file before being pxdbed */ |
1633 |
int pg_entries; /* # of entries in label look-up table */ |
int pg_entries; /* # of entries in label look-up table */ |
1634 |
int functions; /* actual number of functions */ |
int functions; /* actual number of functions */ |
1635 |
int files; /* actual number of files */ |
int files; /* actual number of files */ |
1636 |
int cd_entries; /* # of entries in class look-up table */ |
int cd_entries; /* # of entries in class look-up table */ |
1637 |
int aa_entries; /* # of entries in addr alias look-up table */ |
int aa_entries; /* # of entries in addr alias look-up table */ |
1638 |
int oi_entries; /* # of entries in object id look-up table */ |
int oi_entries; /* # of entries in object id look-up table */ |
1639 |
} PXDB_header, *PXDB_header_ptr; |
} PXDB_header, *PXDB_header_ptr; |
1640 |
|
|
1641 |
/* Header version for the case that there is no DOC info and the |
/* Header version for the case that there is no DOC info and the |
1642 |
* executable has NOT been processed by pxdb. |
executable has NOT been processed by pxdb. */ |
1643 |
*/ |
|
1644 |
typedef struct XDB_header_struct { |
typedef struct XDB_header_struct |
1645 |
long gntt_length; |
{ |
1646 |
long lntt_length; |
long gntt_length; |
1647 |
long slt_length; |
long lntt_length; |
1648 |
long vt_length; |
long slt_length; |
1649 |
long xt_length; |
long vt_length; |
1650 |
|
long xt_length; |
1651 |
} XDB_header; |
} XDB_header; |
1652 |
|
|
1653 |
/* Header version for the case that there is DOC info and the |
/* Header version for the case that there is DOC info and the |
1654 |
* executable has been processed by pxdb. |
executable has been processed by pxdb. */ |
1655 |
*/ |
|
1656 |
typedef struct DOC_info_PXDB_header_struct { |
typedef struct DOC_info_PXDB_header_struct |
1657 |
unsigned int xdb_header: 1; /* bit set if this is post-3.1 xdb */ |
{ |
1658 |
unsigned int doc_header: 1; /* bit set if this is doc-style header*/ |
unsigned int xdb_header: 1; /* bit set if this is post-3.1 xdb */ |
1659 |
unsigned int version: 8; /* version of pxdb see defines |
unsigned int doc_header: 1; /* bit set if this is doc-style header */ |
1660 |
* PXDB_VERSION_* in this file */ |
unsigned int version: 8; /* version of pxdb see defines |
1661 |
unsigned int reserved_for_flags: 16;/* for future use; -- must be |
PXDB_VERSION_* in this file. */ |
1662 |
* set to zero |
unsigned int reserved_for_flags: 16;/* for future use; -- must be |
1663 |
*/ |
set to zero. */ |
1664 |
unsigned int has_aux_pd_table: 1; /* $GNTT$ has aux PD table */ |
unsigned int has_aux_pd_table: 1; /* $GNTT$ has aux PD table */ |
1665 |
unsigned int has_expr_table: 1; /* space has $EXPR$ */ |
unsigned int has_expr_table: 1; /* space has $EXPR$ */ |
1666 |
unsigned int has_range_table: 1; /* space has $RANGE$ */ |
unsigned int has_range_table: 1; /* space has $RANGE$ */ |
1667 |
unsigned int has_context_table: 1; /* space has $SRC_CTXT$ */ |
unsigned int has_context_table: 1; /* space has $SRC_CTXT$ */ |
1668 |
unsigned int has_lines_table: 1; /* space contains a $LINES$ |
unsigned int has_lines_table: 1; /* space contains a $LINES$ |
1669 |
* subspace for line tables. |
subspace for line tables. */ |
1670 |
*/ |
unsigned int has_lt_offset_map: 1; /* space contains an lt_offset |
1671 |
unsigned int has_lt_offset_map: 1; /* space contains an lt_offset |
subspace for line table mapping. */ |
1672 |
* subspace for line table mapping |
/* The following fields are the same as those in the PXDB_header in $DEBUG$ */ |
1673 |
*/ |
int pd_entries; /* # of entries in function look-up table */ |
1674 |
/* the following fields are the same as those in the PXDB_header in $DEBUG$ */ |
int fd_entries; /* # of entries in file look-up table */ |
1675 |
int pd_entries; /* # of entries in function look-up table */ |
int md_entries; /* # of entries in module look-up table */ |
1676 |
int fd_entries; /* # of entries in file look-up table */ |
unsigned int pxdbed : 1; /* 1 => file has been preprocessed */ |
1677 |
int md_entries; /* # of entries in module look-up table */ |
unsigned int bighdr : 1; /* 1 => this header contains 'time' word */ |
1678 |
unsigned int pxdbed : 1; /* 1 => file has been preprocessed */ |
unsigned int sa_header : 1;/* 1 => created by SA version of pxdb */ |
1679 |
unsigned int bighdr : 1; /* 1 => this header contains 'time' word */ |
/* used for version check in xdb */ |
1680 |
unsigned int sa_header : 1;/* 1 => created by SA version of pxdb */ |
unsigned int inlined: 1; /* one or more functions have been inlined */ |
1681 |
/* used for version check in xdb */ |
unsigned int spare : 28; |
1682 |
unsigned int inlined: 1; /* one or more functions have been inlined */ |
int globals; /* index into the DNTT where GNTT begins */ |
1683 |
unsigned int spare : 28; |
unsigned int time; /* modify time of file before being pxdbed */ |
1684 |
int globals; /* index into the DNTT where GNTT begins */ |
int pg_entries; /* # of entries in label look-up table */ |
1685 |
unsigned int time; /* modify time of file before being pxdbed */ |
int functions; /* actual number of functions */ |
1686 |
int pg_entries; /* # of entries in label look-up table */ |
int files; /* actual number of files */ |
1687 |
int functions; /* actual number of functions */ |
int cd_entries; /* # of entries in class look-up table */ |
1688 |
int files; /* actual number of files */ |
int aa_entries; /* # of entries in addr alias look-up table */ |
1689 |
int cd_entries; /* # of entries in class look-up table */ |
int oi_entries; /* # of entries in object id look-up table */ |
|
int aa_entries; /* # of entries in addr alias look-up table */ |
|
|
int oi_entries; /* # of entries in object id look-up table */ |
|
1690 |
} DOC_info_PXDB_header; |
} DOC_info_PXDB_header; |
1691 |
|
|
1692 |
/* Header version for the case that there is DOC info and the |
/* Header version for the case that there is DOC info and the |
1693 |
* executable has NOT been processed by pxdb. |
executable has NOT been processed by pxdb. */ |
1694 |
*/ |
|
1695 |
typedef struct DOC_info_header_struct { |
typedef struct DOC_info_header_struct |
1696 |
unsigned int xdb_header: 1; /* bit set if this is post-3.1 xdb */ |
{ |
1697 |
unsigned int doc_header: 1; /* bit set if this is doc-style header*/ |
unsigned int xdb_header: 1; /* bit set if this is post-3.1 xdb */ |
1698 |
unsigned int version: 8; /* version of debug/header |
unsigned int doc_header: 1; /* bit set if this is doc-style header*/ |
1699 |
format. For 10.0 the value |
unsigned int version: 8; /* version of debug/header |
1700 |
will be 1. For "Davis" the |
format. For 10.0 the value |
1701 |
value is 2. |
will be 1. For "Davis" the value is 2. */ |
1702 |
*/ |
unsigned int reserved_for_flags: 18; /* for future use; -- must be set to zero. */ |
1703 |
unsigned int reserved_for_flags: 18; /* for future use; -- must be |
unsigned int has_range_table: 1; /* space contains a $RANGE$ subspace for variable ranges. */ |
1704 |
set to zero |
unsigned int has_context_table: 1; /* space contains a $CTXT$ subspace for context/inline table. */ |
1705 |
*/ |
unsigned int has_lines_table: 1; /* space contains a $LINES$ subspace for line tables. */ |
1706 |
unsigned int has_range_table: 1; /* space contains a $RANGE$ |
unsigned int has_lt_offset_map: 1; /* space contains an lt_offset subspace for line table mapping. */ |
1707 |
subspace for variable ranges. |
|
1708 |
*/ |
long gntt_length; /* same as old header */ |
1709 |
unsigned int has_context_table: 1; /* space contains a $CTXT$ |
long lntt_length; /* same as old header */ |
1710 |
subspace for context/inline |
long slt_length; /* same as old header */ |
1711 |
table. |
long vt_length; /* same as old header */ |
1712 |
*/ |
long xt_length; /* same as old header */ |
1713 |
unsigned int has_lines_table: 1; /* space contains a $LINES$ |
long ctxt_length; /* present only if version >= 2 */ |
1714 |
subspace for line tables. |
long range_length; /* present only if version >= 2 */ |
1715 |
*/ |
long expr_length; /* present only if version >= 2 */ |
|
unsigned int has_lt_offset_map: 1; /* space contains an lt_offset |
|
|
subspace for line table mapping |
|
|
*/ |
|
|
|
|
|
long gntt_length; /* same as old header */ |
|
|
long lntt_length; /* same as old header */ |
|
|
long slt_length; /* same as old header */ |
|
|
long vt_length; /* same as old header */ |
|
|
long xt_length; /* same as old header */ |
|
|
long ctxt_length; /* present only if version >= 2 */ |
|
|
long range_length; /* present only if version >= 2 */ |
|
|
long expr_length; /* present only if version >= 2 */ |
|
1716 |
|
|
1717 |
} DOC_info_header; |
} DOC_info_header; |
1718 |
|
|
1726 |
|
|
1727 |
|
|
1728 |
/* Procedure Descriptor: |
/* Procedure Descriptor: |
1729 |
* |
An element of the procedure quick look-up table. */ |
1730 |
* An element of the procedure quick look-up table |
|
1731 |
*/ |
typedef struct quick_procedure |
1732 |
typedef struct quick_procedure { |
{ |
1733 |
long isym; /* 0-based index of first symbol*/ |
long isym; /* 0-based index of first symbol |
1734 |
/* for procedure in $LNTT$, */ |
for procedure in $LNTT$, |
1735 |
/* i.e. the procedure itself */ |
i.e. the procedure itself. */ |
1736 |
CORE_ADDR adrStart; /* memory adr of start of proc */ |
CORE_ADDR adrStart; /* memory adr of start of proc */ |
1737 |
CORE_ADDR adrEnd; /* memory adr of end of proc */ |
CORE_ADDR adrEnd; /* memory adr of end of proc */ |
1738 |
char *sbAlias; /* alias name of procedure */ |
char *sbAlias; /* alias name of procedure */ |
1739 |
char *sbProc; /* real name of procedure */ |
char *sbProc; /* real name of procedure */ |
1740 |
CORE_ADDR adrBp; /* address of entry breakpoint */ |
CORE_ADDR adrBp; /* address of entry breakpoint */ |
1741 |
CORE_ADDR adrExitBp; /* address of exit breakpoint */ |
CORE_ADDR adrExitBp; /* address of exit breakpoint */ |
1742 |
int icd; /* member of this class (index) */ |
int icd; /* member of this class (index) */ |
1743 |
unsigned int ipd; /* index of template for this */ |
unsigned int ipd; /* index of template for this */ |
1744 |
/* function (index) */ |
/* function (index) */ |
1745 |
unsigned int unused: 5; |
unsigned int unused: 5; |
1746 |
unsigned int no_lt_offset: 1;/* no entry in lt_offset table */ |
unsigned int no_lt_offset: 1;/* no entry in lt_offset table */ |
1747 |
unsigned int fTemplate: 1; /* function template */ |
unsigned int fTemplate: 1; /* function template */ |
1748 |
unsigned int fExpansion: 1; /* function expansion */ |
unsigned int fExpansion: 1; /* function expansion */ |
1749 |
unsigned int linked : 1; /* linked with other expansions */ |
unsigned int linked : 1; /* linked with other expansions */ |
1750 |
unsigned int duplicate: 1; /* clone of another procedure */ |
unsigned int duplicate: 1; /* clone of another procedure */ |
1751 |
unsigned int overloaded:1; /* overloaded function */ |
unsigned int overloaded:1; /* overloaded function */ |
1752 |
unsigned int member: 1; /* class member function */ |
unsigned int member: 1; /* class member function */ |
1753 |
unsigned int constructor:1; /* constructor function */ |
unsigned int constructor:1; /* constructor function */ |
1754 |
unsigned int destructor:1; /* destructor function */ |
unsigned int destructor:1; /* destructor function */ |
1755 |
unsigned int Static: 1; /* static function */ |
unsigned int Static: 1; /* static function */ |
1756 |
unsigned int Virtual: 1; /* virtual function */ |
unsigned int Virtual: 1; /* virtual function */ |
1757 |
unsigned int constant: 1; /* constant function */ |
unsigned int constant: 1; /* constant function */ |
1758 |
unsigned int pure: 1; /* pure (virtual) function */ |
unsigned int pure: 1; /* pure (virtual) function */ |
1759 |
unsigned int language: 4; /* procedure's language */ |
unsigned int language: 4; /* procedure's language */ |
1760 |
unsigned int inlined: 1; /* function has been inlined */ |
unsigned int inlined: 1; /* function has been inlined */ |
1761 |
unsigned int Operator: 1; /* operator function */ |
unsigned int Operator: 1; /* operator function */ |
1762 |
unsigned int stub: 1; /* bodyless function */ |
unsigned int stub: 1; /* bodyless function */ |
1763 |
unsigned int optimize: 2; /* optimization level */ |
unsigned int optimize: 2; /* optimization level */ |
1764 |
unsigned int level: 5; /* nesting level (top=0) */ |
unsigned int level: 5; /* nesting level (top=0) */ |
1765 |
} quick_procedure_entry, *quick_procedure_entry_ptr; |
} quick_procedure_entry, *quick_procedure_entry_ptr; |
1766 |
|
|
1767 |
/* Source File Descriptor: |
/* Source File Descriptor: |
1768 |
* |
An element of the source file quick look-up table. */ |
1769 |
* An element of the source file quick look-up table |
|
1770 |
*/ |
typedef struct quick_source |
1771 |
typedef struct quick_source { |
{ |
1772 |
long isym; /* 0-based index in $LNTT$ of */ |
long isym; /* 0-based index in $LNTT$ of |
1773 |
/* first symbol for this file */ |
first symbol for this file. */ |
1774 |
CORE_ADDR adrStart; /* mem adr of start of file's code */ |
CORE_ADDR adrStart; /* mem adr of start of file's code */ |
1775 |
CORE_ADDR adrEnd; /* mem adr of end of file's code */ |
CORE_ADDR adrEnd; /* mem adr of end of file's code */ |
1776 |
char *sbFile; /* name of source file */ |
char *sbFile; /* name of source file */ |
1777 |
unsigned int fHasDecl: 1; /* do we have a .d file? */ |
unsigned int fHasDecl: 1; /* do we have a .d file? */ |
1778 |
unsigned int fWarned: 1; /* have warned about age problems? */ |
unsigned int fWarned: 1; /* have warned about age problems? */ |
1779 |
unsigned int fSrcfile: 1; /* 0 => include 1=> source */ |
unsigned int fSrcfile: 1; /* 0 => include 1=> source */ |
1780 |
unsigned short ilnMac; /* lines in file (0 if don't know) */ |
unsigned short ilnMac; /* lines in file (0 if don't know) */ |
1781 |
int ipd; /* 0-based index of first procedure*/ |
int ipd; /* 0-based index of first procedure |
1782 |
/* in this file, in the quick */ |
in this file, in the quick |
1783 |
/* look-up table of procedures */ |
look-up table of procedures. */ |
1784 |
unsigned int *rgLn; /* line pointer array, if any */ |
unsigned int *rgLn; /* line pointer array, if any */ |
1785 |
} quick_file_entry, *quick_file_entry_ptr; |
} quick_file_entry, *quick_file_entry_ptr; |
1786 |
|
|
1787 |
/* Module Descriptor: |
/* Module Descriptor: |
1788 |
* |
An element of the module quick reference table. */ |
1789 |
* An element of the module quick reference table |
|
1790 |
*/ |
typedef struct quick_module |
1791 |
typedef struct quick_module { |
{ |
1792 |
long isym; /* 0-based index of first */ |
long isym; /* 0-based index of first |
1793 |
/* symbol for module */ |
symbol for module. */ |
1794 |
CORE_ADDR adrStart; /* adr of start of mod. */ |
CORE_ADDR adrStart; /* adr of start of mod. */ |
1795 |
CORE_ADDR adrEnd; /* adr of end of mod. */ |
CORE_ADDR adrEnd; /* adr of end of mod. */ |
1796 |
char *sbAlias; /* alias name of module */ |
char *sbAlias; /* alias name of module */ |
1797 |
char *sbMod; /* real name of module */ |
char *sbMod; /* real name of module */ |
1798 |
unsigned int imports: 1; /* module have any imports? */ |
unsigned int imports: 1; /* module have any imports? */ |
1799 |
unsigned int vars_in_front: 1; /* module globals in front? */ |
unsigned int vars_in_front: 1; /* module globals in front? */ |
1800 |
unsigned int vars_in_gaps: 1; /* module globals in gaps? */ |
unsigned int vars_in_gaps: 1; /* module globals in gaps? */ |
1801 |
unsigned int language: 4; /* type of language */ |
unsigned int language: 4; /* type of language */ |
1802 |
unsigned int unused : 25; |
unsigned int unused : 25; |
1803 |
unsigned int unused2; /* space for future stuff */ |
unsigned int unused2; /* space for future stuff */ |
1804 |
} quick_module_entry, *quick_module_entry_ptr; |
} quick_module_entry, *quick_module_entry_ptr; |
1805 |
|
|
1806 |
/* Auxiliary Procedure Descriptor: |
/* Auxiliary Procedure Descriptor: |
1807 |
* |
An element of the auxiliary procedure quick look-up table. */ |
1808 |
* An element of the auxiliary procedure quick look-up table |
|
1809 |
*/ |
typedef struct quick_aux_procedure |
1810 |
typedef struct quick_aux_procedure { |
{ |
1811 |
long isym_inln; /* start on inline list for proc */ |
long isym_inln; /* start on inline list for proc */ |
1812 |
long spare; |
long spare; |
1813 |
} quick_aux_procedure_entry, *quick_aux_procedure_entry_ptr; |
} quick_aux_procedure_entry, *quick_aux_procedure_entry_ptr; |
1814 |
|
|
1815 |
/* Paragraph Descriptor: |
/* Paragraph Descriptor: |
1816 |
* |
An element of the paragraph quick look-up table. */ |
1817 |
* An element of the paragraph quick look-up table |
|
1818 |
*/ |
typedef struct quick_paragraph |
1819 |
typedef struct quick_paragraph { |
{ |
1820 |
long isym; /* first symbol for label (index) */ |
long isym; /* first symbol for label (index) */ |
1821 |
CORE_ADDR adrStart; /* memory adr of start of label */ |
CORE_ADDR adrStart; /* memory adr of start of label */ |
1822 |
CORE_ADDR adrEnd; /* memory adr of end of label */ |
CORE_ADDR adrEnd; /* memory adr of end of label */ |
1823 |
char *sbLab; /* name of label */ |
char *sbLab; /* name of label */ |
1824 |
unsigned int inst; /* Used in xdb to store inst @ bp */ |
unsigned int inst; /* Used in xdb to store inst @ bp */ |
1825 |
unsigned int sect: 1; /* true = section, false = parag. */ |
unsigned int sect: 1; /* true = section, false = parag. */ |
1826 |
unsigned int unused: 31; /* future use */ |
unsigned int unused: 31; /* future use */ |
1827 |
} quick_paragraph_entry, *quick_paragraph_entry_ptr; |
} quick_paragraph_entry, *quick_paragraph_entry_ptr; |
1828 |
|
|
1829 |
/* |
/* Class Descriptor: |
1830 |
* Class Descriptor: |
An element of the class quick look-up table. */ |
1831 |
* |
|
1832 |
* An element of the class quick look-up table |
typedef struct quick_class |
1833 |
*/ |
{ |
1834 |
typedef struct quick_class { |
char *sbClass; /* name of class */ |
1835 |
char *sbClass; /* name of class */ |
long isym; /* class symbol (tag) */ |
1836 |
long isym; /* class symbol (tag) */ |
unsigned int type : 2; /* 0=class, 1=union, 2=struct */ |
1837 |
unsigned int type : 2; /* 0=class, 1=union, 2=struct */ |
unsigned int fTemplate : 1;/* class template */ |
1838 |
unsigned int fTemplate : 1;/* class template */ |
unsigned int expansion : 1;/* template expansion */ |
1839 |
unsigned int expansion : 1;/* template expansion */ |
unsigned int unused :28; |
1840 |
unsigned int unused :28; |
sltpointer lowscope; /* beginning of defined scope */ |
1841 |
sltpointer lowscope; /* beginning of defined scope */ |
sltpointer hiscope; /* end of defined scope */ |
|
sltpointer hiscope; /* end of defined scope */ |
|
1842 |
} quick_class_entry, *quick_class_entry_ptr; |
} quick_class_entry, *quick_class_entry_ptr; |
1843 |
|
|
1844 |
/* Address Alias Entry |
/* Address Alias Entry |
1845 |
* |
An element of the address alias quick look-up table. */ |
1846 |
* An element of the address alias quick look-up table |
|
1847 |
*/ |
typedef struct quick_alias |
1848 |
typedef struct quick_alias { |
{ |
1849 |
CORE_ADDR low; |
CORE_ADDR low; |
1850 |
CORE_ADDR high; |
CORE_ADDR high; |
1851 |
int index; |
int index; |
1852 |
unsigned int unused : 31; |
unsigned int unused : 31; |
1853 |
unsigned int alternate : 1; /* alternate unnamed aliases? */ |
unsigned int alternate : 1; /* alternate unnamed aliases? */ |
1854 |
} quick_alias_entry, *quick_alias_entry_ptr; |
} quick_alias_entry, *quick_alias_entry_ptr; |
1855 |
|
|
1856 |
/* Object Identification Entry |
/* Object Identification Entry |
1857 |
* |
An element of the object identification quick look-up table. */ |
|
* An element of the object identification quick look-up table |
|
|
*/ |
|
|
|
|
|
typedef struct quick_obj_ID { |
|
|
CORE_ADDR obj_ident; /* class identifier */ |
|
|
long isym; /* class symbol */ |
|
|
long offset; /* offset to object start */ |
|
|
} quick_obj_ID_entry, *quick_obj_ID_entry_ptr; |
|
1858 |
|
|
1859 |
|
typedef struct quick_obj_ID |
1860 |
|
{ |
1861 |
|
CORE_ADDR obj_ident; /* class identifier */ |
1862 |
|
long isym; /* class symbol */ |
1863 |
|
long offset; /* offset to object start */ |
1864 |
|
} quick_obj_ID_entry, *quick_obj_ID_entry_ptr; |
1865 |
|
|
1866 |
#endif /* HP_SYMTAB_INCLUDED */ |
#endif /* HP_SYMTAB_INCLUDED */ |
|
|
|