Questions tagged [dia-sdk]

The Microsoft Debug Interface Access Software Development Kit (DIA SDK) provides access to debug information stored in program database (.pdb) files generated by Microsoft postcompiler tools.

The Microsoft Debug Interface Access Software Development Kit (DIA SDK) provides access to debug information stored in program database (.pdb) files generated by Microsoft postcompiler tools. Because the format of the .pdb file generated by the postcompiler tools undergoes constant revision, exposing the format is impractical. Using the DIA API, you can develop applications that search for and browse debug information stored in a .pdb file. Such applications could, for example, report stack trace-back information and analyze performance data.

Reference:

32 questions
1
vote
2 answers

Is it possible to infer which line in source has the problem according to disassembly?

The problem exists at 017D0B5F call eax : 017D0B56 mov esi,esp 017D0B58 mov edx,dword ptr [ebp-20h] 017D0B5B push edx 017D0B5C mov eax,dword ptr [ecx+8] 017D0B5F call eax 017D0B61 cmp …
ollydbg
  • 3,475
  • 7
  • 28
  • 29
1
vote
0 answers

Why does IDiaEnumSymbolsByAddr::Next crash?

I wanted to enumerate symbols by address but it seems IDiaEnumSymbolsByAddr::Next crash when I call it. The documentation doesn't say anything extra about it. Minimal code to reproduce: int main() { IDiaDataSource *ds; IDiaSession *session; …
Calmarius
  • 18,570
  • 18
  • 110
  • 157
0
votes
2 answers

Help needed for DIA SDK & DbgEng

Are DIA SDK & DbgEng (Not the DbgHelp) both COM based API and based on DbgHelp? If so, how can I call DbgEng API from a C# application. I can import the DIA library to C# project using idl file (tlibimp for generated tlib file), but DbgEng doesn't…
abir
  • 1,797
  • 14
  • 26
0
votes
1 answer

DIA SDK SymTagEnum value

I'm currently dumping a lot of information from a PDB file I retrieve using the DIA SDK to an XML file so that I can then use that information to display stuff about the structure of the project etc. For naming the XML nodes, I have a trivial…
Jay
  • 237
  • 2
  • 14
0
votes
0 answers

How to get symbols from just my own code using DIA SDK

I'm using the DIA SDK to get symbol information from .pdb files. For example, I want to use this to get a list of classes, functions, member variables, and so on from a project. After some messing around I've been able to get this information,…
AgentPaper
  • 109
  • 4
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
1 answer

Getting used incremental linking thunks from the .pdb for a function?

I'm trying to determine a static callgraph of an .exe using the .pdb and the DIA SDK. Unfortunately, when linking incrementally, the incremental trampoline thunks called by a function don't show up when using the dia2dump sample. If you run and link…
MSN
  • 53,214
  • 7
  • 75
  • 105
0
votes
0 answers

Can I get alignment value for class using DIA SDK?

I am making app in c# that can list all classes/structs with their members like from pdb using DIA SDK but I don't know how to get alignment value. I tried to search it in microsoft docs…
0
votes
1 answer

Why DIA SDK get_guid always returns Bad ptr(0x000) for Class guid?

I am using DIA SDK for enumerating types and interfaces of COM binaries(dlls/exes). But get_guid always returns Bad Ptr(0x0000) for every Class(CoClass & Interface) used inside that component? Any way out other by which we can get guid from pdb of…
Usman
  • 77
  • 2
  • 9
0
votes
1 answer

Can we calculate/extract Virtual Table address some how from DIA SDK?

Can we extract vtable's starting base address of a type if it implements vtable functions from DIA SDK? Regards, Usman
Usman
  • 77
  • 2
  • 9
0
votes
1 answer

How to filter non kernel(User imported) dll's from DIA SDK?

I need to specifically filter all user imported dll's. DIA SDK gives all modules under SymTagCompiland which includes all kernel and other imports those are not explicitly linked. I only need those dependent Dll's(modules) which are explicitly…
Usman
  • 77
  • 2
  • 9
0
votes
1 answer

How do I get the line number and path of a method from a pdb using .Net?

Given an assembly and its pdb, how do I get the line number and path to a method using .Net?
Simon
  • 33,714
  • 21
  • 133
  • 202
0
votes
1 answer

Why does IDiaDataSource::loadDataForExe fail with E_PDB_NOT_FOUND from IDE but not from outside?

I'm getting started with the DIA SDK and have the following simple code: #define PRINTIFHRIS(x) if (hr == x) printf(#x "\n"); int main() { HRESULT hr; IDiaDataSource *ds = NULL; wchar_t cwd[300]; GetCurrentDirectory(300, cwd); …
Calmarius
  • 18,570
  • 18
  • 110
  • 157
0
votes
2 answers

DIA SDK how to get parent function of FuncDebugStart / FuncDebugEnd?

The documentation for SymTagFuncDebugStart and SymTagFuncDebugEnd state that calling IDiaSymbol::get_lexicalParent will return a symbol for the enclosing function. I interpret this as I will get an IDiaSymbol whose get_symTag method returns…
Zachary Turner
  • 738
  • 4
  • 24
0
votes
1 answer

How do I make DIA release its lock on a pdb file?

How do I make DIA release its lock on a pdb file? I load a pdb and create a session as shown below, and it all works fine, I can use the session to get data from the pdb. When I'm finished with the pdb I release the session and the DiaSource, but…