From 2dd45a12c15da2912b77277fe7225378072f7615 Mon Sep 17 00:00:00 2001 From: Eric Pouech Date: Mon, 11 Apr 2011 20:47:13 +0200 Subject: [PATCH] dbghelp: For codeview/bprel symbols force the register to be EBP, other CPUs should use regrel symbol instead of bprel. --- dlls/dbghelp/msc.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/dlls/dbghelp/msc.c b/dlls/dbghelp/msc.c index 7d64239e32d..9abd0656042 100644 --- a/dlls/dbghelp/msc.c +++ b/dlls/dbghelp/msc.c @@ -1692,7 +1692,8 @@ static int codeview_snarf(const struct msc_debug_info* msc_dbg, const BYTE* root */ case S_BPREL_V1: loc.kind = loc_regrel; - loc.reg = 0; /* FIXME */ + /* Yes, it's i386 dependent, but that's the symbol purpose. S_REGREL is used on other CPUs */ + loc.reg = CV_REG_EBP; loc.offset = sym->stack_v1.offset; symt_add_func_local(msc_dbg->module, curr_func, sym->stack_v1.offset > 0 ? DataIsParam : DataIsLocal, @@ -1702,7 +1703,8 @@ static int codeview_snarf(const struct msc_debug_info* msc_dbg, const BYTE* root break; case S_BPREL_V2: loc.kind = loc_regrel; - loc.reg = 0; /* FIXME */ + /* Yes, it's i386 dependent, but that's the symbol purpose. S_REGREL is used on other CPUs */ + loc.reg = CV_REG_EBP; loc.offset = sym->stack_v2.offset; symt_add_func_local(msc_dbg->module, curr_func, sym->stack_v2.offset > 0 ? DataIsParam : DataIsLocal, @@ -1712,7 +1714,8 @@ static int codeview_snarf(const struct msc_debug_info* msc_dbg, const BYTE* root break; case S_BPREL_V3: loc.kind = loc_regrel; - loc.reg = 0; /* FIXME */ + /* Yes, it's i386 dependent, but that's the symbol purpose. S_REGREL is used on other CPUs */ + loc.reg = CV_REG_EBP; loc.offset = sym->stack_v3.offset; symt_add_func_local(msc_dbg->module, curr_func, sym->stack_v3.offset > 0 ? DataIsParam : DataIsLocal, -- 2.11.4.GIT