Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do i use this on executable built using by mingw64-qmake? #89

Open
Youda008 opened this issue Jun 30, 2023 · 4 comments
Open

How do i use this on executable built using by mingw64-qmake? #89

Youda008 opened this issue Jun 30, 2023 · 4 comments

Comments

@Youda008
Copy link

Youda008 commented Jun 30, 2023

I use mingw64 (gcc, gdb, mingw32-make) toolchain to build applications on Windows and i use the qt5-static package to produce graphical applications with all Qt libraries statically linked. I made a debug build that includes the debug information in the executable.

When i run cv2pdb, it completes without error, but apparently the resulting pdb does not load into Visual Studio (Professional 2022) correctly, because all i see is this
obrazek

I tried putting the pdb file into the same directory as the crashed executable and the dump file,
I tried adding that directory to the symbol paths in Visual Studio settings,
but no luck so far.

I also noticed that my original executable had ~60MB, but after cv2pdb is has ~20MB while the pdb is only ~2.5MB, so clearly incomplete.

Is this scenario unsupported or do i need to setup something else?

@rainers
Copy link
Owner

rainers commented Jul 3, 2023

I guess cv2pdb is stumbling over something in your debug information. If you can make your original executable available I might have a look. Please note that DWARF5 support is limited, so if the debug information is in this format you could try generating DWARF4 instead.

@Youda008
Copy link
Author

Youda008 commented Jul 3, 2023

My executable is here
DoomRunner.zip

@rainers
Copy link
Owner

rainers commented Jul 6, 2023

Your executable uses DWARF 5 indeed. There was a recent addition to better support it that wasn't yet in a released binary. Did you try building cv2pdb from master? I now committed a tiny fix, but the version before also showed this call stack for your executable:

 	KernelBase.dll!RaiseFailFastException() + 0x152 bytes	Unknown
 	dr.exe!tryToWriteFile�()	C++
 	dr.exe!operator%<char, QString>�()	C++
 	dr.exe!operator%<char, QString>�()	C++
 	dr.exe!QList<Mod>::operator[]() Line 580	C++
 	dr.exe!AListModel<Mod>::operator[]() Line 173	C++
 	dr.exe!MainWindow::MainWindow() Line 342	C++
>	dr.exe!qMain() Line 29	C++
 	dr.exe!__mingw_enum_import_library_names�()	C++
 	dr.exe!__tmainCRTStartup() Line 268	C++
 	dr.exe!WinMainCRTStartup() Line 159	C++
 	kernel32.dll!BaseThreadInitThunk() + 0x14 bytes	Unknown
 	ntdll.dll!RtlUserThreadStart() + 0x21 bytes	Unknown

@Youda008
Copy link
Author

Youda008 commented Jul 7, 2023

I built the project from master, but unfortunatelly i'm getting simmilar results.
cv2pdb spams a lot of messages warn: could not find equivalent entry for typePtr 05BA764E, the resulting .pdb file is just 2.7 MB (where did the other 40 MB go?) and Visual Studio shows nothing.

But maybe that's because i don't know how to load the .pdb into Visual Studio properly? It never asked me where is the pdb file and doesn't give me option to point to it manually, so there must be some auto-detection involved, and maybe it's not working.
Found it https://www.codetinkerer.com/2017/12/06/debugging-3rd-party-nuget-packages.html

When i try to load that pdb file manually into Visual Studio, i get
obrazek

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants