Module: wine Branch: refs/heads/master Commit: dadd1080ee29cf35b1d5016b3b4c09046ed392d1 URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=dadd1080ee29cf35b1d5016b...
Author: Eric Pouech eric.pouech@wanadoo.fr Date: Sat Mar 18 13:33:03 2006 +0100
dbghelp: Fixes for NB11 types.
- when checking debug info in NB09 or NB11 format (CodeView), try to load the global types section
---
dlls/dbghelp/msc.c | 29 +++++++++++++++++++++++++++-- 1 files changed, 27 insertions(+), 2 deletions(-)
diff --git a/dlls/dbghelp/msc.c b/dlls/dbghelp/msc.c index c8db442..5542846 100644 --- a/dlls/dbghelp/msc.c +++ b/dlls/dbghelp/msc.c @@ -2100,12 +2100,36 @@ static BOOL codeview_process_info(const unsigned int i;
codeview_init_basic_types(msc_dbg->module); + + for (i = 0; i < hdr->cDir; i++) + { + ent = (const CV_DIRECTORY_ENTRY*)((const BYTE*)hdr + hdr->cbDirHeader + i * hdr->cbDirEntry); + if (ent->subsection == sstGlobalTypes) + { + const CV_ENTRY_GLOBAL_TYPES* types; + struct codeview_type_parse ctp; + + types = (const CV_ENTRY_GLOBAL_TYPES*)(msc_dbg->root + ent->lfo); + ctp.module = msc_dbg->module; + ctp.offset = (const DWORD*)(types + 1); + ctp.num = types->cTypes; + ctp.table = (const BYTE*)(ctp.offset + types->cTypes); + + cv_current_module = &cv_zmodules[0]; + if (cv_current_module->allowed) FIXME("Already allowed ??\n"); + cv_current_module->allowed = TRUE; + + codeview_parse_type_table(&ctp); + break; + } + } + ent = (const CV_DIRECTORY_ENTRY*)((const BYTE*)hdr + hdr->cbDirHeader); for (i = 0; i < hdr->cDir; i++, ent = next) { - next = (i == hdr->cDir-1)? NULL : + next = (i == hdr->cDir-1) ? NULL : (const CV_DIRECTORY_ENTRY*)((const BYTE*)ent + hdr->cbDirEntry); - prev = (i == 0)? NULL : + prev = (i == 0) ? NULL : (const CV_DIRECTORY_ENTRY*)((const BYTE*)ent - hdr->cbDirEntry);
if (ent->subsection == sstAlignSym) @@ -2137,6 +2161,7 @@ static BOOL codeview_process_info(const }
msc_dbg->module->module.SymType = SymCv; + codeview_clear_type_table(); ret = TRUE; break; }