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
1
vote
3 answers

Why doesn't stack walking work properly when using SetUnhandledExceptionFilter?

I am using the following code to walk the stack on an exception (note: you must run it in release in order to properly receive the desired output of the stack trace to the console, not in debug mode or else it will only show a popup): #include…
Alexandru
  • 12,264
  • 17
  • 113
  • 208
1
vote
2 answers

How can I get callstack from C++ application using C#?

I have C#/VB.NET application which tests other application written in C++. If C++ application doesn't respond, I want to get callstack from it. I found various examples written in C++ (e.g. dbghelp.dll CaptureStackBackTrace or Walking the…
jing
  • 1,919
  • 2
  • 20
  • 39
1
vote
1 answer

Get access specifier for a class method from a PDB via DbgHelp?

Say I have a simple class like the one below: class Foo { public: Foo(){}; protected: int meth1( void ){return 0;}; public: int var1; }; Compiled with MSVC and parsing the corresponding PDB via the DbgHelp API, I can iterate over the…
QAZ
  • 4,870
  • 6
  • 36
  • 50
1
vote
2 answers

How to access the PEB (process environment block) in dump using DbgHelp

I found an example that uses the debugger engine API to get at the PEB in a dump. Is this possible using DbgHelp? Have existing code that uses DbgHelp to pull out comment and exception information. Would like to grab some info from PEB if…
Chuck Kasabula
  • 2,565
  • 1
  • 15
  • 12
1
vote
1 answer

Windows corrupt minidump

When my program crashes it creates a minidump, from the unhandled exception handler. The issue I'm having is that people are sending me crash dumps, but when I try to open them in Visual Studio 2010 it says they're corrupt ("The dump file has an…
user1520427
  • 1,345
  • 1
  • 15
  • 27
1
vote
1 answer

Undecorated Microsoft Symbol: SomeClass::`vftable'{for `Foo::Bar'}

I'm using UnDecorateSymbolNameW from dbghelp to un-decorate Microsoft symbol names. When undecorating with UNDNAME_COMPLETE, the symbol name can sometimes have, what I understand to be, some compiler appended information to it. For example a vftable…
Bobby
  • 43
  • 5
0
votes
2 answers

SymLoadModule64 and GetCurrentProcess from C#

I want to use the dbghelp library to get some type and program information from a pdb file. Now, because I like C# much more than C++, I'm currently trying to get it working from within C#. I'm currently stuck at a call to SymLoadModule64. I've got…
Jay
  • 237
  • 2
  • 14
0
votes
2 answers

Problems with opening a process with DEBUG flags

I'm trying to open a process with my debugger using CreateProcess with the DEBUG_PROCESS and DEBUG_ONLY_THIS_PROCESS flags and the the process is opened, but then when I try to call SymInitialize with the handle I receive, it fails. This is my…
Idov
  • 5,006
  • 17
  • 69
  • 106
0
votes
0 answers

How to precisely append specific heap memory region into a custom crash dump via MiniDumpWriteDump API in DbgHelp library?

I wish to debug application hang via collected crash dump from customer site as I cannot install visual studio and debugger on customer site machine. Full memory dump would be my first choice as debugging hang via full memory dump is informative and…
0
votes
1 answer

How to use DbgHelpCreateUserDump?

I wanted to use this function to dump the memory of some processes for analysis, but I didn't find any instructions for this function online.
Fsiry
  • 1
0
votes
1 answer

Cancel downloading symbols in Debug Help Library

Debug Help Library allows to load symbols from external storages. You just call SymSetSearchPath, specifying symbol servers, and then SymLoadModuleExW loads symbols from the specified locations. Downloading symbols may take some time and I am…
Artem Razin
  • 1,234
  • 8
  • 22
0
votes
1 answer

How to obtain both managed(dotnet) and native(C++) callstack of my project by dbghelp?

My project contains managed part(dotnet) and native(C++) part. I want to hook Winapi CreateFiles in my project by detours and log callstack. Now I have obtained a native callstack by invoking CaptureStackBackTrace and SymFromAddr api in dbghelp. But…
0
votes
1 answer

DbgHelp vs DbgEng vs DIA SDK in regards to thread safety

All these APIs (DbgHelp, DbgEng, DIA SDK) can be used to recover function name/source file location from function pointers, so are usable to decrypt stack traces. However, every DbgHelp function has the following remark: All DbgHelp functions, such…
Alex Guteniev
  • 12,039
  • 2
  • 34
  • 79
0
votes
0 answers

best practice to use dbghelp with your application

I have a enterprise c++ application that I'd like to ship out and I do use the dbghelp library to get a stacktrace if my application crashes. What is the best practice for doing this? My target users are windows10 and according to this page, I…
Nam Vu
  • 1,727
  • 1
  • 11
  • 24
0
votes
1 answer

Why am I getting a spurious error message from SymInitialize?

In writing a C++ Windows application, I'm using the SymInitializeW to initialize the symbols for getting a backtrace. As the documentation mentions, I'm checking the return code, and then using GetLastError and FormatMessage when SymInitializeW…
R.M.
  • 3,461
  • 1
  • 21
  • 41