SlickEdit Community

SlickEdit Product Discussion => SlickEdit® => Topic started by: lwb78750 on September 01, 2011, 08:37:18 PM

Title: Your debugger is not using the correct symbols...
Post by: lwb78750 on September 01, 2011, 08:37:18 PM
I'm running a windows version of sSlickEdit 16.0.2.0 with a Visual Studio Project.
The path for my .pdb file is correct, but I continue to get this error for most of
the non-class symbols I'm debugging.  Does anyone have an idea what could be wrong?

***    Your debugger is not using the correct symbols                        ***
***                                                                                                ***
***    In order for this command to work properly, your symbol path   ***
***    must point to .pdb files that have full type information.              ***
***                                                                                                 ***
***    Certain .pdb files (such as the public OS symbols) do not           ***
***    contain the required information.  Contact the group that           ***
***    provided you with these symbols if you need this command to    ***
***    work.                                                                                     ***
Title: Re: Your debugger is not using the correct symbols...
Post by: Lee on September 01, 2011, 09:12:46 PM
Are some symbols correct? Are you sure all symbol path(s) are correct and the pdb up-to-date?  Was there any other error in the output indicating a failure? 
Code: [Select]
*** ERROR: Module load completed but symbols could not be loaded for foo.exe
Title: Re: Your debugger is not using the correct symbols...
Post by: lwb78750 on September 07, 2011, 03:15:13 PM
Thanks for the response.  I checked the path for the pdb files and it looks right.  All the local symbols work, it's just the globals and class members that give me fits.  All the pdb files are up-to-date - I checked that.  I'm really stumped.
Title: Re: Your debugger is not using the correct symbols...
Post by: Lee on September 07, 2011, 04:34:03 PM
Can you provide a sample that demonstrates the problem?  I need more info to help diagnose the issue. 

OS and Platform (32 or 64-bit)?
SlickEdit platform?
Target executable platform?
WinDbg (dbgeng.dll) version?
Visual Studio version and project type/settings?

Any additional info would help.

Title: Re: Your debugger is not using the correct symbols...
Post by: lwb78750 on September 07, 2011, 05:01:45 PM
Sure...
Windows 7 64bit
SlickEdit 2011 (v16.0.2.0 64-bit)
The target is 32 bit, Windows
Nov 20  2010  C:\Windows\system32\dbgeng.dll
Visual Studio 2008 9.0.30729.1 SP

I just ran Visual Studio and the debugger works great.  I then saved the project and opened it with SlickEdit and I have the same problem where I can't get the symbols for other classes.  The pdb path is correct.  I also noticed that when I build with Visual Studio the pdb file is about 10%-20% larger than when I build with Slick Edit.  (I tried using the Visual Studio version of the pdb file with SlickEdit and that didn't help.)   I'm not sure where to go from here....

Thanks!
Title: Re: Your debugger is not using the correct symbols...
Post by: lwb78750 on September 07, 2011, 05:18:53 PM
Here are all the switches I'm using from MSVS for the command line of the compiler and linker:

/Od /I "..\shared_src\RAD" /I "..\shared_src" /I "..\shared_src\math" /I "..\src" /I "..\shared_src\log4c" /D "WINVER=0x0700" /D "_CRT_SECURE_NO_WARNINGS=1" /D "VS2008" /D "CRUIZER" /D "DEMO_MODE_ONLY" /D "_CRT_SECURE_NO_DEPRECATE" /D "DEBUG" /D "_CRT_NON_CONFORMING_SWPRINTFS" /D "DEBUG_FEATURES" /D "_VC80_UPGRADE=0x0600" /D "_UNICODE" /D "UNICODE" /FD /EHsc /RTC1 /MTd /Fp".\Debug\miniZ.pch" /Fo".\Debug\\" /Fd".\Debug\\" /FR".\Debug\\" /W4 /WX /nologo /c /ZI /TP /wd4214 /wd4201 /errorReport:prompt

/VERBOSE:LIB /OUT:".\Debug\miniz\miniZ.exe" /INCREMENTAL /NOLOGO /MANIFEST /MANIFESTFILE:".\Debug\miniZ.exe.intermediate.manifest" /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /DELAYLOAD:"OleAcc.dll" /DEBUG /ASSEMBLYDEBUG /PDB:"c:\dev\AG\Cruizer\Trunk\src\Debug\miniz\miniZ.pdb" /MAP:"c:\dev\AG\Cruizer\Trunk\src\Debug\miniz\miniZ.map" /SUBSYSTEM:WINDOWS /ENTRY:"wWinMainCRTStartup" /DYNAMICBASE:NO /MACHINE:X86 /ERRORREPORT:PROMPT ws2_32.lib msimg32.lib Wininet.lib DelayImp.lib

Thanks
Title: Re: Your debugger is not using the correct symbols...
Post by: Lee on September 07, 2011, 05:49:56 PM
Have you tried using the WinDbg or the console debugger cdb directly to debug?  I wonder if it is having the same issue.
Title: Re: Your debugger is not using the correct symbols...
Post by: lwb78750 on September 07, 2011, 06:06:43 PM
No, but I'll try that and get back to you...
Title: Re: Your debugger is not using the correct symbols...
Post by: lwb78750 on September 07, 2011, 07:44:56 PM
When running WinDbg, I seem to be getting the same error message: "Your debugger is not using the correct symbols..."
This was after I built with SlickEdit.  I'll try the same scenario with a Visual Studio build.
Title: Re: Your debugger is not using the correct symbols...
Post by: chrisant on September 07, 2011, 10:15:37 PM
Perhaps the compiler settings when building from SE don't enable full debug information in the pdbs.  Check the compiler flags etc.
Title: Re: Your debugger is not using the correct symbols...
Post by: lwb78750 on September 07, 2011, 11:10:59 PM
I have checked every flag and switch I can find. When I run the exact same sln file in Visual Studio, it works - in SE it does not.  I'm still trying to see if there is a way to tell the compiler/linker to generate more complete information in the pdb files. 
Title: Re: Your debugger is not using the correct symbols...
Post by: chrisant on September 08, 2011, 12:43:02 AM
Should be the "/Zi" compiler flag.
Try "cl /?" for details.
Also Google or Bing should find a lot of helpful info on this issue.
Title: Re: Your debugger is not using the correct symbols...
Post by: lwb78750 on September 08, 2011, 02:28:37 PM
I'm now using the /Zi flag, still no success.  I have narrowed it down to the fact that just the STATIC classes and class members don't work. (This app has lots of statics for some reason).  According to the docs, the statics should work as well.  I have searched the web extensively and I have tried all the options suggested on both compiling and linking - still no luck.  I know a LOT more about Visual Studio compiler & linker options, though!  :-)
Title: Re: Your debugger is not using the correct symbols...
Post by: Phil Barila on September 08, 2011, 03:08:52 PM
Just a recap to see if I understand the situation here.  You're using SE to build a VS .sln, and the symbols aren't being built correctly when doing so? 
Assuming the answer to the above is yes:  Can you invoke the VS build directly from a command line   
Code: [Select]
devenv MySolution.sln /Build "Debug|Any CPU" and produce the proper symbols?  If so, remove the "|Any CPU" from the command line and try again.  If you get the bogus symbols, please open a bug at the SE support site.  The VS invocation in SE is a bit broken (for example, when you build a complete solution, it doesn't pass the entire config, just "Debug" or "Release", even though it needs the PlatformName in all but the most trivial cases.), and would benefit from some love by the SE team.  You might have found the compelling case to get it done.
Title: Re: Your debugger is not using the correct symbols...
Post by: Lee on September 08, 2011, 05:03:11 PM
Have you tried using the fully qualified symbol name with module name (mymodule!main)?  And are you sure the compiler/linker didn't optimize away the static declaration?  I have seen that happen even in Debug configurations.  Without a reproducible, I can't say for sure what is the problem.
Title: Re: Your debugger is not using the correct symbols...
Post by: lwb78750 on September 08, 2011, 08:20:01 PM
Every optimization I can find is turned off.  Please tell me more about the fully qualified symbol name with module name (mymodule!main) stuff - I'm not sure where I would use that...  Thanks!
Title: Re: Your debugger is not using the correct symbols...
Post by: lwb78750 on September 08, 2011, 08:30:05 PM
Also, I tried using the command line to build:

devenv miniz.sln /Build "Debug|Win32"

... and then debug with SE.  I get the same results for the statics. (they are not available.)


Title: Re: Your debugger is not using the correct symbols...
Post by: Phil Barila on September 08, 2011, 09:23:09 PM
Also, I tried using the command line to build:

devenv miniz.sln /Build "Debug|Win32"

... and then debug with SE.  I get the same results for the statics. (they are not available.)
That would suggest that VS isn't building correctly from the command line, when it's building properly from the GUI.  It would definitely not be the first time for that!  Unfortunately, I don't know what you can do to work around it, since it does appear to be a problem with VS, rather than SE.
Title: Re: Your debugger is not using the correct symbols...
Post by: lwb78750 on September 08, 2011, 10:11:17 PM
I built with the Visual Studio GUI and then tried to debug with SE - it still didn't work (for statics).  I then tried to ditch the pdb file and compile with /Z7, but apparently WinDbg only accepts pdb files. :-(.  It would sure help if I could configure another debugger from within SE (like gdb for windows or PEBrowse).  However, at this point, I *do* think this is a VisualStudio/WinDbg problem more than a SE problem.  I think the Visual Studio GUI has more information than what is stored in the pdb files...
Title: Re: Your debugger is not using the correct symbols...
Post by: hs2 on September 08, 2011, 11:04:17 PM
Stupid question: The pdb files of all the windows libs (ws2_32.lib etc.) are found ? I'm quite sure VS knows about the system lib pdbs and automagically supplies the appropriate path. Maybe you've to add it yourself when doing bare metal windbg'ing.
Good luck, HS2
Title: Re: Your debugger is not using the correct symbols...
Post by: Phil Barila on September 08, 2011, 11:28:26 PM
Not intending to be annoying here, but you are using SE where it is weakest, and ignoring VS where it is strongest.
I use SE to edit and build, then run a real build from a command line (I have to move the build products to a new location, and I really don't want to fool around with custom output dirs and nonsense like that, so command line build + RoboCopy is pretty efficient), then debug in the VS GUI.  Works pretty well, actually.
Title: Re: Your debugger is not using the correct symbols...
Post by: lwb78750 on September 09, 2011, 01:58:13 PM
I'm not having problems with the system libs symbols, just the statics from our (my) project.

When I debug in the VS GUI, everything works great.  I'll try building with SE then using VS to debug and see what I get...