diff --git a/dlls/dbghelp/dbghelp_private.h b/dlls/dbghelp/dbghelp_private.h index 5682acadf65..61173b34b5a 100644 --- a/dlls/dbghelp/dbghelp_private.h +++ b/dlls/dbghelp/dbghelp_private.h @@ -663,6 +663,21 @@ struct cpu extern struct cpu* dbghelp_current_cpu DECLSPEC_HIDDEN; +/* PDB and Codeview */ + +struct msc_debug_info +{ + struct module* module; + int nsect; + const IMAGE_SECTION_HEADER* sectp; + int nomap; + const OMAP* omapp; + const BYTE* root; +}; + +/* coff.c */ +extern BOOL coff_process_info(const struct msc_debug_info* msc_dbg) DECLSPEC_HIDDEN; + /* dbghelp.c */ extern struct process* process_find_by_handle(HANDLE hProcess) DECLSPEC_HIDDEN; extern BOOL validate_addr64(DWORD64 addr) DECLSPEC_HIDDEN; diff --git a/dlls/dbghelp/msc.c b/dlls/dbghelp/msc.c index b4487d583cb..97991be057f 100644 --- a/dlls/dbghelp/msc.c +++ b/dlls/dbghelp/msc.c @@ -1551,15 +1551,15 @@ static unsigned int codeview_map_offset(const struct msc_debug_info* msc_dbg, unsigned int offset) { int nomap = msc_dbg->nomap; - const OMAP_DATA* omapp = msc_dbg->omapp; + const OMAP* omapp = msc_dbg->omapp; int i; if (!nomap || !omapp) return offset; /* FIXME: use binary search */ for (i = 0; i < nomap - 1; i++) - if (omapp[i].from <= offset && omapp[i+1].from > offset) - return !omapp[i].to ? 0 : omapp[i].to + (offset - omapp[i].from); + if (omapp[i].rva <= offset && omapp[i+1].rva > offset) + return !omapp[i].rvaTo ? 0 : omapp[i].rvaTo + (offset - omapp[i].rva); return 0; } @@ -3414,8 +3414,8 @@ BOOL pe_load_debug_directory(const struct process* pcs, struct module* module, { if (dbg[i].Type == IMAGE_DEBUG_TYPE_OMAP_FROM_SRC) { - msc_dbg.nomap = dbg[i].SizeOfData / sizeof(OMAP_DATA); - msc_dbg.omapp = (const OMAP_DATA*)(mapping + dbg[i].PointerToRawData); + msc_dbg.nomap = dbg[i].SizeOfData / sizeof(OMAP); + msc_dbg.omapp = (const OMAP*)(mapping + dbg[i].PointerToRawData); break; } } diff --git a/include/wine/mscvpdb.h b/include/wine/mscvpdb.h index dcd0e4db303..e199aff785f 100644 --- a/include/wine/mscvpdb.h +++ b/include/wine/mscvpdb.h @@ -2520,29 +2520,6 @@ typedef struct _PDB_FPO_DATA #include "poppack.h" -/* ---------------------------------------------- - * Information used for parsing - * ---------------------------------------------- */ - -typedef struct -{ - DWORD from; - DWORD to; -} OMAP_DATA; - -struct msc_debug_info -{ - struct module* module; - int nsect; - const IMAGE_SECTION_HEADER* sectp; - int nomap; - const OMAP_DATA* omapp; - const BYTE* root; -}; - -/* coff.c */ -extern BOOL coff_process_info(const struct msc_debug_info* msc_dbg); - /* =================================================== * The old CodeView stuff (for NB09 and NB11) * =================================================== */