[an error occurred while processing this directive]

HP OpenVMS Systems Documentation

Content starts here

OpenVMS Debugger Manual


Previous Contents Index

If the debugger locates this version using the directory search list, it checks that the creation or revision date and time, file size, record format, and file organization are the same as the original compile-time source file. If these characteristics match, the debugger concludes that the original source file has been located in its new directory.

If the debugger cannot locate this version using the directory search list, it identifies the file that has the closest revision date and time (if such a file exists in that directory) and issues a NOTORIGSRC message ("original version of source file not found") when first displaying the source code.

Specifying the /EDIT Qualifier

The /EDIT qualifier is needed when the files used for the display of source code are different from the files to be edited by using the EDIT command. This is the case with Ada programs. For Ada programs, the (SET, SHOW, CANCEL) SOURCE commands affect the search of files used for source display (the "copied" source files in Ada program libraries); the (SET,SHOW,CANCEL) SOURCE/EDIT commands affect the search of the source files you edit when using the EDIT command. If you use /MODULE with /EDIT, the effect of /EDIT is further qualified by /MODULE.

For information specific to Ada programs, type HELP Language_Support Ada.

Specifying the /ORIGINAL Qualifier

Before you can use the /ORIGINAL qualifier in a SET SOURCE command, the Correlation Facility (a separate layered product) must be installed on your system. Refer to Correlation Facility documentation for information on creating a correlation library before debugging.

Then, invoke the kept debugger and issue the SET SOURCE/ORIGINAL command as follows:


$   DEBUG/KEEP
DBG> SET SOURCE/ORIGINAL
DBG> RUN filename.EXE

After issuing these commands, you can debug STDL source code in the same way you debug any other supported language program.

Related commands:

(SHOW,CANCEL) SOURCE

Examples

#1

DBG> SHOW SOURCE
  no directory search list in effect
DBG> SET SOURCE [PROJA],[PROJB],[PETER.PROJC]
DBG> SHOW SOURCE 
    source directory list for all modules, 
    match the latest source file version: 
        [PROJA] 
        [PROJB] 
        [PETER.PROJC]
 
      

In this example, the SET SOURCE command specifies that the debugger should search directories [PROJA], [PROJB], and [PETER.PROJC], in that order, for the latest version of source files.

#2

DBG> SET SOURCE/MODULE=CTEST/EXACT [],SYSTEM::DEVICE:[PROJD]
DBG> SHOW SOURCE
   source directory search list for CTEST, 
    match the exact source file version: 
        [] 
        SYSTEM::DEVICE:[PROJD] 
    source directory list for all other modules, 
    match the latest source file version: 
        [PROJA] 
        [PROJB] 
        [PETER.PROJC]
 
      

In this continuation of the previous example, the SET SOURCE/MODULE=CTEST command specifies that the debugger should search the current default directory ([]) and SYSTEM::DEVICE:[PROJD], in that order, for source files to use with the module CTEST. The /EXACT qualifier specifies that the search will try to locate the exact version of the CTEST source files found in the debug symbol table.

#3

DBG> SET SOURCE /EXACT
DBG> SHOW SOURCE
    no directory search list in effect, 
     match the exact source file
DBG> SET SOURCE [JONES]
DBG> SHOW SOURCE
    source directory list for all modules, 
     match the exact source file version: 
         [JONES]
DBG> CANCEL SOURCE /EXACT
DBG> SHOW SOURCE 
     source directory list for all modules, 
     match the latest source file version: 
         [JONES]
 
      

In this example, the SET SOURCE/EXACT command establishes a search method (exact version) that remains in effect for the SET SOURCE [JONES] command. The CANCEL SOURCE/EXACT command not only cancels SET SOURCE/EXACT command, but also affects the SET SOURCE [JONES] command.


SET STEP

Establishes default qualifiers (/LINE, /INTO, and so on) for the STEP command.

Format

SET STEP step-default[,...]


Parameters

step-default

Specifies a default to be established for the STEP command. Valid keywords (which correspond to STEP command qualifiers) are as follows:
BRANCH Subsequent STEP commands are treated as STEP/BRANCH (step to the next branch instruction).
CALL Subsequent STEP commands are treated as STEP/CALL (step to the next call instruction).
EXCEPTION Subsequent STEP commands are treated as STEP/EXCEPTION (step to the next exception).
INSTRUCTION Subsequent STEP commands are treated as STEP/INSTRUCTION (step to the next instruction).

INTO Subsequent STEP commands are treated as STEP/INTO (step into called routines) rather than STEP/OVER (step over called routines). When INTO is in effect, you can qualify the types of routines to step into by using the [NO]JSB, [NO]SHARE, and [NO]SYSTEM parameters, or by using the STEP/[NO]JSB, STEP/[NO]SHARE, and STEP/[NO]SYSTEM command/qualifier combinations (the latter three take effect only for the immediate STEP command).
LINE (Default) Subsequent STEP commands are treated as STEP/LINE (step to the next line).
OVER (Default) Subsequent STEP commands are treated as STEP/OVER (step over all called routines) rather than STEP/INTO (step into called routines).
RETURN Subsequent STEP commands are treated as STEP/RETURN (step to the return instruction of the routine that is currently executing---that is, up to the point just prior to transferring control back to the calling routine).
SEMANTIC_EVENT (Alpha only) Subsequent STEP commands are treated as STEP/SEMANTIC_EVENT (step to the next semantic event). This simplifies debugging optimized programs (see Chapter 14 for more information).
SHARE (Default) If INTO is in effect, subsequent STEP commands are treated as STEP/INTO/SHARE (step into called routines in shareable images as well as into other called routines).
NOSHARE If INTO is in effect, subsequent STEP commands are treated as STEP/INTO/NOSHARE (step over called routines in shareable images, but step into other routines).
SILENT Subsequent STEP commands are treated as STEP/SILENT (after a step, do not display the "stepped to..." message or the source line for the current location).
NOSILENT (Default) Subsequent STEP commands are treated as STEP/NOSILENT (after a step, display the "stepped to..." message).
SOURCE (Default) Subsequent STEP commands are treated as STEP/SOURCE (after a step, display the source line for the current location). Also, subsequent SET BREAK, SET TRACE, and SET WATCH commands are treated as SET BREAK/SOURCE, SET TRACE/SOURCE, and SET WATCH/SOURCE, respectively (at a breakpoint, tracepoint, or watchpoint, display the source line for the current location).
NOSOURCE Subsequent STEP commands are treated as STEP/NOSOURCE (after a step, do not display the source line for the current location). Also, subsequent SET BREAK, SET TRACE, and SET WATCH commands are treated as SET BREAK/NOSOURCE, SET TRACE/NOSOURCE, and SET WATCH/NOSOURCE, respectively (at a breakpoint, tracepoint, or watchpoint, do not display the source line for the current location).
SYSTEM (Default) If INTO is in effect, subsequent STEP commands are treated as STEP/INTO/SYSTEM (step into called routines in system space (P1 space) as well as into other called routines).
NOSYSTEM If INTO is in effect, subsequent STEP commands are treated as STEP/INTO/NOSYSTEM (step over called routines in system space, but step into other routines).

Description

The SET STEP command establishes default qualifiers for subsequent STEP commands. The parameters that you specify in the SET STEP command have the same names as the qualifiers for the STEP command. The following parameters affect where the STEP command suspends execution after a step:
BRANCH
CALL
EXCEPTION
INSTRUCTION
LINE
RETURN
SEMANTIC_EVENT (Alpha only)

The following parameters affect what output is seen when a STEP command is executed:

[NO]SILENT
[NO]SOURCE

The following parameters affect what happens at a routine call:

INTO
OVER
[NO]SHARE
[NO]SYSTEM

You can override the current STEP defaults for the duration of a single STEP command by specifying other qualifiers. Use the SHOW STEP command to identify the current STEP defaults.

Enabling screen mode by pressing PF1-PF3 enters the SET STEP NOSOURCE command as well as the SET MODE SCREEN command. Therefore, any display of source code in output and DO displays that would result from a STEP command or from a breakpoint, tracepoint, or watchpoint being triggered is suppressed, to eliminate redundancy with the source display.

Related commands:

SHOW STEP
STEP

Examples

#1

DBG> SET STEP INSTRUCTION,NOSOURCE
      

This command causes the debugger to execute the program to the next instruction when a STEP command is entered, and not to display lines of source code with each STEP command.

#2

DBG> SET STEP LINE,INTO,NOSYSTEM,NOSHARE
      

This command causes the debugger to execute the program to the next line when a STEP command is entered, and to step into called routines in user space only. The debugger steps over routines in system space and in shareable images.


SET TASK|THREAD

Changes characteristics of one or more tasks of a tasking program (also called a multithread program).

Note

SET TASK and SET THREAD are synonymous commands. They perform identically.

Format

SET TASK|THREAD [task-spec[,...]]


Parameters

task-spec

Specifies a task value. Use any of the following forms:
  • When the event facility is THREADS:
    • A task (thread) ID number as declared in the program, or a language expression that yields a task ID number.
    • A task ID number (for example, 2), as indicated in a SHOW TASK display.
  • When the event facility is ADA:
    • A task (thread) name as declared in the program, or a language expression that yields a task value. You can use a path name.
    • A task ID (for example, %TASK 2), as indicated in a SHOW TASK display.
  • One of the following task built-in symbols:
    %ACTIVE_TASK The task that runs when a GO, STEP, CALL, or EXIT command executes.
    %CALLER_TASK (Applies only to Ada programs.) When an accept statement executes, the task that called the entry associated with the accept statement.
    %NEXT_TASK The task after the visible task in the debugger's task list. The ordering of tasks is arbitrary but consistent within a single run of a program.
    %PREVIOUS_TASK The task previous to the visible task in the debugger's task list.
    %VISIBLE_TASK The task whose call stack and register set are the current context for looking up symbols, register values, routine calls, breakpoints, and so on.

Do not use the asterisk (*) wildcard character. Instead, use the /ALL qualifier. Do not specify a task with /ALL or /TIME_SLICE. If you do not specify a task or /ALL with /ABORT, /[NO]HOLD, /PRIORITY, or /RESTORE, the visible task is selected.


Qualifiers

/ABORT

Marks the specified tasks for termination. Termination occurs at the next allowable point after a specified task resumes execution.

For HP Ada tasks, the effect is identical to executing an Ada abort statement for the tasks specified and causes these tasks to be marked as abnormal. Any dependent tasks are also marked for termination.

For POSIX Threads threads, use the following command:


PTHREAD tset -c thread-number 

You can get help on POSIX Threads debugger commands by typing PTHREAD HELP.

See the Guide to POSIX Threads Library for more information about using the POSIX Threads debugger.

/ACTIVE

Makes the specified task the active task, which is the task that runs when a STEP, GO, CALL, or EXIT command executes. This causes a task switch to the new active task and makes that task the visible task. The specified task must be in either the RUNNING or READY state. When using /ACTIVE, you must specify one task.

For POSIX Threads programs or HP Ada on Alpha programs, use one of the following alternatives:

  • For query-type actions, use the SET TASK/VISIBLE command.
  • To gain control of execution, use a strategic placement of breakpoints.
  • Use the PTHREAD tset -a thread-number command.

You can get help on POSIX Threads debugger commands by typing PTHREAD HELP.

See the Guide to POSIX Threads Library for more information about using the POSIX Threads debugger.

/ALL

Applies the SET TASK command to all tasks.

/HOLD

/NOHOLD (default)

When the event facility is THREADS, use the PTHREAD tset -h thread-number or the PTHREAD tset -n thread-num command.

Controls whether a specified task is put on hold. The /HOLD qualifier puts a specified task on hold.

Putting a task on hold prevents a task from entering the RUNNING state. A task put on hold is allowed to make other state transitions; in particular, it can change from the SUSPENDED to the READY state.

Putting a task on hold prevents a task from entering the RUNNING state. A task put on hold is allowed to make other state transitions; in particular, it can change from the SUSPENDED to the READY state.

A task already in the RUNNING state (the active task) can continue to execute as long as it remains in the RUNNING state, even though it is put on hold. If the task leaves the RUNNING state for any reason (including expiration of a time slice, if time slicing is enabled), it will not return to the RUNNING state until released from the hold condition.

You can override the hold condition and force a task into the RUNNING state with the SET TASK/ACTIVE command even if the task is on hold.

The /NOHOLD qualifier releases a specified task from hold.

You can get help on POSIX Threads debugger commands by typing PTHREAD HELP.

See the Guide to POSIX Threads Library for more information about using the POSIX Threads debugger.

/PRIORITY=n

When the event facility is THREADS, use the PTHREAD tset -s thread-number command.

Or, sets the priority of a specified task to n, where n is a decimal integer from 0 to 15. This does not prevent the priority from later changing in the course of execution, for example, while executing an Ada rendezvous or POSIX Threads synchronization event. This qualifier does not affect a task's scheduling policy.

You can get help on POSIX Threads debugger commands by typing PTHREAD HELP.

See the Guide to POSIX Threads Library for more information about using the POSIX Threads debugger.

/VISIBLE

Makes the specified task the visible task, which is the task whose call stack and register set are the current context for looking up symbols, register values, routine calls, breakpoints, and so on. Commands such as EXAMINE are directed at the visible task. The /VISIBLE qualifier does not affect the active task. When using /VISIBLE, you must specify one task.

Description

The SET TASK (or SET THREAD) command enables you to establish the visible task and the active task, control the execution of tasks, and cause task state transitions, directly or indirectly.

To determine the current state of a task, use the SHOW TASK command. The possible states are RUNNING, READY, SUSPENDED, and TERMINATED.

Related commands:

DEPOSIT/TASK
EXAMINE/TASK
SET BREAK/EVENT
SET TRACE/EVENT
(SET, SHOW) EVENT_FACILITY
SHOW TASK|THREAD

Examples

#1

DBG> SET TASK/ACTIVE %TASK 3
      

(Event facility = ADA) This command makes task 3 (task ID = 3) the active task.

#2

DBG> PTHREAD tset -a 3
      

(Event facility = THREADS) This command makes task 3 (task ID = 3) the active task.

#3

DBG> SET TASK %NEXT_TASK
      

This command makes the next task in the debugger's task list the visible task. (The /VISIBLE qualifier is a default for the SET TASK command.)

#4

DBG> SET TASK/HOLD/ALL
DBG> SET TASK/ACTIVE %TASK 1
DBG> GO
    ...
DBG> SET TASK/ACTIVE %TASK 3
DBG> STEP
    ...
      

In this example, the SET TASK/HOLD/ALL command freezes the state of all tasks except the active task. Then, SET TASK/ACTIVE is used selectively (along with the GO and STEP commands) to observe the behavior of one or more specified tasks in isolation.


SET TERMINAL

Sets the terminal-screen height or width that the debugger uses when it formats screen and other output.

Note

This command is not available in the HP DECwindows Motif for OpenVMS user interface to the debugger.

Format

SET TERMINAL


Qualifiers

/PAGE:n

Specifies that the terminal screen height should be set to n lines. You can use any value from 18 to 100.

/WIDTH:n

Specifies that the terminal screen width should be set to n columns. You can use any value from 20 to 255. For a VT100-, VT200-, or VT300 series terminal, n is typically either 80 or 132.

/WRAP

Tells the debugger to wrap output text in predefined display OUT at the column specified by the /WIDTH qualifier. If you do not specify /WIDTH in the current command, /WRAP defaults to the %WIDTH setting.

Description

The SET TERMINAL command enables you to define the portion of the screen that the debugger has available for formatting screen output.

This command is useful with VT100-, VT200-, or VT300-series terminals, where you can set the screen width to typically 80 or 132 columns. It is also useful with workstations, where you can modify the size of the terminal-emulator window that the debugger uses.

You must specify at least one qualifier. You can specify all. The /PAGE and /WIDTH qualifiers each require a value.

When you enter the SET TERMINAL command, all display window definitions are automatically adjusted to reflect the new screen dimensions. For example, RH1 changes dimensions proportionally to remain in the top right half of the screen.

Similarly, all "dynamic" display windows are automatically adjusted to maintain their relative proportions. Note that all display windows are dynamic unless referenced with the DISPLAY/NODYNAMIC command. In that case, the display window retains its current dimensions after subsequent SET TERMINAL commands. However, you can use the DISPLAY command to reconfigure the display window (you can also use keypad-key combinations, such as BLUE-MINUS, to enter predefined DISPLAY commands).

Related commands:

DISPLAY/[NO]DYNAMIC
EXPAND
(SET,SHOW,CANCEL) WINDOW
SHOW TERMINAL

Example


DBG> SET TERMINAL/WIDTH:132
      

This command specifies that the terminal screen width be set to 132 columns.


Previous Next Contents Index