Hello all, Our application code contains a number of C functions that are designed to only be called by developers from the VS debugger. These functions are never called directly by the application. Problem is that the VS2005 linker seems to remove these functions from the exe image at link time, so that they cannot be called from the debugger. The VS2003 linker did not to this and the functions were available. So, is there a flag to stop the linker removing these functions? Cheers, John
JohnD wrote: > Hello all, > > Our application code contains a number of C functions that are designed > to only be called by developers from the VS debugger. These functions > are never called directly by the application. > > Problem is that the VS2005 linker seems to remove these functions from > the exe image at link time, so that they cannot be called from the > debugger. The VS2003 linker did not to this and the functions were > available. > > So, is there a flag to stop the linker removing these functions? > > > Cheers, > > John > > http://msdn.microsoft.com/en-us/library/bxwfs976(VS.80).aspx
Hi Bob, Interesting, but I do have /DEBUG set in the linker options, so the linker should be leaving the functions. I'll investigate a littler further but I think "strange things are happening". /john "BobF" <nothanks@spamfree.world> wrote in message news:%23ZeDX60EJHA.4336@TK2MSFTNGP05.phx.gbl... > JohnD wrote: >> Hello all, >> >> Our application code contains a number of C functions that are designed >> to only be called by developers from the VS debugger. These functions are >> never called directly by the application. >> >> Problem is that the VS2005 linker seems to remove these functions from >> the exe image at link time, so that they cannot be called from the >> debugger. The VS2003 linker did not to this and the functions were >> available. >> >> So, is there a flag to stop the linker removing these functions? >> >> >> Cheers, >> >> John >> >> > > http://msdn.microsoft.com/en-us/library/bxwfs976(VS.80).aspx
JohnD wrote: > Hi Bob, > > Interesting, but I do have /DEBUG set in the linker options, so the > linker should be leaving the functions. I'll investigate a littler > further but I think "strange things are happening". > > /john > That should work fine UNLESS you also have /OPT:REF explicitly set. Explicitly setting /OPT:REF will override what /DEBUG does with this option by default. > "BobF" <nothanks@spamfree.world> wrote in message > news:%23ZeDX60EJHA.4336@TK2MSFTNGP05.phx.gbl... >> JohnD wrote: >>> Hello all, >>> >>> Our application code contains a number of C functions that are >>> designed to only be called by developers from the VS debugger. These >>> functions are never called directly by the application. >>> >>> Problem is that the VS2005 linker seems to remove these functions >>> from the exe image at link time, so that they cannot be called from >>> the debugger. The VS2003 linker did not to this and the functions >>> were available. >>> >>> So, is there a flag to stop the linker removing these functions? >>> >>> >>> Cheers, >>> >>> John >>> >>> >> >> http://msdn.microsoft.com/en-us/library/bxwfs976(VS.80).aspx >
Hmm, Seems I need both /DEBUG and /OPT:NOREF. I wonder if there's another setting that I have that is affecting this too. How odd. /john "BobF" <nothanks@spamfree.world> wrote in message news:uJGA2n1EJHA.1460@TK2MSFTNGP03.phx.gbl... > JohnD wrote: >> Hi Bob, >> >> Interesting, but I do have /DEBUG set in the linker options, so the >> linker should be leaving the functions. I'll investigate a littler >> further but I think "strange things are happening". >> >> /john >> > > That should work fine UNLESS you also have /OPT:REF explicitly set. > Explicitly setting /OPT:REF will override what /DEBUG does with this > option by default. > > >> "BobF" <nothanks@spamfree.world> wrote in message >> news:%23ZeDX60EJHA.4336@TK2MSFTNGP05.phx.gbl... >>> JohnD wrote: >>>> Hello all, >>>> >>>> Our application code contains a number of C functions that are designed >>>> to only be called by developers from the VS debugger. These functions >>>> are never called directly by the application. >>>> >>>> Problem is that the VS2005 linker seems to remove these functions from >>>> the exe image at link time, so that they cannot be called from the >>>> debugger. The VS2003 linker did not to this and the functions were >>>> available. >>>> >>>> So, is there a flag to stop the linker removing these functions? >>>> >>>> >>>> Cheers, >>>> >>>> John >>>> >>>> >>> >>> http://msdn.microsoft.com/en-us/library/bxwfs976(VS.80).aspx >>