Creates an action point at a source location using an expression. (See “Action Point API” for writing expressions.) When the action point is hit, tvscript can trigger one or more actions. Add one –create_watchpoint command-line option for each action point.Performs an action when an event occurs. Events represent an unanticipated condition, such as free_not_allocated in the Memory Debugger. You can use more than one –event_action command-line option when invoking tvscript.Here is how you enter an event_action_list :
Memory debugging event Program attempted to free a block using an incorrect address. The memory allocator returned a block not in the heap; the heap may be corrupt. An allocation either failed or returned NULL; this usually means that the system is out of memory. The memory allocator returned a misaligned block; the heap may be corrupt. Program supplied an invalid alignment argument to the heap manager. The memory allocator returned a block currently being used; the heap may be corrupt. Program attempted to free an address that is not in the heap. Program attempted to reallocate an address that is not in the heap.Program attempted to access memory beyond the end of an allocated block.Program attempted to access memory before the start of an allocated block.Program attempted to access a block of memory after it has been deallocated.Program attempted to access memory beyond the end of a deallocated block.Program attempted to access memory before the start of a deallocated block. Source code debugging event
Memory debugging actions Checks all guard blocks and write violations into the log file. Generates and saves an HTML version of the Heap Status Source View Report. Generates and saves a text version of the Heap Status Source View Report. Source code debugging actions –level level-num sets the level at which information starts being logged.num_levels restricts output to this number of levels in the call stack.If you do not set a level, tvscript displays all levels in the call stack.options is one or more of the following:–[no]show_arguments
–[no]show_fp
–[no]show_fp_registers
–[no]show_image
–[no]show_locals
–[no]show_pc
–[no]show_registers Writes the value of a variable or an expression into the log file. If the variable is an array, the –slice option limits the amount of data defined by slice_exp. A slice expression is a way to define the slice, such as var[100:130] in C and C++. (This displays all values from var[100] to var[130].) To display every fourth value, add an additional argument; for example, var[100:130:4]. For additional information, see Chapter 14 “Examining Arrays” in the TotalView User Guide.By default, tvscript writes all of the information in the following table to the log file. You can exclude information by using one of the following specifiers:
Type of Specifier General display specifiers Does not show the system process ID with process information Does not show the rank of a process, which is shown only for a parallel process Does not show the thread ID with process information Memory debugging display specifiers Does not show the memory block start and end addresses Does not show the Red Zone entries for allocations (and deallocations) for the address spaceEnables memory debugging and memory event notification. This option is required with any option that begins with –mem. These options are TotalView command line options, as they can be invoked directly by TotalView.Sets the low memory threshold amount. When memory falls below this amount, an event is fired.Paints memory blocks with a bit pattern when a memory is allocated or deallocated.Paints memory blocks with a bit pattern when a memory block is deallocated.Defines the memory allocations ranges for which Red Zones are in effect. Ranges can be specified as follows:Names a file containing tvscript API calls and Tcl callback procedures that you create.tvscript Example:
Creates an action point at the beginning of method1. When tvscript reaches that breakpoint, it logs a backtrace and the method’s arguments.
Creates an action point at line 37 of method2. When tvscript reaches this line, it logs a backtrace and the local variables. The backtrace information starts at level 1.
Logs the backtrace, the current routine’s arguments, and its local variables when an error event occurs.
Limits tvscript execution time to 30 sections.
Rogue Wave Software, Inc. |
Voice: (303) 473-9118 |
rwonlinedocs@roguewave.com |