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

Bernhard Übelacker bernhardu at mailbox.org
Thu Jun 24 15:50:19 CDT 2021


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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-Support-rr-debugger.patch
Type: text/x-patch
Size: 963 bytes
Desc: not available
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20210624/3aaf5b90/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0004-Map-also-the-.data-section-for-ELF-files.patch
Type: text/x-patch
Size: 2220 bytes
Desc: not available
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20210624/3aaf5b90/attachment-0001.bin>


More information about the wine-devel mailing list