Re: bug in visual studio .net 2003 - breakpoints and memcpy



I think your CC will all be back as soon you perform the step operation,
execpt for the possible breakpoint at the current location.

BTW, converting a function pointer to void * is illegal in C and C++.

"Gareth Haslip" <gareth.haslip@xxxxxxxxx> wrote in message
news:CFYBe.197$bT4.34@xxxxxxxxxxxxxxxxxxxxxxx
> hi,
>
> this is a funny one, which took me hours to realise.
>
>
> __declspec( naked )void asmFoo()
> {
> push EAX;
> pop EAX;
> }
>
> now do this:
>
> int main
> {
> RtlCopyMemory(newLocation, asmFoo, sizeofasmFoo);
> }
>
> and stick an IDE breakpoint on the line push EAX.
>
> What happens when you run it? Well the opcodes for push EAX gets
> corrupted by a CC (= int 3).
>
> This is surely a bug, the ide shouldnt be doing this when you step through
> the code?? It should remove the breakpoint for the purposes of memcpy??
>
> Thanks,
>
> Gareth
>


.



Relevant Pages