http://bugs.winehq.org/show_bug.cgi?id=21422
Summary: winedbg cannot find local symbols in EXE. Product: Wine Version: 1.1.36 Platform: x86 OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: winedbg AssignedTo: wine-bugs@winehq.org ReportedBy: donpedro@tdcadsl.dk
While trying to debug:
http://bugs.winehq.org/show_bug.cgi?id=21388 (test.exe - attachment #1).
,i found this bug in winedbg. winedump finds all of the symbols, but winedbg cannot do the same.
so: "break __do_global_dtors" cannot find the symbol.
I tried to debug winedbg/dbghelp.dll a bit to find the problem and found some hints (i am not sure if all of it is correct):
1) Module_get_container() does not return the correct module. It returns "/lib/libc" as the container for "test.exe". This does not seem right.
If i hack myself around this i get to:
2) It would seem that winedbg/debughlp.dll only loads "export" symbols? As the EXE has no exports then no symbols are found.... is this right? What about all of the other symbols?
Furthermore, if i force the debugger to break at the correct place, the debugger seems to show the wrong disassembly. Not sure if that is the same bug or a different one.
http://bugs.winehq.org/show_bug.cgi?id=21422
Peter Dons Tychsen donpedro@tdcadsl.dk changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |eric.pouech@orange.fr
--- Comment #1 from Peter Dons Tychsen donpedro@tdcadsl.dk 2010-01-19 19:03:26 --- Adding Eric to CC as he seems to be the champion of winedbg/dbghelp. Hope he does not mind.
http://bugs.winehq.org/show_bug.cgi?id=21422
--- Comment #2 from Eric Pouech eric.pouech@orange.fr 2010-01-20 15:24:29 --- #1 is wrong
a/ test.exe doesn't any debug information b/ it just contains a COFF symbol table (likely generated by mingw), and no dwarf/stabs/codeview or even COFF debug info
what's wrong is that dbghelp doen't try to load the COFF symbol table when no debug info is present (is just tries to load the EXPORT table, which happens to be empty)
the module computation is likely correct, but the symbol you're looking for is present in two modules, but as dbghelp doesn't handle correctly the test.exe module, it only locates one symbol
real fix is to try to load the COFF symbol table before the export table that shouldn't be too long to do, just need to find time in order to find time to decide when to do it
http://bugs.winehq.org/show_bug.cgi?id=21422
--- Comment #3 from Peter Dons Tychsen donpedro@tdcadsl.dk 2010-01-20 15:58:25 --- Thanks for looking at it Eric.
a/ test.exe doesn't any debug information
Right, but it does have the symbols and the offsets.
the module computation is likely correct, but the symbol you're looking for is present in two modules, but as dbghelp doesn't handle correctly the test.exe module, it only locates one symbol
You might be right, but i still don't understand how module_get_container() can return "lib/libc" for "test.exe". Does it make sense?
real fix is to try to load the COFF symbol table before the export table that shouldn't be too long to do, just need to find time in order to find time to decide when to do it
Ok, great. Thanks again for looking into it.
/pedro
http://bugs.winehq.org/show_bug.cgi?id=21422
--- Comment #4 from Eric Pouech eric.pouech@orange.fr 2010-01-21 15:20:58 --- Created an attachment (id=25825) --> (http://bugs.winehq.org/attachment.cgi?id=25825) tentative patch
tentative patch (untested) does it help a bit ? A+
http://bugs.winehq.org/show_bug.cgi?id=21422
--- Comment #5 from Peter Dons Tychsen donpedro@tdcadsl.dk 2010-01-23 10:52:23 --- Thanks for the patch, but it does not work.
You can test it by "break __do_global_dtors". This should work.
Thanks,
/pedro
http://bugs.winehq.org/show_bug.cgi?id=21422
--- Comment #6 from Eric Pouech eric.pouech@orange.fr 2010-06-28 14:43:49 --- this should be fixed in current git A+
http://bugs.winehq.org/show_bug.cgi?id=21422
Eric Pouech eric.pouech@orange.fr changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |FIXED
--- Comment #7 from Eric Pouech eric.pouech@orange.fr 2010-07-03 06:57:59 --- fixed in current git
http://bugs.winehq.org/show_bug.cgi?id=21422
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #8 from Alexandre Julliard julliard@winehq.org 2010-07-09 11:57:22 --- Closing bugs fixed in 1.2-rc7.