Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- You can also start in a debugger.
- windbg or ntsd (ntsd is a console program and maybe installed). Both are also from Debugging Tools For Windows.
- Download and install Debugging Tools for Windows
- http://msdn.microsoft.com/en-us/windows/hardware/hh852363
- Install the Windows SDK but just choose the debugging tools.
- Create a folder called Symbols in C:\
- Start Windbg. File menu - Symbol File Path and enter
- srv*C:\symbols*http://msdl.microsoft.com/download/symbols
- then
- windbg -o -g -G c:\windows\system32\cmd.exe /k batfile.bat
- You can press F12 to stop it and kb will show the call stack (g continues the program). If there's errors it will also stop and show them.
- Type lm to list loaded modules, x *!* to list the symbols and bp symbolname to set a breakpoint
- F12 - break into program
- g - continue
- p - Step
- kb - list call stack
- lm - list loaded modules
- x *!* - list all symbols
- ln <address> - lists the nearest symbols to that address - used when you have a crash address
- bp symbolname - sets a breakpoint
- da <address> - displays the ascii data found at that address
- dda <address> - displays the value of the pointer
- dv - display local variables
- kv 10 - displays last 10 stack frames
- If programming in VB6 then this environmental variable link=/pdb:none stores the symbols in the dll rather than seperate files. Make sure you compile the program with No Optimisations and tick the box for Create Symbolic Debug Info. Both on the Compile tab in the Project's Properties.
- Also CoClassSyms (microsoft.com/msj/0399/hood/hood0399.aspx) can make symbols from type libraries.
- .
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement