.NET Framework Bookmark and Share   
 index > Building Development and Diagnostic Tools for .Net > No symbols for my Test Program?
 

No symbols for my Test Program?

I have created a small program with memory leak, forlearning the windbg program. i loaded the public and private modules with my pdb and microsoft symbol server like that:
D:\Programming\VS Projects\ConsoleApplication3\ConsoleApplication3\bin\Debug;
SRV*C:\MyLocalSymbols*http://msdl.microsoft.com/download/symbols

then i run the process, attach to it my windbg, and use the lm command and find my module there.
Then i try to use the command x MyModule!* and it lists no symbols /-:
it works on other modules...

The program containes a small method inside the main method nameddolevFunction. The main class is nameddolevProgram inside the namespaceConsoleApplication3.
It containes a list named dolev that i increase it size with Integer objects inside a while loop.

why i dont see my method, my list, my class or anything else?
i even turned them all to public, to find if thats the case and it didnt help....
what should i do?

thanks
dolev

Dolev9

For managed code debugging in WinDBG check out SOSextension. There is no full parity for all windbg commands, like X. For putting a managed breakpoint use BPMD command in SOS extension. If you need to find the symbol, then use ildasm or Reflector tools toexamine the assembly content.
If you need more guidance on debugging memory leaks, try this blog post with useful links: Where's your leak at?

C# language will never produce native code. It will always be managed. Unsafe keyword creates unsafe code and gives developers more power over memory, but it still creates managed code - see e.g.C# unsafe code.

Debugging managed code from WinDBG is not easy and requires a lot of knowledge. I would recommend to use a managed debugger (e.g. VS 2005 debugger or mdbg) or other tools like profilers or memory leaks detectors for your task, unless you really have to use WinDBG (or you want to learn it).

-Karel

All Replies

  • Friday, July 24, 2009 10:23 PMVipul Patel - CLRMSFT, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    HI Dolev,

    What is the output for "lm" after ".reload /f"? Do you see the symbols after forceloading them using ".reload /f" ?
    This posting is provided "AS IS" with no warranties, and confers no rights.
Karel Zikmund
results are:"ConsoleApplication3_vshost (pdb symbols)" and most of my other stuff got pdb symbols.
my only error in .reload /f results is:
*** ERROR: Module load completed but symbols could not be loaded for C:\WINDOWS\system32\xpsp2res.dll
there are few more with warning like:
.*** WARNING: Unable to verify checksum for C:\WINDOWS\assembly\NativeImages_v2.0.50727_32\System.Xml\7f86b0ff84337b4399a783241072f83b\System.Xml.ni.dll

thanks for the answer, and waiting for the next (-:

dolev


Dolev9
I see what is going on. You cannot do x MyModule for managed assemblies. It only works for native assemblies.
This posting is provided "AS IS" with no warranties, and confers no rights.
Vipul Patel - CLR
How can i find a piece of code and put break point on it if not using the X command. What can i do in such a situation in the managed code?

I tryed to check it out and use the unsafe keywork for my console application, to make it as unmanaged code.
the X command still dont work. But it is still written under C# in VS2005.

waiting for your reply

dolev :-)





Dolev9

You can use google to search for other answers

Custom Search

More Threads

• why I cannot debug or step into some function?
• standalone .net application
• How are modules and assemblies related?
• Question about TextWriterTraceListener
• JIT compilation during remoting calls
• Source level split method
• mdbg ? help does not work, potential workaround
• ICDType <-> MD Type signatures
• IL Disassembler
• Problems with profiling in asp.net application... It doesn't profile...