Re: Mysteriously changing variable

From: Altman (NotGiven_at_SickOfSpam.com)
Date: 12/03/04


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
>
>
>
>
>
>



Relevant Pages

  • Re: Breakpoint not hit
    ... > another DLL. ... > wonder how one would specify which DLL the breakpoint is to be set in? ... (IMO this is the most error-prone moment in library debugging) ... * Check that the DLLs are built with debug information (default Debug configuration ...
    (microsoft.public.vc.language)
  • Re: Breakpoint not hit
    ... > another DLL. ... > wonder how one would specify which DLL the breakpoint is to be set in? ... (IMO this is the most error-prone moment in library debugging) ... * Check that the DLLs are built with debug information (default Debug configuration ...
    (microsoft.public.vc.debugger)
  • Breakpoints and Visual Studio 2005
    ... The DLL compiles fine, gets registered automatically, gets referenced correctly when the C# program compiles, and gets called correctly during execution. ... During execution of the DLL, a call to the ATL/MFC shared library method CImage::Create returns FALSE.So I tried to set a breakpoint before the call. ... Visual Studio displays a brown dot saying that the breakpoint is valid. ...
    (microsoft.public.dotnet.languages.vc)
  • Re: ms word addin doesent load (HELP) 1235711
    ... I ordered a virtual machin and I blive I ll have it on sunday. ... breakpoint to the line of the messagebox then the breakpoint is ignored even ... Does it imply that my dll is corrupted and it is causing problems when being ... Is there a way to reset all office settings without reinstalling it. ...
    (microsoft.public.office.developer.com.add_ins)
  • Re: Debugger skipping new code ?????
    ... Check if you have set a breakpoint in an explicitly loaded DLL ... new code when debugging. ... debugger jumps to the next line of code I haven't added and debugs ...
    (microsoft.public.vc.debugger)