Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

new idea: ship the debug symbols in a separate file when we distribute C::B

(1/2) > >>

ollydbg:
debugging - How to generate gcc debug symbol outside the build target? - Stack Overflow

I see this link, and if we can catch call stack if we supply separate files. Any ideas?

Thanks.

BTW: to everyone, Happy Chinese New Year and Happy Loong 🐲 Year!

Pecan:

--- Quote from: ollydbg on February 14, 2024, 03:46:41 am ---debugging - How to generate gcc debug symbol outside the build target? - Stack Overflow

I see this link, and if we can catch call stack if we supply separate files. Any ideas?

Thanks.

BTW: to everyone, Happy Chinese New Year and Happy Loong 🐲 Year!

--- End quote ---

Wow !!
If we could distribute the debug symbols and be able to ask a user to: "Thanks for the crash report, could you rerun the problem with the debug symbols ..." etc. we could solve so many more problems. Especially in the on-going battle with CodeCompletion crashes that we have such a devil of a time re-creating in our local enviroment.

ollydbg:
Yes, I think they will help use to catch the crashes easily.

Our crash reporter is using

jrfonseca/drmingw: Postmortem debugging tools for MinGW.

And I see the drmingw use the davea42/libdwarf-code: Contains source for libdwarf, a library for reading DWARF2 and later DWARF. Contains source to create dwarfdump, a program which prints DWARF2 and later DWARF in readable format. Has a very limited DWARF writer set of functions in libdwarfp (producer library). Builds using GNU configure, meson, or cmake. to read the symbols.

So, I will first try to find whether those tools support separate debug files.

ollydbg:
A simple search in the drmingw site reveals that this feature is already supported. That's nice!

See:

Allow reading debug symbols from external files Issue #11 jrfonseca/drmingw

and

Search for debug symbols in .debug folder Issue #14 jrfonseca/drmingw

I will do a simple test project first.  :)

ollydbg:
A simple test shows that the separate debug symbol files of a exe file works correctly, drmingw can correctly record the RPT file.

For testing, I use the msys2/mingw64's gcc

https://packages.msys2.org/package/mingw-w64-x86_64-drmingw?repo=mingw64

And here is the test code: https://github.com/jrfonseca/drmingw/blob/master/sample/sample.cpp

When I generate a file named "test-drmingw.exe" under the "bin/Debug" folder, I have to run the following command to separate the debug symbols:


--- Code: ---objcopy --only-keep-debug test-drmingw.exe test-drmingw.debug
strip --strip-debug --strip-unneeded test-drmingw.exe
objcopy --add-gnu-debuglink test-drmingw.debug test-drmingw.exe

--- End code ---

The above operation is mainly followed by the answer in the post here: https://stackoverflow.com/a/18487233/154911

Then I run the exe file, and I see the test-drmingw.RPT shows the correct debug line information.

I will try to test whether a dll file crash works.

Navigation

[0] Message Index

[#] Next page

Go to full version