[PATCH] tools: Add gdbinit helper with LoadSymbolFiles command.

Bernhard Übelacker bernhardu at mailbox.org
Mon Jun 28 16:22:03 CDT 2021


Am 28.06.21 um 13:27 schrieb Rémi Bernon:
> 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
>>
>> [1] https://github.com/rr-debugger/rr/pull/2810
>>
> 
> 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,


Hello Rémi,
recording wine worked for me just when all wine processes are
inside the recording. Otherwise some modifications through e.g. mapped
memory does not get recorded (e.g. user_shared_data) which may lead when
replaying to wrong register values, as these modifications are missing.
Unfortunately this makes it kind of slow.
(Maybe at least wineserver and the desired process have to be in the
recording ... if modifications are just one way from wineserver
to other processes ... but that makes preparing the session ugly.)

And I am using it with AMD, but so called "SBB mitigation" is required.
I am using the kernel module: https://github.com/rr-debugger/rr/wiki/Zen

Kind regards,
Bernhard



More information about the wine-devel mailing list