Re: Mysteriously changing variable
From: Altman (NotGiven_at_SickOfSpam.com)
Date: 12/03/04
- Next message: Ronald Laeremans [MSFT]: "Re: Un-ringing the bell: making parent methods unavailable to children"
- Previous message: Mattias Sjögren: "Re: C++/CLI System::String question"
- In reply to: Oleg Starodumov: "Re: Mysteriously changing variable"
- Next in thread: Oleg Starodumov: "Re: Mysteriously changing variable"
- Reply: Oleg Starodumov: "Re: Mysteriously changing variable"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 3 Dec 2004 15:41:39 -0600
"Also compile the DLL with /GZ compiler option"
Where is this option and what does it do?
"Oleg Starodumov" <com-dot-debuginfo-at-oleg> wrote in message
news:u2CnLMR2EHA.3468@TK2MSFTNGP14.phx.gbl...
>
>> Actually com dll is the only programing I have done in C++ so I have
>> never
>> used breakpoints. But in the other languages I've used you can only use
>> breakpoints in the IDE. So how do you run the dll in your IDE?
>>
>
> How to debug a DLL:
> http://msdn.microsoft.com/library/en-us/vccore98/html/_core_methods_for_debugging_dlls.asp
>
> Then, after you have reproduced the problem again,
> set a data breakpoint on the variable that changes unexpectedly:
>
> 1. Set a normal breakpoint in the function that contains the variable.
> Wait until this breakpoint is hit.
>
> 2. Obtain the address of the variable (e.g. by entering "&l_MyVariable"
> in Watch window).
>
> 3. Open Data tab in Breakpoints window
> (Edit | Breakpoints | Data)
>
> 4. Enter the address of the variable into "Enter the expression to be
> evaluated" field,
> and enter 4 into "... the number of elements to watch ..." field.
>
> 5. Step through the function and wait until the data breakpoint is hit.
> If it is hit, the debugger can stop at the line that wrote into the
> variable,
> or on the next line after it.
>
> Note that after the function with the local variable returns, you should
> deactivate
> the data breakpoint, because its location on the stack will be reused
> and something else can be stored there, thus triggering the breakpoint
> again,
> which will be a "false alarm".
>
> Also compile the DLL with /GZ compiler option.
>
> Regards,
> Oleg
>
>
>
>
>
>
- Next message: Ronald Laeremans [MSFT]: "Re: Un-ringing the bell: making parent methods unavailable to children"
- Previous message: Mattias Sjögren: "Re: C++/CLI System::String question"
- In reply to: Oleg Starodumov: "Re: Mysteriously changing variable"
- Next in thread: Oleg Starodumov: "Re: Mysteriously changing variable"
- Reply: Oleg Starodumov: "Re: Mysteriously changing variable"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|