10/27/83 runtime_symbol_info_ This subroutine's various entry points return runtime information about program variables (address, type, etc.) for programs compiled with symbol tables (-table). Declarations for the entry points and the structures they return can be found in the include file runtime_symbol_info_.incl.pl1. Most entry points take a pointer (symbol_ptr) to a symbol node, which can be obtained by calling stu_$find_runtime_symbol. Rather than return error codes, these entry points return null pointers or zero fields in their structures if the symbol node does not contain the requested information. Also see the various stu_ entry points for additional information about program variables and text. WARNING: Use of these subroutines requires a good understanding of the symbol table structures generated by translators. For example, given a Pascal symbol "foo" declared variable of type packed array [1..10] of char, runtime_symbol_info_ does not return any useful information because this information resides in the symbol node for the TYPE of "foo". Entry points in runtime_symbol_info_: (List is generated by the help command) :Entry: address: 10/27/83 runtime_symbol_info_$address Function: This entry point returns information about the location of a symbol at runtime. Syntax: declare runtime_symbol_info_$address entry (ptr, ptr, fixed bin (35)); call runtime_symbol_info_$address (symbol_ptr, info_ptr, code); Arguments: symbol_ptr is a pointer to a symbol node. (Input) info_ptr is a pointer to a user-allocated structure to be filled in by the call. This structure, called runtime_address_info, is declared in the include file runtime_symbol_info_.incl.pl1. code is error_table_$unimplemented_version if runtime_address_info.version has not been set to a valid version for the structure. :Entry: array: 10/27/83 runtime_symbol_info_$array Function: This entry point returns information about array storage allocation. Syntax: declare runtime_symbol_info_$array entry (ptr, ptr, fixed bin (35)); call runtime_symbol_info_$array (symbol_ptr, info_ptr, code); Arguments: symbol_ptr is a pointer to a symbol node. (Input) info_ptr is a pointer to a user-allocated structure to be filled in by the call. This structure, called runtime_array_info, is declared in the include file runtime_symbol_info_.incl.pl1. code is error_table_$unimplemented_version if runtime_array_info.version has not been set to a valid version for the structure. :Entry: array_dims: 10/27/83 runtime_symbol_info_$array_dims Function: This entry point returns the number of dimensions of an array. It returns null if the symbol has no dimensions. Syntax: declare runtime_symbol_info_$array_dims entry (pointer) returns (fixed bin); n_dims = runtime_symbol_info_$array_dims (symbol_ptr); Arguments: symbol_ptr is a pointer to a symbol node. (Input) :Entry: brother: 10/27/83 runtime_symbol_info_$brother Function: This entry point, given a pointer to a symbol node for an aggregate component, returns a pointer to the next component at the same level or null if this is the last component at this level of the aggregate. Given a pointer to a formal parameter, it returns a pointer to the node for the next parameter, or null if there is no next parameter. Given a pointer to any other symbol node whose level is <= 1 (non_aggregate or top-level structure) and which has a name, returns a pointer to the next element on the list of symbol nodes ordered alphabetically by size. It returns null if there is no next symbol. Syntax: declare runtime_symbol_info_$brother entry (pointer) returns (pointer); brother_ptr = runtime_symbol_info_$brother (symbol_ptr); Arguments: symbol_ptr is a pointer to a symbol node. (Input) :Entry: father: 10/27/83 runtime_symbol_info_$father Function: This entry point, given a pointer to a symbol node for an aggregate component, returns a pointer to the symbol node for its parent aggregate. Given a pointer to a symbol node whose level is <= 1 and which has a name, returns a pointer to the runtime block node that represents the block in which the identifier is declared. It returns null if father = 0 or if there is no father field. Syntax: declare runtime_symbol_info_$father entry (pointer) returns (pointer); father_ptr = runtime_symbol_info_$father (symbol_ptr); Arguments: symbol_ptr is a pointer to to a symbol node. (Input) :Entry: father_type: 10/27/83 runtime_symbol_info_$father_type Function: This entry point, given a pointer to a symbol node for a Pascal enumerated type element, returns a pointer to the symbol node for the parent type. Otherwise, it returns null. Syntax: declare runtime_symbol_info_$father_type entry (pointer) returns (pointer); father_type_ptr = runtime_symbol_info_$father_type (symbol_ptr); Arguments: symbol_ptr is a pointer to a symbol node. (Input) :Entry: level: 10/27/83 runtime_symbol_info_$level Function: This entry point, given a pointer to a symbol node for an aggregate component, returns the level number of the component in the aggregate or zero if the symbol is not an aggregate component. Fields in a Pascal "with" block are at level 0. Syntax: declare runtime_symbol_info_$level entry (pointer) returns (fixed bin); level_number = runtime_symbol_info_$level (symbol_ptr); Arguments: symbol_ptr is a pointer to a symbol node. (Input) :Entry: n_variants: 10/27/83 runtime_symbol_info_$n_variants Function: This entry point, given a pointer to a symbol node for a tag field in a Pascal record, returns the number of case variants for the field. It returns 0 if the symbol is not a tag field. Syntax: declare runtime_symbol_info_$n_variants entry (pointer) returns (fixed bin); n_variants = runtime_symbol_info_$n_variants (symbol_ptr); Arguments: symbol_ptr is a pointer to a symbol node. (Input) :Entry: name: 10/27/83 runtime_symbol_info_$name Function: This entry point, given a pointer to a symbol node, returns a pointer to the symbol's name in packed form (see "Notes" below). It returns null if there is no name. Syntax: declare runtime_symbol_info_$name entry (pointer) returns (pointer); name_string = runtime_symbol_info_$name (symbol_ptr) -> acc.string; Arguments: symbol_ptr is a pointer to a symbol node. (Input) Notes: The variable acc.string is declared in the include file acc.incl.pl1: dcl 1 acc based aligned, 2 num_chars fixed bin (9) unsigned unaligned, 2 string char (0 refer (acc.num_chars)) unaligned; :Entry: next: 10/27/83 runtime_symbol_info_$next Function: This entry point, given a pointer to a symbol node, returns a pointer to the symbol node for the next identifier having the same name as the current identifier. It returns null if there is no name or if there are no more identifiers with the same name. Syntax: declare runtime_symbol_info_$next entry (pointer) returns (pointer); next_symbol_ptr = runtime_symbol_info_$next (symbol_ptr); Arguments: symbol_ptr is a pointer to a symbol node. (Input) :Entry: son: 10/27/83 runtime_symbol_info_$son Function: This entry point, given a pointer to a symbol node for an aggregate, returns a pointer to the symbol node for the aggregate's first component. Given a pointer to a symbol node for a procedure, it returns a pointer to the symbol node for the first formal parameter. Given a pointer to a symbol node for an enumerated type, it returns a pointer to the symbol node for the first element of the type. Otherwise, it returns null. Syntax: declare runtime_symbol_info_$son entry (pointer) returns (pointer); son_ptr = runtime_symbol_info_$son (symbol_ptr); Arguments: symbol_ptr is a pointer to a symbol node. (Input) :Entry: successor: 10/27/83 runtime_symbol_info_$successor Function: This entry point, given a pointer to a symbol node for a Pascal enumerated type element, returns a pointer to the symbol node for the next element in the set of enumerated values for the type, or null if there is no next element or no successor field. Syntax: declare runtime_symbol_info_$successor entry (pointer) returns (pointer); successor_ptr = runtime_symbol_info_$successor (symbol_ptr); Arguments: symbol_ptr is a pointer to a symbol node. (Input) :Entry: type: 10/27/83 runtime_symbol_info_$type Function: This entry point returns information about the data type of a symbol. Syntax: declare runtime_symbol_info_$type entry (pointer, pointer); call runtime_symbol_info_$type (symbol_ptr, info_ptr); Arguments: symbol_ptr is a pointer to a symbol node. (Input) info_ptr is a pointer to a user-allocated structure to be filled in by the call. This structure, called runtime_type_info, is declared in the include file runtime_symbol_info_.incl.pl1. :Entry: variant: 10/27/83 runtime_symbol_info_$variant Function: This entry point, given a pointer to a symbol node for a Pascal record field with case variants, returns information describing the variants. If the symbol is not a Pascal symbol, number_of_variants is returned as 0 and the rest of the information is invalid. Syntax: declare runtime_symbol_info_$variant entry (ptr, ptr, fixed bin (35)); call runtime_symbol_info_$variant (symbol_ptr, info_ptr, code); Arguments: symbol_ptr is a pointer to a symbol node. (Input) info_ptr is a pointer to a user-allocated structure to be fille din by the call. This structure, called runtime_variant_info, is declared in the include file runtime_symbol_info_.incl.pl1. code is error_table_$unimplemented_version if runtime_variant_info.version has not been set to a valid version for the structure. ----------------------------------------------------------- Historical Background This edition of the Multics software materials and documentation is provided and donated to Massachusetts Institute of Technology by Group BULL including BULL HN Information Systems Inc. as a contribution to computer science knowledge. This donation is made also to give evidence of the common contributions of Massachusetts Institute of Technology, Bell Laboratories, General Electric, Honeywell Information Systems Inc., Honeywell BULL Inc., Groupe BULL and BULL HN Information Systems Inc. to the development of this operating system. Multics development was initiated by Massachusetts Institute of Technology Project MAC (1963-1970), renamed the MIT Laboratory for Computer Science and Artificial Intelligence in the mid 1970s, under the leadership of Professor Fernando Jose Corbato. Users consider that Multics provided the best software architecture for managing computer hardware properly and for executing programs. Many subsequent operating systems incorporated Multics principles. Multics was distributed in 1975 to 2000 by Group Bull in Europe , and in the U.S. by Bull HN Information Systems Inc., as successor in interest by change in name only to Honeywell Bull Inc. and Honeywell Information Systems Inc. . ----------------------------------------------------------- Permission to use, copy, modify, and distribute these programs and their documentation for any purpose and without fee is hereby granted,provided that the below copyright notice and historical background appear in all copies and that both the copyright notice and historical background and this permission notice appear in supporting documentation, and that the names of MIT, HIS, BULL or BULL HN not be used in advertising or publicity pertaining to distribution of the programs without specific prior written permission. Copyright 1972 by Massachusetts Institute of Technology and Honeywell Information Systems Inc. Copyright 2006 by BULL HN Information Systems Inc. Copyright 2006 by Bull SAS All Rights Reserved