30.01.2013 Views

TotalView Users Guide - CI Wiki

TotalView Users Guide - CI Wiki

TotalView Users Guide - CI Wiki

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Defining Eval Points and Conditional Breakpoints<br />

Platform Address Range<br />

HP Alpha Tru64 UNIX 0xFFFFF00000 – 0xFFFFFFFFFF<br />

IBM AIX (-q32) 0xEFF00000 – 0xEFFFFFFF<br />

IBM AIX (-q64) 0x07f0000000000000 –<br />

0x07ffffffffffffff<br />

SGI IRIX (–n32) 0x4FF00000 – 0x4FFFFFFF<br />

SGI IRIX (–64) 0x8FF00000 – 0x8FFFFFFF<br />

You can only allocate dynamic patch space for the computers listed in this table.<br />

If the default address range conflicts with your program, or you would like<br />

to change the size of the dynamically allocated patch space, you can<br />

change the following:<br />

� Patch space base address by using the –patch_area_base command-line option.<br />

� Patch space length by using the –patch_area_length command-line option.<br />

Allocating Static Patch Space<br />

<strong>TotalView</strong> can statically allocate patch space if you add a specially named<br />

array to your program. When <strong>TotalView</strong> needs to use patch space, it uses<br />

the space created for this array.<br />

You can include, for example, a 1 MB statically allocated patch space in<br />

your program by adding the TVDB_patch_base_address data object in a C<br />

module. Because this object must be 8-byte aligned, declare it as an array<br />

of doubles; for example:<br />

/* 1 megabyte == size TV expects */<br />

#define PATCH_LEN 0x100000<br />

double TVDB_patch_base_address [PATCH_LEN /<br />

sizeof(double)]<br />

If you need to use a static patch space size that differs from the 1 MB default,<br />

you must use assembler language. The following table shows sample assembler<br />

code for three platforms that support compiled patch points:<br />

Platform Assembler Code<br />

HP Alpha Tru64 UNIX .data<br />

.align 3<br />

.globl TVDB_patch_base_address<br />

.globl TVDB_patch_end_address<br />

TVDB_patch_base_address:<br />

.byte 0x00 : PATCH_SIZE<br />

TVDB_patch_end_address:<br />

372 Chapter 16: Setting Action Points

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!