MTuner icon indicating copy to clipboard operation
MTuner copied to clipboard

PDB files next to dll not loaded

Open maidamai0 opened this issue 5 years ago • 13 comments

I build my application with a debug version, and all binary files like *.exe, *.dll, *.pdb are all in one folder. My debugger can find them all but Mtuner can not load them. So I have many unknown

image

I tried to add a path to the binary file path in Settings/Debug symbols/Local store and reload the capture file, still no symbol.

Where does MTuner find those symbol files?

maidamai0 avatar Sep 24 '20 04:09 maidamai0

How did all the files end up in that one folder? Did you copy them? The path to PDB file is obtained from the executable and it shouldn't be needed to copy files around.

milostosic avatar Sep 24 '20 06:09 milostosic

Some dlls are compiled to there some are copied there. Is there any way to specify some paths to the pdb files?

maidamai0 avatar Sep 24 '20 06:09 maidamai0

It's hard to tell what's going on like this. I would suggest to build MTuner from source and debug searching for debug symbols in rdebug library. Normally if I compile some project I can just drag&drop it to MTuner and everything works - no way to tell what is different on your side

milostosic avatar Sep 24 '20 06:09 milostosic

OK, thanks I will try this.

maidamai0 avatar Sep 24 '20 06:09 maidamai0

I have the same with qt+msvc

xakod avatar Sep 25 '20 07:09 xakod

Can either of you debug this and see what's going on? This problem clearly happens 'sometimes' and I would like to understand what conditions are needed to reproduce this.

milostosic avatar Sep 25 '20 09:09 milostosic

I had a look at the source code yesterday and found it very hard to build... :cry: No CMake, many dependencies.

maidamai0 avatar Sep 25 '20 09:09 maidamai0

_NT_SYMBOL_PATH can help me find the Qt's pdb files. But the ones built myself in other places still can't load

maidamai0 avatar Sep 25 '20 09:09 maidamai0

I don't use CMake because it's not good, I use GENie

Your last message shows why this issue is problematic - "can't load"? Are you sure? Does it fail loading or finding symbols? I think you simply don't know an answer to this one and you'd have to debug to find it out.

If you are willing to debug this problem then I will be happy to help you to setup compiling MTuner - it's really quite easy.

milostosic avatar Sep 25 '20 09:09 milostosic

I meant it can't find the symbols. CMake does have many problems but it is a popular one so it may be easier for someone.

I'm not familiar with GENie but I'll try again this weekend.

maidamai0 avatar Sep 25 '20 09:09 maidamai0

You literally have only one command to execute with GENie, the choice of build script generating tool is irrelevant in this context.

milostosic avatar Sep 25 '20 09:09 milostosic

So, I am also having this issue. Also using CMake but in this case using LLVM for Windows rather than MSVC directly. LLVM for Windows does produce a valid PDB and the executable does point to it correctly. I can't test with MSVC to compare because I'm using some LLVM/GCC only language extensions for SIMD types.

The PDB also seems to be at least well formed enough for a tool like WinDBG to be able to provide stack traces and jump into source files like I would expect.

I have currently been trying to get setup to the point where I can build MTuner to try to give you some more detailed feedback here but it's turning into quite the chore. I got as far as needing lua dependencies but installing the lfs module seems to require installation from luarocks which I have been unable to get working; their installer for window seems to be broken as it prints an error when I try to ask it for its help message. After trying to get this building for a few hours I'm at a dead end.

Honeybunch avatar Sep 16 '21 22:09 Honeybunch

Just tried a different project with CMake but that I know builds with MSVC and it worked just fine. So in my case it's probably just an issue with LLVM for Windows and however that toolchain produces a PDB. If I can find some more time I'd like to try to get you some more details; getting this working with LLVM for Windows would be really helpful for me :)

Honeybunch avatar Sep 16 '21 22:09 Honeybunch