mscvpdb.h: Move parsing definitions to dbghelp.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
59a187ec8d
commit
5f9bcb13b7
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
* =================================================== */
|
||||
|
|
Loading…
Reference in New Issue