When debugging windows programs with the remote GDB debugger, loading PDB symbols fails on Mac and Linux, but not on Windows.
I use this emulator. I attach to the remote GDB server from an initially empty workspace (without any database: Debugger β Attach β Remote GDB debugger). Here is the log:
FFFFFFFFFFFFFFFF: thread has started (tid=1)
100000000: loaded c:\windows\system32\win32u.dll
140000000: loaded c:\test.exe
180000000: loaded c:\windows\system32\ntdll.dll
FFFFFFFFFFFFFFFF: process c:\test.exe has started (pid=4294967294)
PDBSRC: loading symbols for 'c:\windows\system32\ntdll.dll'...
PDB: using PDBIDA provider
PDB: downloading http://msdl.microsoft.com/download/symbols/ntdll.pdb/180BF1B90AA75697D0EFEA5E5630AC7E1/ntdll.pdb => /tmp/ida/ntdll.pdb/180BF1B90AA75697D0EFEA5E5630AC7E1/ntdll.pdb
PDB: loading /tmp/ida/ntdll.pdb/180BF1B90AA75697D0EFEA5E5630AC7E1/ntdll.pdb
Expected data back.
IDA downloads symbols automatically, but it cannot load them into the database (Modules β context menu β Load debug symbols).
If I try to load the PDB file manually (File β Load file β PDB file...), I get this error log on Linux:
PDB: using PDBIDA provider
PDB: loading /tmp/ida/ntdll.pdb/180BF1B90AA75697D0EFEA5E5630AC7E1/ntdll.pdb
PDB: Failed to map PDB file to memory
and Please confirm dialog with the message:
: failed to load pdb info.
Do you want to browse for the pdb file on disk?
This does not allow the symbols to be loaded on Linux.
When I try to load the PDB file manually on Mac I get another dialog message:
PDB signature and/or age does not match the input file.
Do you want to load it anyway?
At least this allows me to load the symbols on Mac.
BTW, in this particular case, the emulator supports the GDB Host I/O packets (vFile:open, vFile:fstat, vFile:pread, etc), so itβs possible to download the original files from the remote system and calculate signatures or whatever needed.