Questions tagged [dbghelp]

dbghelp is the short name of the Microsoft Debug Help library.

dbghelp is Microsoft's Debug Help Library, which contains utilities for debugging applications. Three common uses for it are for writing minidump files using MinidumpWriteDump, producing a stack trace using StackWalk64 and loading symbols from PDB files, possibly from a symbol server.

108 questions
21
votes
3 answers

How can you use CaptureStackBackTrace to capture the exception stack, not the calling stack?

I marked up the following code: #include "stdafx.h" #include #include #include #include using namespace std; #define TRACE_MAX_STACK_FRAMES 1024 #define TRACE_MAX_FUNCTION_NAME_LENGTH 1024 int…
Alexandru
  • 12,264
  • 17
  • 113
  • 208
21
votes
5 answers

Why don't Minidumps give good call stacks?

I've used minidumps on many game projects over the years and they seem to have about a 50% chance of having a valid call stack. What can I do to make them have better call stacks? I've tried putting the latest dbghelp.dll in the exe directory. That…
Tod
  • 4,618
  • 4
  • 32
  • 23
15
votes
3 answers

Capturing R6025 pure virtual call

I currently capture MiniDumps of unhandled exceptions using SetUnhandledExceptionFilter however at times I am getting "R6025: pure virtual function". I understand how a pure virtual function call happens I am just wondering if it is possible to…
JProgrammer
  • 2,750
  • 2
  • 25
  • 36
11
votes
2 answers

Is DbgHelp.dll built-in to Windows? Can I rely on it being there?

I use Jochen Kalmbach's StackWalker class from CodeProject, to produce a stacktrace when an exception occurs in my DLL. It relies on DbgHelp.dll Is DbgHelp.dll built-in to Windows Vista, WS2008, Windows 7? I know about The Debugging Tools for…
Cheeso
  • 189,189
  • 101
  • 473
  • 713
10
votes
3 answers

How do you use SymLoadModuleEx to load a PDB file?

I'm trying to call SymLoadModuleEx to load the symbols from a PDB file and then use SymFromAddr to look up symbols from that PDB. However, I can't figure out what to pass for the parameters BaseOfDll and DllSize -- the documentation explicitly says…
Adam Rosenfield
  • 390,455
  • 97
  • 512
  • 589
9
votes
1 answer

Unresolved symbol errors within DLL

For background, I have come across this porting a medium-sized linux codebase (compiling into a giant .so) to x64 windows (compiling into a .dll). I have had linker trouble. As a minimal testcase, if I create a Visual Studio project from just the…
user1243488
  • 145
  • 2
  • 5
9
votes
2 answers

How to extract stack traces from minidumps?

I've got a whole bunch of minidumps which were recorded during the runtime of an application through MiniDumpWriteDump. The minidumps were created on a machine with a different OS version than my development machine. Now I'm trying to write a…
Zarat
  • 2,584
  • 22
  • 40
9
votes
1 answer

How to get the EXCEPTION_POINTERS during an EExternal exception?

How do i get the EXCEPTION_POINTERS, i.e. both: PEXCEPTION_RECORD and PCONTEXT data during an EExternal exception? Background When Windows throws an exception, it passes a PEXCEPTION_POINTERS; a pointer to the exception information: typedef…
Ian Boyd
  • 246,734
  • 253
  • 869
  • 1,219
7
votes
2 answers

Listing the exported functions of a DLL

I'm looking for a way (in C++/Windows) to list the exported functions of a DLL (and maybe even methods which are not exported) using dbgHelp. Does anybody know which method can do it?
Idov
  • 5,006
  • 17
  • 69
  • 106
7
votes
3 answers

How do I obtain a stack trace on Windows without using dbghelp.dll?

How do I obtain a stack trace of addresses on Windows without using dbghelp.dll? I don't need to know what the symbols or function names associated with the addresses, I just want the list of addresses -- something similar to backtrace of *nix…
Uhall
  • 5,673
  • 7
  • 24
  • 19
7
votes
1 answer

How to enable Microsoft Symbol Server in OlyDbg?

OlyDbg version 2 was recently released. It now supports using the Microsoft Symbol Server for debugging: It supports Microsoft compilers via dbghelp.dll. New is support for symbol server, stack walking using dbghelp and names of procedure…
Ian Boyd
  • 246,734
  • 253
  • 869
  • 1,219
6
votes
3 answers

What is the format (schema) of .NET PDB files?

What is the format (schema) of .NET PDB files? I'd like to parse the information out of these files so that I can display the correct lines of code (line numbers) in a debugging application.
Sean
  • 1,373
  • 2
  • 14
  • 26
6
votes
4 answers

Where do I find the list of unloaded modules in a Windows process?

I have some native (as in /SUBSYSTEM:NATIVE) Windows programs that I'd like to generate minidumps for in case they crash. Normally, I'd use dbghelp.dll, but since native processes can only use functions exported from ntdll.dll, I can't. So I've…
avakar
  • 32,009
  • 9
  • 68
  • 103
5
votes
0 answers

StackWalk64 and custom unwind data (x64 stack) retrieval

Is it possible to make StackWalk64 load and use a RUNTIME_FUNCTION table extracted by me? The only way I found out is loading it using SymLoadModule64 when it is used, it is very slow. I also saw that StackWalk64 can receive a function that will…
Idov
  • 5,006
  • 17
  • 69
  • 106
4
votes
0 answers

DbgHelp enumerating local variables

I'm trying to enumerate over all variables in a function using DbgHelp. The only problem I'm facing is that SymEnumSymbols is scoped, so it doesn't find variables inside if statements for example. I'm aware of SymSetContext, but that would require…
Kalinovcic
  • 492
  • 3
  • 11
1
2 3 4 5 6 7 8