On Mon Apr 21 15:40:04 2025 +0000, Bernhard Übelacker wrote:
Hello Zhang, I was able to use rr-debugger in the past with following conditions:
- rr must be able to record at all, e.g. `rr record true` is working.
- The patch of this MR has to be applied to wine, otherwise `wine client
error:13c: partial write 65536` appears.
- Was working with a GCC mingw build, old style wow64 (separate
configure and build steps for 32-bit and 64-bit). (Currently I have a LLVM new style wow64 which triggers some fault in rr.)
- Either the whole set of wine processes has to be inside the recording.
(Or at least wineserver and the process of interest, but is more complicated to startup and stop wine.)
- Have wine*-preloader removed, otherwise gdb cannot load debug
information for *.so files.
- When just debugging at the unix-side (*.so) the regular gdb should be sufficient.
- For the PE-side (dll/exe) a patched
[gdb](https://github.com/JuliaComputing/gdb-solib-wine) (or rebased to more recent [gdb](https://github.com/bernhardu/gdb-solib-wine) version) is needed, so debug information for dll/exe files get loaded with information from the "Windows dynamic loader".
- The files get loaded by gdb here from the wineprefix, therefore files
need to match the build directory, e.g. by running `wine wineboot --update --force`. This are many conditions that need to be met, but if all is working its nice to be able to debug early startup or exceptions, forward and reverse. Too bad gdb does not understand PDBs. Backtraces are stopping at "syscall" boundaries.
Thank you very much, I am researching it.