On 6/24/21 10:50 PM, Bernhard Übelacker wrote:
Hello Rémi, I was trying to do similar with rr-debugger [1] to load symbols iterating over mapped files, but it never got into a really got state.
But with a little modification (patch attached), your script does the same and is way less complicated.
I noted just one issue while testing a little with notepad.exe, with plain gdb and rr:
Sections other than .text of ELF libraries get mapped to address 0x0. (Could you see this too in 'info target'?) This combined with a kind of huge .data section of shell32.dll.so overlaps then with .text of notepad.exe, therefore gdb shows then in a backtrace not the right symbols. The other attached patch tries to also map the data section to resolve this. But I am not sure if other sections should also be mapped.
Thanks for sharing.
Kind regards, Bernhard
Hi Bernhard,
Thanks for the feedback, I've also tried rr in the past, without much success so far, but I'd love to be able to use it with Wine. On Intel, gdb supports branch trace record, which has been very, very, convenient to debug Wine issues but I'm now on AMD and I'm missing it a bit.
I haven't looked into the issue you mentioned, and I think I've seen a few cases where the debug symbols were off, but in general it's been working well enough. I'll try to have a better look.
Cheers,