TotalView User Guide : Part V: Debugging : Setting Action Points : Defining Eval Points and Conditional Breakpoints : Allocating Patch Space for Compiled Expressions : Allocating Static Patch Space

Allocating Static Patch Space
TotalView can statically allocate patch space if you add a specially named array to your program. When TotalView needs to use patch space, it uses the space created for this array.
You can include, for example, a 1 MB statically allocated patch space in your program by adding the TVDB_patch_base_address data object in a C module. Because this object must be 8-byte aligned, declare it as an array of doubles; for example:
/* 1 megabyte == size TV expects */
#define PATCH_LEN 0x100000
double TVDB_patch_base_address [PATCH_LEN / sizeof(double)]
If you need to use a static patch space size that differs from the 1 MB default, you must use assembler language. The following table shows sample assembler code for IBM AIX:
 
.csect .data{RW}, 3
.globl TVDB_patch_base_address
.globl TVDB_patch_end_address
.space PATCH_SIZE
To use the static patch space assembler code:
1
2
Replace the PATCH_SIZE tag with the decimal number of bytes you want. This value must be a multiple of 8.
3
cc –c tvdb_patch_space.s
4
Link the resulting tvdb_patch_space.o into your program.

Rogue Wave Software, Inc.
Voice: (303) 473-9118
rwonlinedocs@roguewave.com