Using Watchpoints

TotalView lets you monitor the changes that occur to memory locations by creating a special kind of action point called a data watchpoint, or just watchpoint for short. Watchpoints are most often used to find a statement in your program that is writing to a "stray" memory location. This can occur, for example, when processes share memory and more than one process writes to the same location. It can also occur when your program writes off the end of an array or when your program has a dangling pointer.

TotalView watchpoints are called modify watchpoints because TotalView only triggers a watchpoint when your program modifies a memory location. If a program writes a value into a location that is the same as what is already stored, TotalView does not trigger the watchpoint because the location's value did not change.

For example, if location 0x10000 has a value of zero and your program writes a zero into this location, TotalView does not trigger the watchpoint even though your program wrote data into the memory location. See Triggering Watchpoints for more details on when watchpoints trigger.

TotalView also lets you create conditional watchpoints. A conditional watchpoint is similar to an evaluation point in that TotalView will evaluate an expression when the watchpoint triggers. You can use conditional watchpoints for a number of purposes. For example, you can use it to test if a value changes its sign--that is, it becomes positive or negative--or if a value moves above or below some threshold value.

 
 
 
 
support@etnus.com
Copyright © 2001, Etnus, LLC. All rights reserved.
Version 5.0