468,507 Members | 1,511 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,507 developers. It's quick & easy.

How to set a memory breakpoint in vc7?

My purpose is to know which code reads value from a certain address. So I want to set a memory breakpoint and when cpu reads from the address, the breakpoint will be hit. But in the "Data breakpoint" in vc7, there are only two kinds of condition: "is true" and "has changed". How can I do?
Nov 17 '05 #1
5 2019
lawrencelee wrote:
My purpose is to know which code reads value from a certain address. So I want to set a memory breakpoint and when cpu reads from the address, the breakpoint will be hit. But in the "Data breakpoint" in vc7, there are only two kinds of condition: "is true" and "has changed". How can I do?


I would suggest to use no condition at all.

However, I did not know about data breakpoints and I have a question to
somebody who knows about how is this done on Intel processors.

Roman
Nov 17 '05 #2
Hi,

you need hardware breakpoints, but VC doesn't use them. With little effort
you can use them from ;you code, they impose no overhead on code execution.
See here http://www.morearty.com/code/breakpoint/.

Regards, Jan
"lawrencelee" <la*********@discussions.microsoft.com> wrote in message
news:7E**********************************@microsof t.com...
My purpose is to know which code reads value from a certain address. So I

want to set a memory breakpoint and when cpu reads from the address, the
breakpoint will be hit. But in the "Data breakpoint" in vc7, there are only
two kinds of condition: "is true" and "has changed". How can I do?
Nov 17 '05 #3
Actually the VS debugger's data breakpoints are done as hardware
breakpoints. Their used to be emulated data breakpoints as well but we
removed them altogether.

Ronald Laeremans
Visual C++ team

"Jan Bares" <ja*******@antek.cz.no.spam> wrote in message
news:%2***************@TK2MSFTNGP12.phx.gbl...
Hi,

you need hardware breakpoints, but VC doesn't use them. With little effort
you can use them from ;you code, they impose no overhead on code
execution.
See here http://www.morearty.com/code/breakpoint/.

Regards, Jan
"lawrencelee" <la*********@discussions.microsoft.com> wrote in message
news:7E**********************************@microsof t.com...
My purpose is to know which code reads value from a certain address. So I

want to set a memory breakpoint and when cpu reads from the address, the
breakpoint will be hit. But in the "Data breakpoint" in vc7, there are
only
two kinds of condition: "is true" and "has changed". How can I do?

Nov 17 '05 #4
Yes, I need hardware breakpoint. In other debuger, like windbg, gdb, it's very easy to set a hardware breakpoint. It's strange why vc can't do it distinctly.

So how can I set a "read" hardware breakpoint????

"Ronald Laeremans [MSFT]" wrote:
Actually the VS debugger's data breakpoints are done as hardware
breakpoints. Their used to be emulated data breakpoints as well but we
removed them altogether.

Ronald Laeremans
Visual C++ team

"Jan Bares" <ja*******@antek.cz.no.spam> wrote in message
news:%2***************@TK2MSFTNGP12.phx.gbl...
Hi,

you need hardware breakpoints, but VC doesn't use them. With little effort
you can use them from ;you code, they impose no overhead on code
execution.
See here http://www.morearty.com/code/breakpoint/.

Regards, Jan
"lawrencelee" <la*********@discussions.microsoft.com> wrote in message
news:7E**********************************@microsof t.com...
My purpose is to know which code reads value from a certain address. So I

want to set a memory breakpoint and when cpu reads from the address, the
breakpoint will be hit. But in the "Data breakpoint" in vc7, there are
only
two kinds of condition: "is true" and "has changed". How can I do?


Nov 17 '05 #5
The VS debugger only supports HW write breakpoints, not read breakpoints. I
entered a suggestion in the bug database that we support read breakpoints as
well.

Ronald

"lawrencelee" <la*********@discussions.microsoft.com> wrote in message
news:31**********************************@microsof t.com...
Yes, I need hardware breakpoint. In other debuger, like windbg, gdb, it's
very easy to set a hardware breakpoint. It's strange why vc can't do it
distinctly.

So how can I set a "read" hardware breakpoint????

"Ronald Laeremans [MSFT]" wrote:
Actually the VS debugger's data breakpoints are done as hardware
breakpoints. Their used to be emulated data breakpoints as well but we
removed them altogether.

Ronald Laeremans
Visual C++ team

"Jan Bares" <ja*******@antek.cz.no.spam> wrote in message
news:%2***************@TK2MSFTNGP12.phx.gbl...
> Hi,
>
> you need hardware breakpoints, but VC doesn't use them. With little
> effort
> you can use them from ;you code, they impose no overhead on code
> execution.
> See here http://www.morearty.com/code/breakpoint/.
>
> Regards, Jan
>
>
> "lawrencelee" <la*********@discussions.microsoft.com> wrote in message
> news:7E**********************************@microsof t.com...
>> My purpose is to know which code reads value from a certain address.
>> So I
> want to set a memory breakpoint and when cpu reads from the address,
> the
> breakpoint will be hit. But in the "Data breakpoint" in vc7, there are
> only
> two kinds of condition: "is true" and "has changed". How can I do?
>
>


Nov 17 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by blugus | last post: by
3 posts views Thread by Gavin Kreuiter | last post: by
4 posts views Thread by Anil Aksay | last post: by
11 posts views Thread by Brian Mitchell | last post: by
1 post views Thread by natwar | last post: by
14 posts views Thread by Piotrek | last post: by
2 posts views Thread by Pawel | last post: by
reply views Thread by NPC403 | last post: by
3 posts views Thread by gieforce | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.