Jacek Caban : dbghelp: Use DWARF registry mapping quirk only for actual macho modules.
Alexandre Julliard
julliard at winehq.org
Mon Mar 30 16:24:25 CDT 2020
Module: wine
Branch: master
Commit: 3b6c268380d703079fa3c5ca06f67b6feb02487f
URL: https://source.winehq.org/git/wine.git/?a=commit;h=3b6c268380d703079fa3c5ca06f67b6feb02487f
Author: Jacek Caban <jacek at codeweavers.com>
Date: Sun Mar 29 21:01:02 2020 +0200
dbghelp: Use DWARF registry mapping quirk only for actual macho modules.
Fixes handling DWARF in PE on macOS.
Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/dbghelp/cpu_i386.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/dlls/dbghelp/cpu_i386.c b/dlls/dbghelp/cpu_i386.c
index 6636d445c5..fd808a0d32 100644
--- a/dlls/dbghelp/cpu_i386.c
+++ b/dlls/dbghelp/cpu_i386.c
@@ -520,13 +520,11 @@ static unsigned i386_map_dwarf_register(unsigned regno, const struct module* mod
case 3: reg = CV_REG_EBX; break;
case 4:
case 5:
-#ifdef __APPLE__
/* On OS X, DWARF eh_frame uses a different mapping for the registers. It's
apparently the mapping as emitted by GCC, at least at some point in its history. */
- if (eh_frame)
+ if (eh_frame && module->type == DMT_MACHO)
reg = (regno == 4) ? CV_REG_EBP : CV_REG_ESP;
else
-#endif
reg = (regno == 4) ? CV_REG_ESP : CV_REG_EBP;
break;
case 6: reg = CV_REG_ESI; break;
More information about the wine-cvs
mailing list