Memory Write Breakpoint in vc7

  • Thread starter Thread starter Anil Aksay
  • Start date Start date
A

Anil Aksay

I need to put a breakpoint when a particular memory location is
written. To be more specific I want to know when 0 is written onto that
memory location. Is there a way to do it in vc7?

Regards,

Anil.
 
I need to put a breakpoint when a particular memory location is
written. To be more specific I want to know when 0 is written onto that
memory location. Is there a way to do it in vc7?

Anil,

Use the Data tab page of the New Breakpoint dialog.

Dave
 
Data tab page requires a variable in some context. There is a local
variable in some function but it is overwritten by someone else. I've
debugged and everytime that function is called variable has the same
address. Code is as follows:

int variable = a/b;
ASSERT(variable);
c = d / variable;

when assert break the application, I've checked that a/b result is 14,
however the variable has 0 inside. The address of the variable is
0x975f328. (everytime we enter that code segment the address is same).
And assert only stops occasionally.

So I want to put a breakpoint when that variable is overwritten by
another thread.

In the new Data tab page there are following items:

Variable:
Context:
Condition:

I've tried to write something like:

(* ((int *)(0x975f328))) == 0

in either condition or variable edit box but it refuses that it is not
proper.

What can I do about it?

Anil.



-David Lowndes'in mesaji: > >I need to put a breakpoint when a
particular memory location is
 
actually i've managed to put the breakpoint but since it is a local
variable address.. many places in the application use that memory quite
often. now i need to find a better way to find who actually wrote after
variable is defined and before its context finishes.

any suggestions?

-Anil Aksay'in mesaji: > Data tab page requires a variable in some
context. There is a local
 
any suggestions?

If you're not already doing these, I'd ensure I had all the compiler
run-time checks enabled, compile at the highest warning level, and if
they don't show anything, try a product such as bounds checker or
purify.

Dave
 
Back
Top