Howto break at memory 0xxxx write? 
Author Message
 Howto break at memory 0xxxx write?

Hi
Is it possible to set a break point at a memory location when it is accessed
(read or written)?
/Dev


Mon, 06 Jun 2005 21:57:45 GMT  
 Howto break at memory 0xxxx write?
Yes and no.
If you open the Edit | Breakpoints menu, you can select the second tab.  
Enter the memory address, and change the edit box below that to the size
of the memory block.  Push the button to set the breakpoint.  Now, when
you debug the program (it will run much slower, so be patient), it will
break if any byte in the block you specified is changed.  But it will
not break if the memory is only read.


Quote:
> Hi
> Is it possible to set a break point at a memory location when it is accessed
> (read or written)?
> /Dev



Tue, 07 Jun 2005 08:54:27 GMT  
 Howto break at memory 0xxxx write?

Quote:

>> Is it possible to set a break point at a memory location when it is
>> accessed (read or written)?

> Yes and no.
> If you open the Edit | Breakpoints menu, you can select the second
> tab.  Enter the memory address, and change the edit box below that to
> the size of the memory block.  Push the button to set the breakpoint.
> Now, when you debug the program (it will run much slower, so be
> patient),

No, this is (today) not correct!
If you have at least PI processor the de{*filter*} uses the processor
provided DR0-4 register! So there is no execution deplay if you specify
up to 4 data breakpoints.

You are right if you specify more that 4 data breakpoints.

Quote:
> it will break if any byte in the block you specified is
> changed.  But it will not break if the memory is only read.

This is true for DevStudio.

If you need a breakpoint at memory-read of an address you have to use the
debugging tools from MS. Here you can use the full features of the I32
processor.
You can download the WinDbg at: http://www.*-*-*.com/

In the de{*filter*} you can use the BA (break on access) command to sepcify
the breakpoint (execute / read/write / write / i/o)

--
Greetings
  Jochen

  Do you need a memory-leak finder ?
  http://www.*-*-*.com/



Tue, 07 Jun 2005 14:54:13 GMT  
 Howto break at memory 0xxxx write?

As far as I know, only WinDbg can do this. VS .net de{*filter*} doesn't support
this.

Thanks,
Tony
--------------------

Quote:
>Subject: Re: Howto break at memory 0xxxx write?




Quote:

>User-Agent: Xnews/5.04.25
>X-Face:

#TA[Jae"bdx-+QGJx=d8Gi"CujilO8C4^r,6rco%?.Xk?;y`M?j&$Pmm>%[c!9kDW7m]C~N
bWutCC$vPTUW-"icn`nX:[F"N;mB9}]ABU?Y]tZwmSP{]!

Quote:
>Newsgroups: microsoft.public.vc.de{*filter*}
>Date: Thu, 19 Dec 2002 22:54:13 -0800
>NNTP-Posting-Host: taurus7.de.ihost.com 194.196.235.34
>Lines: 1        
>Path: cpmsftngxa09!TK2MSFTNGP08!TK2MSFTNGP09
>Xref: cpmsftngxa09 microsoft.public.vc.de{*filter*}:15124
>X-Tomcat-NG: microsoft.public.vc.de{*filter*}


>>> Is it possible to set a break point at a memory location when it is
>>> accessed (read or written)?

>> Yes and no.
>> If you open the Edit | Breakpoints menu, you can select the second
>> tab.  Enter the memory address, and change the edit box below that to
>> the size of the memory block.  Push the button to set the breakpoint.
>> Now, when you debug the program (it will run much slower, so be
>> patient),

>No, this is (today) not correct!
>If you have at least PI processor the de{*filter*} uses the processor
>provided DR0-4 register! So there is no execution deplay if you specify
>up to 4 data breakpoints.

>You are right if you specify more that 4 data breakpoints.

>> it will break if any byte in the block you specified is
>> changed.  But it will not break if the memory is only read.

>This is true for DevStudio.

>If you need a breakpoint at memory-read of an address you have to use the
>debugging tools from MS. Here you can use the full features of the I32
>processor.
>You can download the WinDbg at: http://www.*-*-*.com/

>In the de{*filter*} you can use the BA (break on access) command to sepcify
>the breakpoint (execute / read/write / write / i/o)

>--
>Greetings
>  Jochen

>  Do you need a memory-leak finder ?
>   http://www.*-*-*.com/

--

This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.*-*-*.com/



Wed, 19 Oct 2005 05:07:48 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. lint on Altos 2000 is BROKE BROKE BROKE!

2. Can I put a break on a write to a variable

3. break on write

4. Write Protect file or folder howto ???

5. Howto write multilingual programs?

6. Howto write to eventlog in simple C?

7. HowTo: Write a system tray / taskbar status area app

8. STL: Howto know the byte count of write() (like pcount())

9. HowTo: Read and Write with WebClient ?

10. Howto use mmap'ed and shared memory ?

11. shared memory, signal & the ace break

12. Can't Break on Sequential Memory Allocation

 

 
Powered by phpBB® Forum Software