Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I retrieve file / function / line numbers from a PDB using the addresses in a client's call stack?

I'm adding some crash reporting to my game in C++, using the StackWalker library for Windows. I'm assuming that when a client generates a call stack, it will print addresses rather than file / function names, etc.

How can I convert these addresses into something human readable? I will be saving the PDB files, but I've got no idea how to inspect them.

like image 318
Raptormeat Avatar asked Jan 30 '26 03:01

Raptormeat


1 Answers

"I'm assuming that when a client generates a call stack, it will print addresses rather than file / function names"

Why are you assuming this? The page you linked has a section entitled "Loading the modules and symbols." It seems like this library will use your symbols if you tell it where to load them from. Is this not the case?

Alternately, you could spit out a process dump, and Visual Studio or windbg will know how to use it in combination with your symbol file(s).

If the library doesn't do what you want, though, and you still want to interact with your symbol files through custom code, you can go through this mess to dig out your symbols.

like image 112
iwolf Avatar answered Jan 31 '26 20:01

iwolf



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!