Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / June 2005

Tip: Looking for answers? Try searching our database.

Memory Write Breakpoint in vc7

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Anil Aksay - 24 Jun 2005 09:25 GMT
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.
David Lowndes - 24 Jun 2005 10:50 GMT
>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
Anil Aksay - 24 Jun 2005 12:06 GMT
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
> >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?
[quoted text clipped - 4 lines]
>
> Dave
Anil Aksay - 24 Jun 2005 12:16 GMT
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
> variable in some function but it is overwritten by someone else. I've
> debugged and everytime that function is called variable has the same
[quoted text clipped - 39 lines]
> >
> > Dave
David Lowndes - 25 Jun 2005 01:10 GMT
>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
Signature

MVP VC++ FAQ: http://www.mvps.org/vcfaq


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.