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? 5 2184
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
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
"lawrencele e" <la*********@di scussions.micro soft.com> wrote in message
news:7E******** *************** ***********@mic rosoft.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?
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*******@ante k.cz.no.spam> wrote in message
news:%2******** *******@TK2MSFT NGP12.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
"lawrencele e" <la*********@di scussions.micro soft.com> wrote in message news:7E******** *************** ***********@mic rosoft.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?
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*******@ante k.cz.no.spam> wrote in message news:%2******** *******@TK2MSFT NGP12.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
"lawrencele e" <la*********@di scussions.micro soft.com> wrote in message news:7E******** *************** ***********@mic rosoft.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?
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
"lawrencele e" <la*********@di scussions.micro soft.com> wrote in message
news:31******** *************** ***********@mic rosoft.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*******@ante k.cz.no.spam> wrote in message news:%2******** *******@TK2MSFT NGP12.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 > > > "lawrencele e" <la*********@di scussions.micro soft.com> wrote in message > news:7E******** *************** ***********@mic rosoft.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? > > This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: blugus |
last post by:
Hi Guys,
I've been try to use Dinkum STL library.
It workes well first, but report memory leak in MFC Debug Mode.
I use Dinkum Unabridged Library for VC++ V4.02, MSVC6, WIN2000 SERVER.
I made a dialog based program by MSVC6, inserted simple code to use
Dinkum STL Library, and added simple code like this.
|
by: Gavin Kreuiter |
last post by:
I am looking for some advice on how to debug a program when the
debugger "print" command actually clears the corruption. This is not
the usual non-initialised memory problem, because the program aborts
with a SIGBUS inside the debugger as well. But when I use the print
command inside the debugger, the program completes normally.
I am...
|
by: Anil Aksay |
last post by:
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.
|
by: Brian Mitchell |
last post by:
Hello, I am using several queue collections to store some data (about 20,000
entries split across 2 collections). When I view the process in the Windows
task manager I can see the memory increasing when the collections start to
fill. However, when I stop the thread and clear the queues (and set the
instance to nothing) the memory does not drop...
|
by: natwar |
last post by:
I have a very strange problem.
When I set a breakpoint, I get a MEMORY error when the line is reached.
The program run without any problem when I disable breakpoints.
VS2003, vb .net
I could not understand why I am getting this kind of error. Till very
recently this was runinng ok. Could It be due to memory hardware
problem.
| |
by: Piotrek |
last post by:
Hi all.
I have a web app, in which I use frames. My main frameset consists of
three inner frames.
When some button is pressed in frame A, then content of frame B is
reloaded. I am using such code to achieve this:
string strRedirect;
strRedirect = "<script language='Javascript'>";
strRedirect +=...
|
by: Pawel |
last post by:
Hallo. I have the following problem.
I am debugging large code I am not familiar with. I noticed that
memory location, for example funnyObject.field, changes somewhere and
I do not know where, thus I do not know where to set the breakpoint.
Do You know an efficient way of finding places in the code where value
of memory location changes?
...
|
by: Jonathan Wilson |
last post by:
I have an app written in native C++ using Visual C++ 2005 (pro edition).
How can I set a memory breakpoint in the debugger for this app?
Or alternatively, is there another source level debugger I can use that
will let me set such breakpoints?
Note that moving to Visual Studio 2008 is not an option.
|
by: Ed |
last post by:
Hi, guys,
In Visual Studio C++ 2008, I can add an item "*(int*)0x00385fa0" in
Watch window to catch the value in that memory address. The value
evaluation is OK.
The question is how can I know when the value in that address was
changed. In the debugging mode, I want the program to be paused autoly
when the value in that address was changed....
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it. ...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
| |
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...
| |