 |
OpenVMS Alpha System Analysis Tools Manual
SDA$SET_LINE_COUNT
Sets the number of lines printed so far on the current page.
Format
void sda$set_line_count (uint32 line_count);
Argument
line_count
OpenVMS usage |
longword_unsigned |
type |
longword (unsigned) |
access |
read only |
mechanism |
by value |
The number of lines printed on current page.
Description
The number of lines that have been printed so far on the current page
is set to the given value.
Condition Values Returned
Example
This call sets SDA's current line count on the current page of output
to 5.
SDA$SET_PROCESS
Sets a new SDA process context.
Format
int sda$set_process (const char *proc_name, int proc_index, int
proc_addr);
Arguments
proc_name
OpenVMS usage |
character_string |
type |
character string |
access |
read only |
mechanism |
by reference |
Address of the process name string (zero-terminated).
proc_index
OpenVMS usage |
longword_unsigned |
type |
longword (unsigned) |
access |
read only |
mechanism |
by value |
The index of the desired process.
proc_addr
OpenVMS usage |
address |
type |
longword (unsigned) |
access |
read only |
mechanism |
by value |
The address of the PCB for the desired process.
Description
This routine causes SDA to set the specified process as the currently
selected process.
Note
The proc_name, proc_index, and proc_addr are mutually exclusive.
|
Condition Values Returned
SDA$_SUCCESS
|
Successful completion.
|
Any failure is signaled as an error and the current command aborts.
Example
|
status = sda$set_process ( "JOB_CONTROL", 0, 0);
|
In this example, SDA's current process context is set to the
JOB_CONTROL process.
SDA$SKIP_LINES
This routine outputs a specified number of blank lines.
Format
void sda$skip_lines (uint32 lines);
Argument
lines
OpenVMS usage |
longword_unsigned |
type |
longword (unsigned) |
access |
read only |
mechanism |
by value |
Number of lines to skip.
Description
The specified number of blank lines are output.
Condition Values Returned
Example
This call causes two blank lines to be output.
SDA$SYMBOL_VALUE
Otains the 64-bit value of a specified symbol.
Format
int sda$symbol_value (char *symb_name, uint64 *symb_value);
Arguments
symb_name
OpenVMS usage |
char_string |
type |
character string |
access |
read only |
mechanism |
by reference |
Zero-terminated string containing symbol name.
symb_value
OpenVMS usage |
quadword_unsigned |
type |
quadword (unsigned) |
access |
write only |
mechanism |
by reference |
Address to receive symbol value.
Description
A search through SDA's symbol table is made for the specified symbol.
If found, its 64-bit value is returned.
Condition Values Returned
SDA$_SUCCESS
|
Symbol found.
|
SDA$_BADSYM
|
Symbol not found.
|
Example
|
int status;
VOID_PQ address;
...
status = sda$symbol_value ("EXE_STD$ALLOCATE_C", (uint64 *)&address);
|
This call returns the start address of the prologue of routine
EXE_STD$ALLOCATE to location ADDRESS.
SDA$SYMBOLIZE
Converts a value to a symbol name and offset.
Format
int sda$symbolize (uint64 value, char *symbol_buf, uint32 symbol_len);
Arguments
value
OpenVMS usage |
quadword_unsigned |
type |
quadword (unsigned) |
access |
read only |
mechanism |
by value |
Value to be translated.
symbol_buf
OpenVMS usage |
char_string |
type |
character string |
access |
write only |
mechanism |
by reference |
Address of buffer to which to return string.
symbol_len
OpenVMS usage |
longword_unsigned |
type |
longword (unsigned) |
access |
read only |
mechanism |
by value |
Maximum length of string buffer.
Description
This routine accepts a value and returns a string that contains a
symbol and offset corresponding to that value. First the value is
checked in the symbol table. If no symbol can be found (either exact
match or up to 0XFFF less than the specified value), the value is then
checked to see if it falls within one of the loaded or activated images.
Condition Values Returned
SS$_NORMAL
|
Successful completion.
|
SS$_BUFFEROVF
|
Buffer too small, string truncated.
|
SS$_NOTRAN
|
No symbolization for this value (null string returned).
|
Example
|
VOID_PQ va = VOID_PQ(0xFFFFFFFF80102030);
char buffer [64]
status = sda$symbolize (va, buffer, sizeof(buffer));
sda$print ("FFFFFFFF.80102030 = \"!AZ\"", buffer);
|
This example outputs the following:
|
FFFFFFFF.80102030 = "EXE$WRITE_PROCESS_C+00CD0"
|
SDA$TRYMEM
Reads dump or system memory and returns the error status (without
signaling) if inaccessible.
Format
int sda$trymem (VOID_PQ start, void *dest, int length,
__optional_params);
Arguments
start
OpenVMS usage |
address |
type |
quadword (unsigned) |
access |
read only |
mechanism |
by value |
Starting virtual address in dump or system.
dest
OpenVMS usage |
address |
type |
varies |
access |
write only |
mechanism |
by reference |
Return buffer address.
length
OpenVMS usage |
longword_unsigned |
type |
longword (unsigned) |
access |
read only |
mechanism |
by value |
Length of transfer.
physical
OpenVMS usage |
longword_unsigned |
type |
longword (unsigned) |
access |
read only |
mechanism |
by value |
0: <start> is a virtual address. This is the default.
1: <start> is a physical address.
Description
This routine transfers an area from the memory in the dump file or the
running system to the caller's return buffer. It performs the necessary
address translation to locate the data in the dump file. SDA$TRYMEM
does not signal any warning or errors. It returns the error status if
the data is inaccessible.
Related Routines
SDA$GETMEM and SDA$REQMEM
Condition Values Returned
SDA$_SUCCESS
|
Successful completion.
|
SDA$_NOREAD
|
The data is inaccessible for some reason.
|
SDA$_NOTINPHYS
|
The data is inaccessible for some reason.
|
Others
|
The data is inaccessible for some reason.
|
Example
|
int status;
DDB *ddb;
...
status = sda$trymem (ddb->ddb$ps_link, ddb, DDB$K_LENGTH);
if ($VMS_STATUS_SUCCESS (status))
sda$print ("Next DDB is successfully read from dump");
else
sda$print ("Next DDB is inaccessible");
|
This example attempts to read the next DDB in the DDB list from the
dump.
SDA$TYPE
Formats and types a single line to SYS$OUTPUT.
Format
int sda$type (char *ctrstr, __optional_params);
Arguments
ctrstr
OpenVMS usage |
char_string |
type |
character-coded text string |
access |
read only |
mechanism |
by reference |
Address of a zero-terminated control string.
prmlst
OpenVMS usage |
varying_arg |
type |
quadword (signed or unsigned) |
access |
read only |
mechanism |
by value |
Optional FAO parameters. All arguments after the control string are
copied into a quadword parameter list, as used by $FAOL_64.
Description
Formats and prints a single line to the terminal. This is unaffected by
the use of the SDA commands SET OUTPUT or SET LOG.
Condition Values Returned
SDA$_SUCCESS
|
Indicates a successful completion.
|
SDA$_CNFLTARGS
|
Indicates more than twenty FAO parameters given.
|
Other
|
Returns from the $PUT issued by SDA$TYPE (the error is also signaled).
If the $FAOL_64 call issued by SDA$TYPE fails, a blank line is output.
|
Example
|
int status;
...
status = sda$type ("Invoking SHOW SUMMARY to output file...");
|
This example displays the message "Invoking SHOW SUMMARY to output
file..." to the terminal.
SDA$VALIDATE_QUEUE
Validates queue structures.
Format
void sda$validate_queue (VOID_PQ queue_header, __optional_params);
Arguments
queue_header
OpenVMS usage |
address |
type |
quadword (unsigned) |
access |
read only |
mechanism |
by value |
Address from which to start search.
options
OpenVMS usage |
mask_longword |
type |
longword (unsigned) |
access |
read only |
mechanism |
by value |
The following table shows the flags that indicate the type of queue:
Flag |
Meaning |
None
|
Defaults to doubly-linked longword queue
|
SDA_OPT$M_QUEUE_BACKLINK
|
Validates the integrity of a doubly-linked queue using the back links
instead of the forward links
|
SDA_OPT$M_QUEUE_LISTQUEUE
|
Displays queue elements for debugging
|
SDA_OPT$M_QUEUE_QUADLINK
|
Indicates a quadword queue
|
SDA_OPT$M_QUEUE_SELF
|
Indicates a self-relative queue
|
SDA_OPT$M_QUEUE_SINGLINK
|
Indicates a singly-linked queue
|
Description
You can use this routine to validate the integrity of double-linked,
single-linked or self-relative queues either with longword or quadword
links. If you specify the option SDA_OPT$M_QUEUE_LISTQUEUE, the queue
elements are displayed for debugging. Otherwise a one-line summary
indicates how many elements were found and whether the queue is intact.
Condition Values Returned
If an error occurs, it is signaled by SDA$VALIDATE_QUEUE.
Example
|
int64 temp;
int64 *queue;
...
sda$symbol_value ("EXE$GL_NONPAGED", &temp);
temp += 4;
sda$reqmem ((VOID_PQ)temp, &queue, 4);
sda$validate_queue (queue, SDA_OPT$M_QUEUE_SINGLINK);
|
This sequence validates the nonpaged pool free list, and outputs a
message of the form:
|
Queue is zero-terminated, total of 204 elements in the queue
|
|