Next: , Previous: builtin, Up: Commands


4.2 general commands

The following commands relate to sourcing script files. Scripts may source other scripts. Cyclic scripts are detected and diagnosed as errors.

— Command: source script

Loads commands to the interpreter from the script file. File is searched through include paths given by the -I command-line option or the addpath command.

— Command: addpath path

Appends path to the search path for sourcing scripts.

— Command: paths

Print the list of paths searched for source scripts.

The following commands relate to extending the simulator with user-defined functions in dynamically loaded shared libraries. More on shared modules can be found in Extending simulation.

— Command: dladdpath paths ...

Append paths to the list of paths to search for opening shared library modules. This is useful if you simply forget (or are too lazy) to pass the corresponding paths on the command-line. See also the -L option.

— Command: dlopen lib

Open shared library lib for loading external user-defined functions. Library is found by searching through user-specified load paths and the conventional library path environment variables. The command-line equivalent is the -l option, following the same naming guidelines.

— Command: dlpaths

Prints the list of paths used in searching for dlopen-ing modules.

— Command: dlcheckfunc funcs ...

For each function named in funcs, report whether or not it has been bound to a symbol in a dynamically loaded module. Never errors out. See command dlassertfunc.

— Command: dlassertfunc funcs ...

Error out if any function named in funcs is unbound to a module symbol. Useful for making sure a set of symbols is resolved before any execution begins. See command dlcheckfunc.

— Command: dlfuncs

Print list of registered functions, from dlopened modules.