PDB symbol for clr.dll not loaded - debugging

I get following message when I execute "!name2ee app.exe!Program".How can I fix that?
I am using VS2013.
.load sos
extension C:\Windows\Microsoft.NET\Framework\v4.0.30319\sos.dll loaded
!name2ee app.exe!Program
PDB symbol for clr.dll not loaded

Make sure you have an Internet connection
Set "Microsoft Symbol Servers" in Options / Debugging / Symbols

Related

Download symbols from Microsoft symbol server

I read MSDN "using symbol server"
I am trying to download symbols from microsoft symbol server.
My symbol search path: srv*C:\symbols*http://msdl.microsoft.com/download/symbols
In WinDbg I always get error:
************* Symbol Loading Error Summary **************
Module name Error
ntdll PDB not found :
srv*c:\symbols*http://msdl.microsoft.com/download/symbols
Unable to locate the .pdb file in this location
PDB not found : > srv*c:\symbols*https://msdl.microsoft.com/download/symbols
Unable to locate the .pdb file in this location
How can I obtain the symbols from MS symbol server?
because the location site is crashed!
http://msdl.microsoft.com/download/symbols
open that in your browser,you will see a crashed page,normally it will show a hint page if the site is good.
i try to report this but cannot find the way.-_-!!!
that brought me some trouble too.
question:is there a site cached MS symbols and opened for everyone?thanks.

Windbg and Symbol Files

I have a problem with symbol files. I experimented with the symbol file path and set the path as follows:
srv*c:\symbols*http://msdl.microsoft.com/download/symbols;C:\Users\myuser\Desktop\driver2\objchk_win7_x86\i386
But afterwards I changed it to the following:
srv*c:\symbols*http://msdl.microsoft.com/download/symbols;C:\Users\myuser\Desktop\mydriver\objchk_win7_x86\i386
I changed the driver2 with mydriver in the path: this is the path where the .pdb file for my driver is located. The problem is that .sympath prints the right path as shown below:
kd> .sympath
Symbol search path is: srv*c:\symbols*http://msdl.microsoft.com/download/symbols;C:\Users\myuser\Desktop\mydriver\objchk_win7_x86\i386
Expanded Symbol search path is: srv*c:\symbols*http://msdl.microsoft.com/download/symbols;c:\users\myuser\desktop\mydriver\objchk_win7_x86\i386
But the symbols for the driver are still not found. If I run .reload command, we can see that WinDbg is looking for .pdb in driver2/ directory instead of mydriver/ directory.
kd> .reload /f mydriver.sys
SYMSRV: c:\symbols\mydriver.pdb\3D655E533B0449A38D7AB0AF637CE9201\mydriver.pdb not found
SYMSRV: http://msdl.microsoft.com/download/symbols/mydriver.pdb/3D655E533B0449A38D7AB0AF637CE9201/mydriver.pdb not found
SYMSRV: c:\users\myuser\desktop\mydriver\objchk_win7_x86\i386\mydriver.pdb\3D655E533B0449A38D7AB0AF637CE9201\mydriver.pdb not found
DBGHELP: c:\users\myuser\desktop\driver2\objchk_win7_x86\i386\mydriver.pdb - file not found
*** ERROR: Module load completed but symbols could not be loaded for mydriver.sys
DBGHELP: mydriver - no symbols loaded
I've deleted all the workspaces, closed WinDbg, restarted Windows, but the driver2/ entry is still there: it must be in the default workspace's cache or somewhere. How can I delete the whole personal settings of WinDbg including those caches, so I can restart WinDbg and be gone with the driver2/ path and make it use mydriver/.
I could also solve the problem with renaming the mydriver/ directory back into driver2/, but I don't want to solve the problem like that. I want to understand what's going on and solve it the best I can.
!sym noisy
will tell you why it did not want to load the pdb. Perhaps you did rebuild your driver and the pdb guid or pdb age does no longer match.
If you are sure that you have built the same source files you can force loading of your pdb by
.reload /i /f yourdriver.sys
/i is the magic switch to load also mismatched pdbs. This switch will not load any driver from your symbol server but it will consider only local file paths to load your driver. Also symbol store directories (SRV*) are not considered since there would be many versions to choose from. But if your .sympath directly points to your pdb it will be loaded.
Is the driver originally compiled & built in the driver2 path? What is the location of mydriver.sys?
For example assume I have symbol path 'c:\users\rahulsundar\desktop' set and try to load ntdll.dll, then it displays below error,
0:000> .reload ntdll.dll
DBGHELP: c:\users\rahulsundar\desktop\ntdll.pdb - file not found
DBGHELP: c:\users\rahulsundar\desktop\dll\ntdll.pdb - file not found
DBGHELP: c:\users\rahulsundar\desktop\symbols\dll\ntdll.pdb - file not found
DBGHELP: C:\Windows\SYSTEM32\ntdll.pdb - file not found
DBGHELP: ntdll.pdb - file not found
*** ERROR: Symbol file could not be found. Defaulted to export symbols for ntdll.dll -
DBGHELP: ntdll - export symbols
Note: Windbg by default searches ntdll.pdb from the same location 'C:\Windows\SYSTEM32'
One way to solve the current issue, from the log its clear that windbg expects pdb file in directory 'c:\users\myuser\desktop\mydriver\objchk_win7_x86\i386\mydriver.pdb\3D655E533B0449A38D7AB0AF637CE9201\mydriver.pdb'.
So manually create directory till
'mydriver.pdb\3D655E533B0449A38D7AB0AF637CE9201' and place pdb file
there.
This is just a standard way( binaryfoldername\hashid\pdbfile ) that Windows expects a symbol for a binary.
Better way to solve this - turn on sim noisy and look at path
at .reload /f my_driver.sys
or add new path to .sympath[+] path/to/pdb and do the same

How to disassembly my driver?

I am trying kernel debugging using vmware and windbg.I have connected two OS and all symbols are loaded successfully.If I want to see my driver in memory how can I disassembly that?
I have tried lm commands and lmvm commands
kd> lmvm comint32
start end module name
88da9000 88daf000 comint32 (private pdb symbols) C:\Program Files (x86)\Debugging Tools for Windows (x86)\sym\comint32.pdb\653387D894B4412FA9E30659E58DD47C1\comint32.pdb
Loaded symbol image file: comint32.sys
Image path: \SystemRoot\System32\Drivers\comint32.sys
Image name: comint32.sys
Timestamp: Thu Apr 11 20:10:55 2013 (51677B3F)
CheckSum: 0000CACF
ImageSize: 00006000
Translations: 0000.04b0 0000.04e4 0409.04b0 0409.04e4
x comint32!* should dump all the symbols of the module along with their addresses in memory.
You can then either use the u command (with the name (e.g. comint32!DriverEntry) or the address of a function as a parameter) to disassemble into the main window or you can open the disassembly window and paste the name/address into it and browse the disassembled code there.
See your windbg reference for further details.

Qt 4.8.2 QString toStdString unhandled exception

void QuinielaApuesta::funcion(QString & str)
{
std::string cadenita = str.toStdString();
std::cout << cadenita << std::endl;
}
I am on Qt 4.8.2 for VS2010, Windows 7 N 64-bit, Visual Studio 2010 and using the QString method "toStdString()" (or something somewhat related) causes an Unhandled exception.
it doesn't matter where I use the line
std::string cadenita = str.toStdString();
It will cause an unhandled exception. In this particular case, it happens right after I get out of the method "funcion"s scope. But it happens in the current context of the scope escape (That is, if you put this line in an object's constructor, it will proceed as expected until the end of the constructor, and then when it should proceed to a higher scope level, it will send an Unhandled Exception error).
I have isolated the issue to .toStdString by trial and error, and I cannot say if other methods might (or might) have this same issue. I can say, however, that as soon as the line is commented, it all works ok. In fact, if I replace said line with a simple
std::cout << "Some Funny Test Text" std::endl;
It all works fine and dandy.
The error is
Unhandled exception at 0x53b8ad7a (msvcp100d.dll) in C_plus_plus_QT_project.exe: 0xC0000005: Access violation reading location 0xccccccd0.
And then in file xutility, line 201
#if _ITERATOR_DEBUG_LEVEL == 2
if (_Myproxy != 0)
{ // proxy allocated, drain it
_Lockit _Lock(_LOCK_DEBUG);
for (_Iterator_base12 **_Pnext = &_Myproxy->_Myfirstiter;
*_Pnext != 0; *_Pnext = (*_Pnext)->_Mynextiter) // HERE IS THE LINE WHERE THE BREAK KICKS IN
(*_Pnext)->_Myproxy = 0;
_Myproxy->_Myfirstiter = 0;
}
Visual Studio's output is:
'C_plus_plus_QT_project.exe': Loaded 'C:\Users\aravasio\Desktop\C_plus_plus_QT_project\Debug\C_plus_plus_QT_project.exe', Symbols loaded.
'C_plus_plus_QT_project.exe': Loaded 'C:\Windows\SysWOW64\ntdll.dll', Cannot find or open the PDB file
'C_plus_plus_QT_project.exe': Loaded 'C:\Windows\SysWOW64\kernel32.dll', Cannot find or open the PDB file
'C_plus_plus_QT_project.exe': Loaded 'C:\Windows\SysWOW64\KernelBase.dll', Cannot find or open the PDB file
'C_plus_plus_QT_project.exe': Loaded 'C:\Users\aravasio\Desktop\C_plus_plus_QT_project\Debug\QtGui4.dll', Binary was not built with debug information.
'C_plus_plus_QT_project.exe': Loaded 'C:\Windows\SysWOW64\gdi32.dll', Cannot find or open the PDB file
'C_plus_plus_QT_project.exe': Loaded 'C:\Windows\SysWOW64\user32.dll', Cannot find or open the PDB file
'C_plus_plus_QT_project.exe': Loaded 'C:\Windows\SysWOW64\advapi32.dll', Cannot find or open the PDB file
'C_plus_plus_QT_project.exe': Loaded 'C:\Windows\SysWOW64\msvcrt.dll', Cannot find or open the PDB file
'C_plus_plus_QT_project.exe': Loaded 'C:\Windows\SysWOW64\sechost.dll', Cannot find or open the PDB file
'C_plus_plus_QT_project.exe': Loaded 'C:\Windows\SysWOW64\rpcrt4.dll', Cannot find or open the PDB file
'C_plus_plus_QT_project.exe': Loaded 'C:\Windows\SysWOW64\sspicli.dll', Cannot find or open the PDB file
'C_plus_plus_QT_project.exe': Loaded 'C:\Windows\SysWOW64\cryptbase.dll', Cannot find or open the PDB file
'C_plus_plus_QT_project.exe': Loaded 'C:\Windows\SysWOW64\lpk.dll', Cannot find or open the PDB file
'C_plus_plus_QT_project.exe': Loaded 'C:\Windows\SysWOW64\usp10.dll', Cannot find or open the PDB file
'C_plus_plus_QT_project.exe': Loaded 'C:\Windows\SysWOW64\comdlg32.dll', Cannot find or open the PDB file
'C_plus_plus_QT_project.exe': Loaded 'C:\Windows\SysWOW64\shlwapi.dll', Cannot find or open the PDB file
'C_plus_plus_QT_project.exe': Loaded 'C:\Windows\winsxs\x86_microsoft.windows.common-controls_6595b64144ccf1df_5.82.7601.17514_none_ec83dffa859149af\comctl32.dll', Cannot find or open the PDB file
'C_plus_plus_QT_project.exe': Loaded 'C:\Windows\SysWOW64\shell32.dll', Cannot find or open the PDB file
'C_plus_plus_QT_project.exe': Loaded 'C:\Windows\SysWOW64\oleaut32.dll', Cannot find or open the PDB file
'C_plus_plus_QT_project.exe': Loaded 'C:\Windows\SysWOW64\ole32.dll', Cannot find or open the PDB file
'C_plus_plus_QT_project.exe': Loaded 'C:\Windows\SysWOW64\imm32.dll', Cannot find or open the PDB file
'C_plus_plus_QT_project.exe': Loaded 'C:\Windows\SysWOW64\msctf.dll', Cannot find or open the PDB file
'C_plus_plus_QT_project.exe': Loaded 'C:\Windows\SysWOW64\winmm.dll', Cannot find or open the PDB file
'C_plus_plus_QT_project.exe': Loaded 'C:\Windows\SysWOW64\winspool.drv', Cannot find or open the PDB file
'C_plus_plus_QT_project.exe': Loaded 'C:\Users\aravasio\Desktop\C_plus_plus_QT_project\Debug\QtCore4.dll', Binary was not built with debug information.
'C_plus_plus_QT_project.exe': Loaded 'C:\Windows\SysWOW64\ws2_32.dll', Cannot find or open the PDB file
'C_plus_plus_QT_project.exe': Loaded 'C:\Windows\SysWOW64\nsi.dll', Cannot find or open the PDB file
'C_plus_plus_QT_project.exe': Loaded 'C:\Windows\winsxs\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.6161_none_50934f2ebcb7eb57\msvcp90.dll', Cannot find or open the PDB file
'C_plus_plus_QT_project.exe': Loaded 'C:\Windows\winsxs\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.6161_none_50934f2ebcb7eb57\msvcr90.dll', Cannot find or open the PDB file
'C_plus_plus_QT_project.exe': Loaded 'C:\Windows\SysWOW64\msvcp100d.dll', Symbols loaded.
'C_plus_plus_QT_project.exe': Loaded 'C:\Windows\SysWOW64\msvcr100d.dll', Symbols loaded.
'C_plus_plus_QT_project.exe': Loaded 'C:\Windows\SysWOW64\uxtheme.dll', Cannot find or open the PDB file
'C_plus_plus_QT_project.exe': Loaded 'C:\Windows\SysWOW64\dwmapi.dll', Cannot find or open the PDB file
First-chance exception at 0x53b8ad7a (msvcp100d.dll) in C_plus_plus_QT_project.exe: 0xC0000005: Access violation reading location 0xccccccd0.
Unhandled exception at 0x53b8ad7a (msvcp100d.dll) in C_plus_plus_QT_project.exe: 0xC0000005: Access violation reading location 0xccccccd0.
If I can provide any other information about my system, I will be glad to.
I can only make some sort of educated guess that this is not a Qt bug, because at home I am having no problem at all (but at home I am using an x86 W7, so it might not be a good example).
Does anybody know about this? I've googled quite a bit, but every error seems to have been addressed in an old hotfix.
Should I just abandon ship and try VS2008? Does it work with x64 environments? (Release is going to be for x86, btw, not x64)
You compiled the debug target but you linked it with the release variants of the Qt dlls (QtCore4.dll and QtGui4.dll instead of QtCored4.dll and QtGuid4.dll).

SOS Name2EE only showing Module and Assembly information

I just discovered SOS Extensions and am trying it out with a stupid hello world console app in Visual Studio 2010. I have enabled debugging unmanaged code and executed .load sos on my project properties. However, when I do !Name2EE App.exe!Program I only see the Module and Assembly info. I don't see the MethodTable or anything else:
!Name2EE App.exe!Program
Module: 001c2e9c
Assembly: App.exe
Can anyone shed some light on why I'm not seeing the rest of the info?
Try using actual type name including namespace:
0:000> !Name2EE HelloWorld!MyCompany.HelloWorld.Program
Module: 00182e9c
Assembly: HelloWorld.exe
Token: 02000006
MethodTable: 00183888
EEClass: 00181794
Name: MyCompany.HelloWorld.Program
If you specify a filename with extension, separate the module from the type.
!name2ee app.exe Program
-OR-
!name2ee app!MyApp.Program
Also, as the previous answer indicated, always use the FULL type name.

Resources