The call command executes a subroutine.
call adr [-s str|val]..where:
adr | is the address of the subroutine to be executed. |
-s str | is a string argument. |
val | is a value to be passed. |
If the user specifies arguments, these are passed using the standard C calling convention. If the "-s" option is specified, the following argument is assumed to be a string. In this case the address of the string is passed to the subroutine. If a numerical value is specified in place of the "-s", it will be evaluated according to the existing rules and passed to the function. Up to ten arguments may be passed.
This command is usually used to provide a method of displaying application-specific data structures. For example, if your application has a complex, linked-list data structure, you might find it helpful to add a function to your program that can display the structure. The call command can then be used to invoke this function from the PMON prompt at any time in the execution, even between two single-step operations.
Examples illustrating the use of the call command follow.
PMON> call prstat Call the function whos name is 'prstat'. PMON> call prrec a0020000+8 Call the function 'prrec' and pass it
the value 0xa0020008 as the first argument. PMON> call printf -s "hello world" Call the function printf and pass it the address of the string "hello world".
Navigation: Document Home | Document Contents | Document Index