HPlogo HP/DDE Debugger User's Guide: HP 9000 Series 700/800 Computers > Chapter 5 Using Debugger Commands

Using Reserved Identifiers and Special Macros

» 

Technical documentation

Complete book in PDF

 » Table of Contents

 » Glossary

 » Index

The debugger reserves certain identifier and macro names for special purposes. Table 5-1 “Reserved Identifiers and Special Macros” contains a complete list of reserved identifiers and special macros. You can use these reserved identifiers and special macros for several operations, including the following:

  • Specifying commands that the debugger is to execute in specific situations, such as after the invocation of the target program or after a fault occurs.

    For example, after loading a target program, the debugger checks the `after_debug macro and executes any commands assigned to it.

    By default, `after_debug is undefined. Use the alias command to define it. For example, the following sets the `after_debug macro to delete the intercept for the SIGVTALRM signal after a target program is loaded:

    alias `after_debug delete intercept signal SIGVTALRM
  • Identifying an environment other than the current environment (the target program procedure which the debugger refers to when evaluating expressions).

    For example, `env(+n | -n) is useful for changing locations on the call/return stack. The following command changes the environment up one frame on the stack:

    environment `env(-1)
  • Referring explicitly to a module name in a particular image, a language-defined symbol name, or a variable that you create with the declare command.

    For example, if you use the declare command to create temporary variables, you can use `declared to refer to them. The following command would list all the temporary variables that you defined:

    list blocks `declared -full

Table 5-1 Reserved Identifiers and Special Macros

Reserved Identifiers and Special Macros

Function

`after_debug

1Specifies debugger commands that the debugger executes after invoking the target program. See the debug command entry in the online command reference for details.

`after_fault

1Specifies debugger commands that the debugger executes if the target program faults.

`amb

Identifies an overloaded C++ function. See online help on C++ debugging for details.

`asm

1Identifies the appropriate assembly language manager for the target machine. Defined in the target manager startup file.

`command

1Contains the most recently entered command string. A command string can be a single debugger command or several debugger commands separated by semicolons. All characters up to the carriage return will be repeated.

`cr

1Specifies debugger commands that the debugger executes when you enter Return on an empty command line. By default, `cr is set to `command which causes the most recently entered command to be invoked.

1Indicates that the entry is a macro.

`declared

Specifies the outer block where the debugger stores variables that you create using the declare command. You can use `declared to refer explicitly to variables created with declare.

`env(+n | -n)

If you do not specify n, `env refers to the current environment (that is, the target program procedure which the debugger refers to when evaluating expressions). If you do specify n, `env refers to an environment relative to the current environment. See Chapter 7 “Identifying Program Objects ” for more information.

`image(name)

Associates a module name with a particular image. This is useful when your program consists of more than one image (that is, when your program uses dynamically loaded libraries) and multiple images use modules with the same name. See “Image Qualified Names ” for details.

`label(statement_label)

Uses a label in the source code to identify a line. Any alphanumeric character string that is a valid label in the source language is a valid argument. Often used to specify the location of breakpoints.

`long(expression)

Converts the value of expression to a 32-bit integer type.

`main(n)

Identifies the frame that is n frames away from the oldest frame on the call/return stack. If you don't specify n, `main specifies the oldest frame on the call/return stack. See “Frame Block Qualified Names ” for details.

`predefined(lang_type, obj_type)

Specifies special blocks where the debugger stores names defined by programming languages (lang_type) and object type (obj_type). You can use `predefined to refer explicitly to a language-defined symbol name. See Appendix C “Target Managers ” and Appendix D “Object Managers ” for information on how to specify lang_type and obj_type.

`run(n)

Identifies the frame that is n frames away from the most recent frame on the call/return stack. If you do not specify n, `run specifies the location at which the program stopped. See “Frame Block Qualified Names ” for details.

`short(expression)

Transfers the value of expression to a 16-bit integer type.

`thread(n)

Specifies a thread according to the target manager-defined identifier, n. Use the command list threads to display threads and their identifiers.

`va(address)

Specifies that address is a machine location. `va is useful for printing or changing the contents of a machine location. See “Assembly Level Debugging ” for details.