[Bug 50638] New: Builtin Dbghelp.dll doesn't succesfully load symbols from a FakePDB PDB file
https://bugs.winehq.org/show_bug.cgi?id=50638 Bug ID: 50638 Summary: Builtin Dbghelp.dll doesn't succesfully load symbols from a FakePDB PDB file Product: Wine Version: 6.1 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: minor Priority: P2 Component: dbghelp Assignee: wine-bugs(a)winehq.org Reporter: lorenzofer(a)live.it Distribution: ArchLinux Hi. FakePDB is a plugin for IDA PRO 7.x that from the current program and database loaded into IDA , generate a PDB file compatible with debuggers. I created a PDB for Oblivion.exe (the executable of the game The Elder Scroll Oblivion) as I weanted to try the system (and Oblivion has many internal definition decoded from various projects, from OBSE to OblivionReloaded) So I tried triggering a CTD (knowing a way to make the game crash immediatly) but the winedbg wasn't loading the symbols, sometimes causing a crash of the winedbg itself. In the terminals there were a lot of: 04f4:fixme:dbghelp:symt_get_address Unsupported sym-tag --- for get-address Going down the rabbit hole, I tried to see if I could get the value of the sym-tag, adding a print, but the value was nonsensical (1114872 in decimal) too big to be valid. I continued to debug: 0584:trace:dbghelp_msc:pdb_init PDB(C:\Games\Oblivion\Oblivion.pdb): "Microsoft C/C++ MSF 7.00\r\n\x1aDS\x00\ 0584:trace:dbghelp_msc:pdb_init found DS for C:\Games\Oblivion\Oblivion.pdb: age=1 guid={7bbd0a3a-8959-474f-aba3-082cd018c220} 0584:trace:dbghelp_msc:pdb_init PDB(e:\NetworkProjectsPC\OblivionSE\Oblivion\Game\Oblivion.pdb): "Microsoft C/C++ MSF 7.00\r\n\x1aDS\x00\ 0584:trace:dbghelp_msc:pdb_init found DS for e:\NetworkProjectsPC\OblivionSE\Oblivion\Game\Oblivion.pdb: age=1 guid={7bbd0a3a-8959-474f-aba3-082cd018c220} 0584:trace:dbghelp_symt:symt_new_public Adding public symbol L"oblivion":$LN21 @98124f 0584:trace:dbghelp_symt:symt_new_public Added public symbol L"oblivion":$LN21 @98124f a The PDB is found and loaded properly, and the first symbol is succesfully added. However after the first symbol is added all the others start to fail: 0584:trace:dbghelp_symt:symt_new_public Adding public symbol L"oblivion":??0?$LockFreeMap(a)PBDPAVKFModel@@@@QAE(a)XZ @438f10 0584:fixme:dbghelp:symt_get_address Unsupported sym-tag 1114872 for get-address 0584:trace:dbghelp_symt:symt_new_public Failing 10014 10000 10000 1465e64 (I added some traces to understand a bit better what's was going on, but the issue should be clear) Here seems to be that dbghelp_options is SYMOPT_AUTO_PUBLICS and symt_find_nearest(module, address) return a non-null address, so the function symt_new_public return null. For every symbols except the first and the :EntryPoint symbol. For now the only workaround I found is to comment this part of the code: if ((dbghelp_options & SYMOPT_AUTO_PUBLICS) == SYMOPT_AUTO_PUBLICS && (sym = symt_find_nearest(module, address) != NULL)){ return NULL; } And everything seems to work again, but I don't know if by doing this I broke something else. FakePDB code: https://github.com/Mixaill/FakePDB (It use LLVM to generate the PDB file) -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=50638 Austin English <austinenglish(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |austinenglish(a)gmail.com -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=50638 Eric Pouech <eric.pouech(a)orange.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |eric.pouech(a)orange.fr --- Comment #1 from Eric Pouech <eric.pouech(a)orange.fr> --- Can you provide a smaller test case ? Requiring to install external tools to regenerate files is not handy. Attaching a PDB file should be fine, but: - try to make it small - don't attach reverse engineering of commercial products (from above, the line
0584:fixme:dbghelp:symt_get_address Unsupported sym-tag 1114872 shows that dbghelp cannot read the file.. value for tag is way too high...)
thx -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=50638 --- Comment #2 from Lorenzo Ferrillo <lorenzofer(a)live.it> --- Hi Eric. Had a bit of time to test, and it seems that the patch isn't needed anymore. I will test further, but it's probably realted to the mass changes in dbghelp that recently happened -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
participants (1)
-
WineHQ Bugzilla