Commit e5c289f2 authored by Mark Harmstone's avatar Mark Harmstone Committed by Alexandre Julliard

mscvpdb.h: Use official names for CodeView constants.

parent 0a366f7e
......@@ -1609,57 +1609,57 @@ static BOOL codeview_snarf(const struct msc_debug_info* msc_dbg, const BYTE* roo
* Global and local data symbols. We don't associate these
* with any given source file.
*/
case S_GDATA_V1:
case S_LDATA_V1:
case S_GDATA32_16t:
case S_LDATA32_16t:
if (do_globals)
codeview_add_variable(msc_dbg, compiland, terminate_string(&sym->data_v1.p_name),
sym->data_v1.segment, sym->data_v1.offset, sym->data_v1.symtype,
sym->generic.id == S_LDATA_V1, FALSE, TRUE);
sym->generic.id == S_LDATA32_16t, FALSE, TRUE);
break;
case S_GDATA_V2:
case S_LDATA_V2:
case S_GDATA32_ST:
case S_LDATA32_ST:
if (do_globals)
codeview_add_variable(msc_dbg, compiland, terminate_string(&sym->data_v2.p_name),
sym->data_v2.segment, sym->data_v2.offset, sym->data_v2.symtype,
sym->generic.id == S_LDATA_V2, FALSE, TRUE);
sym->generic.id == S_LDATA32_ST, FALSE, TRUE);
break;
case S_GDATA_V3:
case S_LDATA_V3:
case S_GDATA32:
case S_LDATA32:
if (do_globals)
codeview_add_variable(msc_dbg, compiland, sym->data_v3.name,
sym->data_v3.segment, sym->data_v3.offset, sym->data_v3.symtype,
sym->generic.id == S_LDATA_V3, FALSE, TRUE);
sym->generic.id == S_LDATA32, FALSE, TRUE);
break;
/* variables with thread storage */
case S_GTHREAD_V1:
case S_LTHREAD_V1:
case S_GTHREAD32_16t:
case S_LTHREAD32_16t:
if (do_globals)
codeview_add_variable(msc_dbg, compiland, terminate_string(&sym->thread_v1.p_name),
sym->thread_v1.segment, sym->thread_v1.offset, sym->thread_v1.symtype,
sym->generic.id == S_LTHREAD_V1, TRUE, TRUE);
sym->generic.id == S_LTHREAD32_16t, TRUE, TRUE);
break;
case S_GTHREAD_V2:
case S_LTHREAD_V2:
case S_GTHREAD32_ST:
case S_LTHREAD32_ST:
if (do_globals)
codeview_add_variable(msc_dbg, compiland, terminate_string(&sym->thread_v2.p_name),
sym->thread_v2.segment, sym->thread_v2.offset, sym->thread_v2.symtype,
sym->generic.id == S_LTHREAD_V2, TRUE, TRUE);
sym->generic.id == S_LTHREAD32_ST, TRUE, TRUE);
break;
case S_GTHREAD_V3:
case S_LTHREAD_V3:
case S_GTHREAD32:
case S_LTHREAD32:
if (do_globals)
codeview_add_variable(msc_dbg, compiland, sym->thread_v3.name,
sym->thread_v3.segment, sym->thread_v3.offset, sym->thread_v3.symtype,
sym->generic.id == S_LTHREAD_V3, TRUE, TRUE);
sym->generic.id == S_LTHREAD32, TRUE, TRUE);
break;
/* Public symbols */
case S_PUB_V1:
case S_PUB_V2:
case S_PUB_V3:
case S_PUB_FUNC1_V3:
case S_PUB_FUNC2_V3:
case S_PUB32_16t:
case S_PUB32_ST:
case S_PUB32:
case S_PROCREF:
case S_LPROCREF:
/* will be handled later on in codeview_snarf_public */
break;
......@@ -1668,13 +1668,13 @@ static BOOL codeview_snarf(const struct msc_debug_info* msc_dbg, const BYTE* roo
* to a thunk, which is a stupid name for what amounts to
* a PLT slot in the normal jargon that everyone else uses.
*/
case S_THUNK_V1:
case S_THUNK32_ST:
symt_new_thunk(msc_dbg->module, compiland,
terminate_string(&sym->thunk_v1.p_name), sym->thunk_v1.thtype,
codeview_get_address(msc_dbg, sym->thunk_v1.segment, sym->thunk_v1.offset),
sym->thunk_v1.thunk_len);
break;
case S_THUNK_V3:
case S_THUNK32:
symt_new_thunk(msc_dbg->module, compiland,
sym->thunk_v3.name, sym->thunk_v3.thtype,
codeview_get_address(msc_dbg, sym->thunk_v3.segment, sym->thunk_v3.offset),
......@@ -1684,8 +1684,8 @@ static BOOL codeview_snarf(const struct msc_debug_info* msc_dbg, const BYTE* roo
/*
* Global and static functions.
*/
case S_GPROC_V1:
case S_LPROC_V1:
case S_GPROC32_16t:
case S_LPROC32_16t:
if (curr_func) FIXME("nested function\n");
curr_func = symt_new_function(msc_dbg->module, compiland,
terminate_string(&sym->proc_v1.p_name),
......@@ -1698,8 +1698,8 @@ static BOOL codeview_snarf(const struct msc_debug_info* msc_dbg, const BYTE* roo
loc.offset = sym->proc_v1.debug_end;
symt_add_function_point(msc_dbg->module, curr_func, SymTagFuncDebugEnd, &loc, NULL);
break;
case S_GPROC_V2:
case S_LPROC_V2:
case S_GPROC32_ST:
case S_LPROC32_ST:
if (curr_func) FIXME("nested function\n");
curr_func = symt_new_function(msc_dbg->module, compiland,
terminate_string(&sym->proc_v2.p_name),
......@@ -1712,8 +1712,8 @@ static BOOL codeview_snarf(const struct msc_debug_info* msc_dbg, const BYTE* roo
loc.offset = sym->proc_v2.debug_end;
symt_add_function_point(msc_dbg->module, curr_func, SymTagFuncDebugEnd, &loc, NULL);
break;
case S_GPROC_V3:
case S_LPROC_V3:
case S_GPROC32:
case S_LPROC32:
if (curr_func) FIXME("nested function\n");
curr_func = symt_new_function(msc_dbg->module, compiland,
sym->proc_v3.name,
......@@ -1729,7 +1729,7 @@ static BOOL codeview_snarf(const struct msc_debug_info* msc_dbg, const BYTE* roo
/*
* Function parameters and stack variables.
*/
case S_BPREL_V1:
case S_BPREL32_16t:
loc.kind = loc_regrel;
/* Yes, it's i386 dependent, but that's the symbol purpose. S_REGREL is used on other CPUs */
loc.reg = CV_REG_EBP;
......@@ -1740,7 +1740,7 @@ static BOOL codeview_snarf(const struct msc_debug_info* msc_dbg, const BYTE* roo
codeview_get_type(sym->stack_v1.symtype, FALSE),
terminate_string(&sym->stack_v1.p_name));
break;
case S_BPREL_V2:
case S_BPREL32_ST:
loc.kind = loc_regrel;
/* Yes, it's i386 dependent, but that's the symbol purpose. S_REGREL is used on other CPUs */
loc.reg = CV_REG_EBP;
......@@ -1751,7 +1751,7 @@ static BOOL codeview_snarf(const struct msc_debug_info* msc_dbg, const BYTE* roo
codeview_get_type(sym->stack_v2.symtype, FALSE),
terminate_string(&sym->stack_v2.p_name));
break;
case S_BPREL_V3:
case S_BPREL32:
loc.kind = loc_regrel;
/* Yes, it's i386 dependent, but that's the symbol purpose. S_REGREL is used on other CPUs */
loc.reg = CV_REG_EBP;
......@@ -1762,7 +1762,7 @@ static BOOL codeview_snarf(const struct msc_debug_info* msc_dbg, const BYTE* roo
codeview_get_type(sym->stack_v3.symtype, FALSE),
sym->stack_v3.name);
break;
case S_REGREL_V3:
case S_REGREL32:
loc.kind = loc_regrel;
loc.reg = sym->regrel_v3.reg;
loc.offset = sym->regrel_v3.offset;
......@@ -1774,7 +1774,7 @@ static BOOL codeview_snarf(const struct msc_debug_info* msc_dbg, const BYTE* roo
sym->regrel_v3.name);
break;
case S_REGISTER_V1:
case S_REGISTER_16t:
loc.kind = loc_register;
loc.reg = sym->register_v1.reg;
loc.offset = 0;
......@@ -1783,7 +1783,7 @@ static BOOL codeview_snarf(const struct msc_debug_info* msc_dbg, const BYTE* roo
block, codeview_get_type(sym->register_v1.type, FALSE),
terminate_string(&sym->register_v1.p_name));
break;
case S_REGISTER_V2:
case S_REGISTER_ST:
loc.kind = loc_register;
loc.reg = sym->register_v2.reg;
loc.offset = 0;
......@@ -1792,7 +1792,7 @@ static BOOL codeview_snarf(const struct msc_debug_info* msc_dbg, const BYTE* roo
block, codeview_get_type(sym->register_v2.type, FALSE),
terminate_string(&sym->register_v2.p_name));
break;
case S_REGISTER_V3:
case S_REGISTER:
loc.kind = loc_register;
loc.reg = sym->register_v3.reg;
loc.offset = 0;
......@@ -1802,18 +1802,18 @@ static BOOL codeview_snarf(const struct msc_debug_info* msc_dbg, const BYTE* roo
sym->register_v3.name);
break;
case S_BLOCK_V1:
case S_BLOCK32_ST:
block = symt_open_func_block(msc_dbg->module, curr_func, block,
codeview_get_address(msc_dbg, sym->block_v1.segment, sym->block_v1.offset),
sym->block_v1.length);
break;
case S_BLOCK_V3:
case S_BLOCK32:
block = symt_open_func_block(msc_dbg->module, curr_func, block,
codeview_get_address(msc_dbg, sym->block_v3.segment, sym->block_v3.offset),
sym->block_v3.length);
break;
case S_END_V1:
case S_END:
if (block)
{
block = symt_close_func_block(msc_dbg->module, curr_func, block, 0);
......@@ -1825,12 +1825,12 @@ static BOOL codeview_snarf(const struct msc_debug_info* msc_dbg, const BYTE* roo
}
break;
case S_COMPILAND_V1:
case S_COMPILE:
TRACE("S-Compiland-V1 %x %s\n",
sym->compiland_v1.unknown, terminate_string(&sym->compiland_v1.p_name));
break;
case S_COMPILAND_V2:
case S_COMPILE2_ST:
TRACE("S-Compiland-V2 %s\n", terminate_string(&sym->compiland_v2.p_name));
if (TRACE_ON(dbghelp_msc))
{
......@@ -1844,7 +1844,7 @@ static BOOL codeview_snarf(const struct msc_debug_info* msc_dbg, const BYTE* roo
}
}
break;
case S_COMPILAND_V3:
case S_OBJNAME:
TRACE("S-Compiland-V3 %s\n", sym->compiland_v3.name);
if (TRACE_ON(dbghelp_msc))
{
......@@ -1859,14 +1859,14 @@ static BOOL codeview_snarf(const struct msc_debug_info* msc_dbg, const BYTE* roo
}
break;
case S_OBJNAME_V1:
case S_OBJNAME_ST:
TRACE("S-ObjName %s\n", terminate_string(&sym->objname_v1.p_name));
compiland = symt_new_compiland(msc_dbg->module, 0 /* FIXME */,
source_new(msc_dbg->module, NULL,
terminate_string(&sym->objname_v1.p_name)));
break;
case S_LABEL_V1:
case S_LABEL32_ST:
if (curr_func)
{
loc.kind = loc_absolute;
......@@ -1878,7 +1878,7 @@ static BOOL codeview_snarf(const struct msc_debug_info* msc_dbg, const BYTE* roo
terminate_string(&sym->label_v1.p_name),
codeview_get_address(msc_dbg, sym->label_v1.segment, sym->label_v1.offset));
break;
case S_LABEL_V3:
case S_LABEL32:
if (curr_func)
{
loc.kind = loc_absolute;
......@@ -1890,7 +1890,7 @@ static BOOL codeview_snarf(const struct msc_debug_info* msc_dbg, const BYTE* roo
codeview_get_address(msc_dbg, sym->label_v3.segment, sym->label_v3.offset));
break;
case S_CONSTANT_V1:
case S_CONSTANT_16t:
{
int vlen;
const struct p_string* name;
......@@ -1907,7 +1907,7 @@ static BOOL codeview_snarf(const struct msc_debug_info* msc_dbg, const BYTE* roo
se, &v);
}
break;
case S_CONSTANT_V2:
case S_CONSTANT_ST:
{
int vlen;
const struct p_string* name;
......@@ -1924,7 +1924,7 @@ static BOOL codeview_snarf(const struct msc_debug_info* msc_dbg, const BYTE* roo
se, &v);
}
break;
case S_CONSTANT_V3:
case S_CONSTANT:
{
int vlen;
const char* name;
......@@ -1942,7 +1942,7 @@ static BOOL codeview_snarf(const struct msc_debug_info* msc_dbg, const BYTE* roo
}
break;
case S_UDT_V1:
case S_UDT_16t:
if (sym->udt_v1.type)
{
if ((symt = codeview_get_type(sym->udt_v1.type, FALSE)))
......@@ -1953,7 +1953,7 @@ static BOOL codeview_snarf(const struct msc_debug_info* msc_dbg, const BYTE* roo
terminate_string(&sym->udt_v1.p_name), sym->udt_v1.type);
}
break;
case S_UDT_V2:
case S_UDT_ST:
if (sym->udt_v2.type)
{
if ((symt = codeview_get_type(sym->udt_v2.type, FALSE)))
......@@ -1964,7 +1964,7 @@ static BOOL codeview_snarf(const struct msc_debug_info* msc_dbg, const BYTE* roo
terminate_string(&sym->udt_v2.p_name), sym->udt_v2.type);
}
break;
case S_UDT_V3:
case S_UDT:
if (sym->udt_v3.type)
{
if ((symt = codeview_get_type(sym->udt_v3.type, FALSE)))
......@@ -1980,9 +1980,9 @@ static BOOL codeview_snarf(const struct msc_debug_info* msc_dbg, const BYTE* roo
* additional length-prefixed string which is *not* included
* into the symbol length count. We need to skip it.
*/
case S_PROCREF_V1:
case S_DATAREF_V1:
case S_LPROCREF_V1:
case S_PROCREF_ST:
case S_DATAREF_ST:
case S_LPROCREF_ST:
{
const char* name;
......@@ -1991,17 +1991,17 @@ static BOOL codeview_snarf(const struct msc_debug_info* msc_dbg, const BYTE* roo
break;
}
case S_MSTOOL_V3: /* just to silence a few warnings */
case S_MSTOOLINFO_V3:
case S_MSTOOLENV_V3:
case S_COMPILE2: /* just to silence a few warnings */
case S_COMPILE3:
case S_ENVBLOCK:
break;
case S_SSEARCH_V1:
case S_SSEARCH:
TRACE("Start search: seg=0x%x at offset 0x%08x\n",
sym->ssearch_v1.segment, sym->ssearch_v1.offset);
break;
case S_ALIGN_V1:
case S_ALIGN:
TRACE("S-Align V1\n");
break;
case S_HEAPALLOCSITE:
......@@ -2012,17 +2012,17 @@ static BOOL codeview_snarf(const struct msc_debug_info* msc_dbg, const BYTE* roo
/* the symbols we can safely ignore for now */
case S_TRAMPOLINE:
case S_FRAMEINFO_V2:
case S_SECUCOOKIE_V3:
case S_SECTINFO_V3:
case S_SUBSECTINFO_V3:
case S_ENTRYPOINT_V3:
case S_LOCAL_VS2013:
case S_FRAMEPROC:
case S_FRAMECOOKIE:
case S_SECTION:
case S_COFFGROUP:
case S_EXPORT:
case S_LOCAL:
case S_CALLSITEINFO:
case S_DEFRANGE_REGISTER:
case S_DEFRANGE_FRAMEPOINTER_REL:
case S_DEFRANGE_SUBFIELD_REGISTER:
case S_FPOFF_VS2013:
case S_DEFRANGE_FRAMEPOINTER_REL_FULL_SCOPE:
case S_DEFRANGE_REGISTER_REL:
case S_BUILDINFO:
case S_INLINESITE:
......@@ -2065,7 +2065,7 @@ static BOOL codeview_snarf_public(const struct msc_debug_info* msc_dbg, const BY
switch (sym->generic.id)
{
case S_PUB_V1:
case S_PUB32_16t:
if (!(dbghelp_options & SYMOPT_NO_PUBLICS))
{
symt_new_public(msc_dbg->module, compiland,
......@@ -2074,7 +2074,7 @@ static BOOL codeview_snarf_public(const struct msc_debug_info* msc_dbg, const BY
codeview_get_address(msc_dbg, sym->public_v1.segment, sym->public_v1.offset), 1);
}
break;
case S_PUB_V2:
case S_PUB32_ST:
if (!(dbghelp_options & SYMOPT_NO_PUBLICS))
{
symt_new_public(msc_dbg->module, compiland,
......@@ -2084,7 +2084,7 @@ static BOOL codeview_snarf_public(const struct msc_debug_info* msc_dbg, const BY
}
break;
case S_PUB_V3:
case S_PUB32:
if (!(dbghelp_options & SYMOPT_NO_PUBLICS))
{
symt_new_public(msc_dbg->module, compiland,
......@@ -2093,8 +2093,8 @@ static BOOL codeview_snarf_public(const struct msc_debug_info* msc_dbg, const BY
codeview_get_address(msc_dbg, sym->public_v3.segment, sym->public_v3.offset), 1);
}
break;
case S_PUB_FUNC1_V3:
case S_PUB_FUNC2_V3: /* using a data_v3 isn't what we'd expect */
case S_PROCREF:
case S_LPROCREF: /* using a data_v3 isn't what we'd expect */
#if 0
/* FIXME: this is plain wrong (from a simple test) */
if (!(dbghelp_options & SYMOPT_NO_PUBLICS))
......@@ -2109,43 +2109,43 @@ static BOOL codeview_snarf_public(const struct msc_debug_info* msc_dbg, const BY
* Global and local data symbols. We don't associate these
* with any given source file.
*/
case S_GDATA_V1:
case S_LDATA_V1:
case S_GDATA32_16t:
case S_LDATA32_16t:
codeview_add_variable(msc_dbg, compiland, terminate_string(&sym->data_v1.p_name),
sym->data_v1.segment, sym->data_v1.offset, sym->data_v1.symtype,
sym->generic.id == S_LDATA_V1, FALSE, FALSE);
sym->generic.id == S_LDATA32_16t, FALSE, FALSE);
break;
case S_GDATA_V2:
case S_LDATA_V2:
case S_GDATA32_ST:
case S_LDATA32_ST:
codeview_add_variable(msc_dbg, compiland, terminate_string(&sym->data_v2.p_name),
sym->data_v2.segment, sym->data_v2.offset, sym->data_v2.symtype,
sym->generic.id == S_LDATA_V2, FALSE, FALSE);
sym->generic.id == S_LDATA32_ST, FALSE, FALSE);
break;
case S_GDATA_V3:
case S_LDATA_V3:
case S_GDATA32:
case S_LDATA32:
codeview_add_variable(msc_dbg, compiland, sym->data_v3.name,
sym->data_v3.segment, sym->data_v3.offset, sym->data_v3.symtype,
sym->generic.id == S_LDATA_V3, FALSE, FALSE);
sym->generic.id == S_LDATA32, FALSE, FALSE);
break;
/* variables with thread storage */
case S_GTHREAD_V1:
case S_LTHREAD_V1:
case S_GTHREAD32_16t:
case S_LTHREAD32_16t:
codeview_add_variable(msc_dbg, compiland, terminate_string(&sym->thread_v1.p_name),
sym->thread_v1.segment, sym->thread_v1.offset, sym->thread_v1.symtype,
sym->generic.id == S_LTHREAD_V1, TRUE, FALSE);
sym->generic.id == S_LTHREAD32_16t, TRUE, FALSE);
break;
case S_GTHREAD_V2:
case S_LTHREAD_V2:
case S_GTHREAD32_ST:
case S_LTHREAD32_ST:
codeview_add_variable(msc_dbg, compiland, terminate_string(&sym->thread_v2.p_name),
sym->thread_v2.segment, sym->thread_v2.offset, sym->thread_v2.symtype,
sym->generic.id == S_LTHREAD_V2, TRUE, FALSE);
sym->generic.id == S_LTHREAD32_ST, TRUE, FALSE);
break;
case S_GTHREAD_V3:
case S_LTHREAD_V3:
case S_GTHREAD32:
case S_LTHREAD32:
codeview_add_variable(msc_dbg, compiland, sym->thread_v3.name,
sym->thread_v3.segment, sym->thread_v3.offset, sym->thread_v3.symtype,
sym->generic.id == S_LTHREAD_V3, TRUE, FALSE);
sym->generic.id == S_LTHREAD32, TRUE, FALSE);
break;
/*
......@@ -2153,9 +2153,9 @@ static BOOL codeview_snarf_public(const struct msc_debug_info* msc_dbg, const BY
* additional length-prefixed string which is *not* included
* into the symbol length count. We need to skip it.
*/
case S_PROCREF_V1:
case S_DATAREF_V1:
case S_LPROCREF_V1:
case S_PROCREF_ST:
case S_DATAREF_ST:
case S_LPROCREF_ST:
length += (((const char*)sym)[length] + 1 + 3) & ~3;
break;
}
......
......@@ -1388,7 +1388,7 @@ union codeview_symbol
struct
{
short int len; /* Total length of this entry */
short int id; /* Always S_BPREL_V1 */
short int id; /* Always S_BPREL32_16t */
unsigned int offset; /* Stack offset relative to BP */
unsigned short symtype;
struct p_string p_name;
......@@ -1397,7 +1397,7 @@ union codeview_symbol
struct
{
short int len; /* Total length of this entry */
short int id; /* Always S_BPREL_V2 */
short int id; /* Always S_BPREL32_ST */
unsigned int offset; /* Stack offset relative to EBP */
unsigned int symtype;
struct p_string p_name;
......@@ -1406,7 +1406,7 @@ union codeview_symbol
struct
{
short int len; /* Total length of this entry */
short int id; /* Always S_BPREL_V3 */
short int id; /* Always S_BPREL32 */
int offset; /* Stack offset relative to BP */
unsigned int symtype;
char name[1];
......@@ -1415,7 +1415,7 @@ union codeview_symbol
struct
{
short int len; /* Total length of this entry */
short int id; /* Always S_BPREL_V3 */
short int id; /* Always S_BPREL32 */
int offset; /* Stack offset relative to BP */
unsigned int symtype;
unsigned short reg;
......@@ -1435,7 +1435,7 @@ union codeview_symbol
struct
{
short int len; /* Total length of this entry */
short int id; /* Always S_REGISTER_V2 */
short int id; /* Always S_REGISTER_ST */
unsigned int type; /* check whether type & reg are correct */
unsigned short reg;
struct p_string p_name;
......@@ -1445,7 +1445,7 @@ union codeview_symbol
struct
{
short int len; /* Total length of this entry */
short int id; /* Always S_REGISTER_V3 */
short int id; /* Always S_REGISTER */
unsigned int type; /* check whether type & reg are correct */
unsigned short reg;
char name[1];
......@@ -1656,82 +1656,82 @@ union codeview_symbol
} heap_alloc_site;
};
#define S_COMPILAND_V1 0x0001
#define S_REGISTER_V1 0x0002
#define S_CONSTANT_V1 0x0003
#define S_UDT_V1 0x0004
#define S_SSEARCH_V1 0x0005
#define S_END_V1 0x0006
#define S_SKIP_V1 0x0007
#define S_CVRESERVE_V1 0x0008
#define S_OBJNAME_V1 0x0009
#define S_ENDARG_V1 0x000a
#define S_COBOLUDT_V1 0x000b
#define S_MANYREG_V1 0x000c
#define S_RETURN_V1 0x000d
#define S_ENTRYTHIS_V1 0x000e
#define S_BPREL_V1 0x0200
#define S_LDATA_V1 0x0201
#define S_GDATA_V1 0x0202
#define S_PUB_V1 0x0203
#define S_LPROC_V1 0x0204
#define S_GPROC_V1 0x0205
#define S_THUNK_V1 0x0206
#define S_BLOCK_V1 0x0207
#define S_WITH_V1 0x0208
#define S_LABEL_V1 0x0209
#define S_CEXMODEL_V1 0x020a
#define S_VFTPATH_V1 0x020b
#define S_REGREL_V1 0x020c
#define S_LTHREAD_V1 0x020d
#define S_GTHREAD_V1 0x020e
#define S_PROCREF_V1 0x0400
#define S_DATAREF_V1 0x0401
#define S_ALIGN_V1 0x0402
#define S_LPROCREF_V1 0x0403
#define S_REGISTER_V2 0x1001 /* Variants with new 32-bit type indices */
#define S_CONSTANT_V2 0x1002
#define S_UDT_V2 0x1003
#define S_COBOLUDT_V2 0x1004
#define S_MANYREG_V2 0x1005
#define S_BPREL_V2 0x1006
#define S_LDATA_V2 0x1007
#define S_GDATA_V2 0x1008
#define S_PUB_V2 0x1009
#define S_LPROC_V2 0x100a
#define S_GPROC_V2 0x100b
#define S_VFTTABLE_V2 0x100c
#define S_REGREL_V2 0x100d
#define S_LTHREAD_V2 0x100e
#define S_GTHREAD_V2 0x100f
#define S_FRAMEINFO_V2 0x1012
#define S_COMPILAND_V2 0x1013
#define S_COMPILAND_V3 0x1101
#define S_THUNK_V3 0x1102
#define S_BLOCK_V3 0x1103
#define S_WITH_V3 0x1104
#define S_LABEL_V3 0x1105
#define S_REGISTER_V3 0x1106
#define S_CONSTANT_V3 0x1107
#define S_UDT_V3 0x1108
#define S_COBOLUDT_V3 0x1109
#define S_MANYREG_V3 0x110A
#define S_BPREL_V3 0x110B
#define S_LDATA_V3 0x110C
#define S_GDATA_V3 0x110D
#define S_PUB_V3 0x110E
#define S_LPROC_V3 0x110F
#define S_GPROC_V3 0x1110
#define S_REGREL_V3 0x1111
#define S_LTHREAD_V3 0x1112
#define S_GTHREAD_V3 0x1113
#define S_COMPILE 0x0001
#define S_REGISTER_16t 0x0002
#define S_CONSTANT_16t 0x0003
#define S_UDT_16t 0x0004
#define S_SSEARCH 0x0005
#define S_END 0x0006
#define S_SKIP 0x0007
#define S_CVRESERVE 0x0008
#define S_OBJNAME_ST 0x0009
#define S_ENDARG 0x000a
#define S_COBOLUDT_16t 0x000b
#define S_MANYREG_16t 0x000c
#define S_RETURN 0x000d
#define S_ENTRYTHIS 0x000e
#define S_BPREL32_16t 0x0200
#define S_LDATA32_16t 0x0201
#define S_GDATA32_16t 0x0202
#define S_PUB32_16t 0x0203
#define S_LPROC32_16t 0x0204
#define S_GPROC32_16t 0x0205
#define S_THUNK32_ST 0x0206
#define S_BLOCK32_ST 0x0207
#define S_WITH32_ST 0x0208
#define S_LABEL32_ST 0x0209
#define S_CEXMODEL32 0x020a
#define S_VFTABLE32_16t 0x020b
#define S_REGREL32_16t 0x020c
#define S_LTHREAD32_16t 0x020d
#define S_GTHREAD32_16t 0x020e
#define S_PROCREF_ST 0x0400
#define S_DATAREF_ST 0x0401
#define S_ALIGN 0x0402
#define S_LPROCREF_ST 0x0403
#define S_REGISTER_ST 0x1001 /* Variants with new 32-bit type indices */
#define S_CONSTANT_ST 0x1002
#define S_UDT_ST 0x1003
#define S_COBOLUDT_ST 0x1004
#define S_MANYREG_ST 0x1005
#define S_BPREL32_ST 0x1006
#define S_LDATA32_ST 0x1007
#define S_GDATA32_ST 0x1008
#define S_PUB32_ST 0x1009
#define S_LPROC32_ST 0x100a
#define S_GPROC32_ST 0x100b
#define S_VFTABLE32 0x100c
#define S_REGREL32_ST 0x100d
#define S_LTHREAD32_ST 0x100e
#define S_GTHREAD32_ST 0x100f
#define S_FRAMEPROC 0x1012
#define S_COMPILE2_ST 0x1013
#define S_OBJNAME 0x1101
#define S_THUNK32 0x1102
#define S_BLOCK32 0x1103
#define S_WITH32 0x1104
#define S_LABEL32 0x1105
#define S_REGISTER 0x1106
#define S_CONSTANT 0x1107
#define S_UDT 0x1108
#define S_COBOLUDT 0x1109
#define S_MANYREG 0x110A
#define S_BPREL32 0x110B
#define S_LDATA32 0x110C
#define S_GDATA32 0x110D
#define S_PUB32 0x110E
#define S_LPROC32 0x110F
#define S_GPROC32 0x1110
#define S_REGREL32 0x1111
#define S_LTHREAD32 0x1112
#define S_GTHREAD32 0x1113
#define S_LPROCMIPS 0x1114
#define S_GPROCMIPS 0x1115
#define S_MSTOOL_V3 0x1116 /* compiler command line options and build information */
#define S_COMPILE2 0x1116 /* compiler command line options and build information */
#define S_MANYREG2 0x1117
#define S_LPROCIA64 0x1118
#define S_GPROCIA64 0x1119
......@@ -1746,9 +1746,9 @@ union codeview_symbol
#define S_MANREGREL 0x1122
#define S_MANMANYREG2 0x1123
#define S_UNAMESPACE 0x1124
#define S_PUB_FUNC1_V3 0x1125 /* didn't get the difference between the two */
#define S_DATAREF_V3 0x1126
#define S_PUB_FUNC2_V3 0x1127
#define S_PROCREF 0x1125 /* didn't get the difference between the two */
#define S_DATAREF 0x1126
#define S_LPROCREF 0x1127
#define S_ANNOTATIONREF 0x1128
#define S_TOKENREF 0x1129
#define S_GMANPROC 0x112A
......@@ -1763,25 +1763,25 @@ union codeview_symbol
#define S_LOCAL_2005 0x1133
#define S_DEFRANGE_2005 0x1134
#define S_DEFRANGE2_2005 0x1135
#define S_SECTINFO_V3 0x1136
#define S_SUBSECTINFO_V3 0x1137
#define S_ENTRYPOINT_V3 0x1138
#define S_SECTION 0x1136
#define S_COFFGROUP 0x1137
#define S_EXPORT 0x1138
#define S_CALLSITEINFO 0x1139
#define S_SECUCOOKIE_V3 0x113A
#define S_FRAMECOOKIE 0x113A
#define S_DISCARDED 0x113B
#define S_MSTOOLINFO_V3 0x113C
#define S_MSTOOLENV_V3 0x113D
#define S_COMPILE3 0x113C
#define S_ENVBLOCK 0x113D
#define S_LOCAL_VS2013 0x113E
#define S_DEFRANGE_VS2013 0x113F
#define S_LOCAL 0x113E
#define S_DEFRANGE 0x113F
#define S_DEFRANGE_SUBFIELD 0x1140
#define S_DEFRANGE_REGISTER 0x1141
#define S_DEFRANGE_FRAMEPOINTER_REL 0x1142
#define S_DEFRANGE_SUBFIELD_REGISTER 0x1143
#define S_FPOFF_VS2013 0x1144
#define S_DEFRANGE_FRAMEPOINTER_REL_FULL_SCOPE 0x1144
#define S_DEFRANGE_REGISTER_REL 0x1145
#define S_LPROC32_VS2013 0x1146
#define S_GPROC32_VS2013 0x1147
#define S_LPROC32_ID 0x1146
#define S_GPROC32_ID 0x1147
#define S_LPROCMIPS_ID 0x1148
#define S_GPROCMIPS_ID 0x1149
#define S_LPROCIA64_ID 0x114A
......
......@@ -917,38 +917,38 @@ BOOL codeview_dump_symbols(const void* root, unsigned long size)
* Global and local data symbols. We don't associate these
* with any given source file.
*/
case S_GDATA_V2:
case S_LDATA_V2:
case S_GDATA32_ST:
case S_LDATA32_ST:
printf("\tS-%s-Data V2 '%s' %04x:%08x type:%08x\n",
sym->generic.id == S_GDATA_V2 ? "Global" : "Local",
sym->generic.id == S_GDATA32_ST ? "Global" : "Local",
get_symbol_str(p_string(&sym->data_v2.p_name)),
sym->data_v2.segment, sym->data_v2.offset, sym->data_v2.symtype);
break;
case S_LDATA_V3:
case S_GDATA_V3:
/* EPP case S_DATA_V3: */
case S_LDATA32:
case S_GDATA32:
/* EPP case S_DATA32: */
printf("\tS-%s-Data V3 '%s' (%04x:%08x) type:%08x\n",
sym->generic.id == S_GDATA_V3 ? "Global" : "Local",
sym->generic.id == S_GDATA32 ? "Global" : "Local",
get_symbol_str(sym->data_v3.name),
sym->data_v3.segment, sym->data_v3.offset,
sym->data_v3.symtype);
break;
case S_PUB_V2:
case S_PUB32_ST:
printf("\tS-Public V2 '%s' %04x:%08x type:%08x\n",
get_symbol_str(p_string(&sym->public_v2.p_name)),
sym->public_v2.segment, sym->public_v2.offset,
sym->public_v2.symtype);
break;
case S_PUB_V3:
case S_PUB32:
/* not completely sure of those two anyway */
case S_PUB_FUNC1_V3:
case S_PUB_FUNC2_V3:
case S_PROCREF:
case S_LPROCREF:
printf("\tS-Public%s V3 '%s' %04x:%08x type:%08x\n",
sym->generic.id == S_PUB_V3 ? "" :
(sym->generic.id == S_PUB_FUNC1_V3 ? "<subkind1" : "<subkind2"),
sym->generic.id == S_PUB32 ? "" :
(sym->generic.id == S_PROCREF ? "<subkind1" : "<subkind2"),
get_symbol_str(sym->public_v3.name),
sym->public_v3.segment,
sym->public_v3.offset, sym->public_v3.symtype);
......@@ -959,7 +959,7 @@ BOOL codeview_dump_symbols(const void* root, unsigned long size)
* to a thunk, which is a stupid name for what amounts to
* a PLT slot in the normal jargon that everyone else uses.
*/
case S_THUNK_V1:
case S_THUNK32_ST:
printf("\tS-Thunk V1 '%s' (%04x:%08x#%x) type:%x\n",
p_string(&sym->thunk_v1.p_name),
sym->thunk_v1.segment, sym->thunk_v1.offset,
......@@ -967,7 +967,7 @@ BOOL codeview_dump_symbols(const void* root, unsigned long size)
curr_func = strdup(p_string(&sym->thunk_v1.p_name));
break;
case S_THUNK_V3:
case S_THUNK32:
printf("\tS-Thunk V3 '%s' (%04x:%08x#%x) type:%x\n",
sym->thunk_v3.name,
sym->thunk_v3.segment, sym->thunk_v3.offset,
......@@ -976,10 +976,10 @@ BOOL codeview_dump_symbols(const void* root, unsigned long size)
break;
/* Global and static functions */
case S_GPROC_V1:
case S_LPROC_V1:
case S_GPROC32_16t:
case S_LPROC32_16t:
printf("\tS-%s-Proc V1: '%s' (%04x:%08x#%x) type:%x attr:%x\n",
sym->generic.id == S_GPROC_V1 ? "Global" : "-Local",
sym->generic.id == S_GPROC32_16t ? "Global" : "-Local",
p_string(&sym->proc_v1.p_name),
sym->proc_v1.segment, sym->proc_v1.offset,
sym->proc_v1.proc_len, sym->proc_v1.proctype,
......@@ -997,10 +997,10 @@ BOOL codeview_dump_symbols(const void* root, unsigned long size)
/* EPP unsigned int next; */
break;
case S_GPROC_V2:
case S_LPROC_V2:
case S_GPROC32_ST:
case S_LPROC32_ST:
printf("\tS-%s-Proc V2: '%s' (%04x:%08x#%x) type:%x attr:%x\n",
sym->generic.id == S_GPROC_V2 ? "Global" : "-Local",
sym->generic.id == S_GPROC32_ST ? "Global" : "-Local",
p_string(&sym->proc_v2.p_name),
sym->proc_v2.segment, sym->proc_v2.offset,
sym->proc_v2.proc_len, sym->proc_v2.proctype,
......@@ -1018,10 +1018,10 @@ BOOL codeview_dump_symbols(const void* root, unsigned long size)
/* EPP unsigned int next; */
break;
case S_LPROC_V3:
case S_GPROC_V3:
case S_LPROC32:
case S_GPROC32:
printf("\tS-%s-Procedure V3 '%s' (%04x:%08x#%x) type:%x attr:%x\n",
sym->generic.id == S_GPROC_V3 ? "Global" : "Local",
sym->generic.id == S_GPROC32 ? "Global" : "Local",
sym->proc_v3.name,
sym->proc_v3.segment, sym->proc_v3.offset,
sym->proc_v3.proc_len, sym->proc_v3.proctype,
......@@ -1040,49 +1040,49 @@ BOOL codeview_dump_symbols(const void* root, unsigned long size)
break;
/* Function parameters and stack variables */
case S_BPREL_V1:
case S_BPREL32_16t:
printf("\tS-BP-relative V1: '%s' @%d type:%x (%s)\n",
p_string(&sym->stack_v1.p_name),
sym->stack_v1.offset, sym->stack_v1.symtype, curr_func);
break;
case S_BPREL_V2:
case S_BPREL32_ST:
printf("\tS-BP-relative V2: '%s' @%d type:%x (%s)\n",
p_string(&sym->stack_v2.p_name),
sym->stack_v2.offset, sym->stack_v2.symtype, curr_func);
break;
case S_BPREL_V3:
case S_BPREL32:
printf("\tS-BP-relative V3: '%s' @%d type:%x (in %s)\n",
sym->stack_v3.name, sym->stack_v3.offset,
sym->stack_v3.symtype, curr_func);
break;
case S_REGREL_V3:
case S_REGREL32:
printf("\tS-Reg-relative V3: '%s' @%d type:%x reg:%x (in %s)\n",
sym->regrel_v3.name, sym->regrel_v3.offset,
sym->regrel_v3.symtype, sym->regrel_v3.reg, curr_func);
break;
case S_REGISTER_V1:
case S_REGISTER_16t:
printf("\tS-Register V1 '%s' in %s type:%x register:%x\n",
p_string(&sym->register_v1.p_name),
curr_func, sym->register_v1.reg, sym->register_v1.type);
break;
case S_REGISTER_V2:
case S_REGISTER_ST:
printf("\tS-Register V2 '%s' in %s type:%x register:%x\n",
p_string(&sym->register_v2.p_name),
curr_func, sym->register_v2.reg, sym->register_v2.type);
break;
case S_REGISTER_V3:
case S_REGISTER:
printf("\tS-Register V3 '%s' in %s type:%x register:%x\n",
sym->register_v3.name,
curr_func, sym->register_v3.reg, sym->register_v3.type);
break;
case S_BLOCK_V1:
case S_BLOCK32_ST:
printf("\tS-Block V1 '%s' in '%s' (%04x:%08x#%08x)\n",
p_string(&sym->block_v1.p_name),
curr_func,
......@@ -1091,7 +1091,7 @@ BOOL codeview_dump_symbols(const void* root, unsigned long size)
nest_block++;
break;
case S_BLOCK_V3:
case S_BLOCK32:
printf("\tS-Block V3 '%s' in '%s' (%04x:%08x#%08x) parent:%u end:%x\n",
sym->block_v3.name, curr_func,
sym->block_v3.segment, sym->block_v3.offset, sym->block_v3.length,
......@@ -1100,7 +1100,7 @@ BOOL codeview_dump_symbols(const void* root, unsigned long size)
break;
/* Additional function information */
case S_FRAMEINFO_V2:
case S_FRAMEPROC:
printf("\tS-Frame-Info V2: frame-size:%x unk2:%x unk3:%x saved-regs-sz:%x eh(%04x:%08x) flags:%08x\n",
sym->frame_info_v2.sz_frame,
sym->frame_info_v2.unknown2,
......@@ -1111,12 +1111,12 @@ BOOL codeview_dump_symbols(const void* root, unsigned long size)
sym->frame_info_v2.flags);
break;
case S_SECUCOOKIE_V3:
case S_FRAMECOOKIE:
printf("\tSecurity Cookie V3 @%d unk:%x\n",
sym->security_cookie_v3.offset, sym->security_cookie_v3.unknown);
break;
case S_END_V1:
case S_END:
if (nest_block)
{
nest_block--;
......@@ -1130,7 +1130,7 @@ BOOL codeview_dump_symbols(const void* root, unsigned long size)
}
break;
case S_COMPILAND_V1:
case S_COMPILE:
{
const char* machine;
const char* lang;
......@@ -1176,7 +1176,7 @@ BOOL codeview_dump_symbols(const void* root, unsigned long size)
}
break;
case S_COMPILAND_V2:
case S_COMPILE2_ST:
printf("\tS-Compiland V2 '%s'\n",
p_string(&sym->compiland_v2.p_name));
dump_data((const void*)sym, sym->generic.len + 2, " ");
......@@ -1190,29 +1190,29 @@ BOOL codeview_dump_symbols(const void* root, unsigned long size)
}
break;
case S_COMPILAND_V3:
case S_OBJNAME:
printf("\tS-Compiland V3 '%s' unknown:%x\n",
sym->compiland_v3.name, sym->compiland_v3.unknown);
break;
case S_OBJNAME_V1:
case S_OBJNAME_ST:
printf("\tS-ObjName V1 sig:%.4s '%s'\n",
sym->objname_v1.signature, p_string(&sym->objname_v1.p_name));
break;
case S_LABEL_V1:
case S_LABEL32_ST:
printf("\tS-Label V1 '%s' in '%s' (%04x:%08x)\n",
p_string(&sym->label_v1.p_name),
curr_func, sym->label_v1.segment, sym->label_v1.offset);
break;
case S_LABEL_V3:
case S_LABEL32:
printf("\tS-Label V3 '%s' in '%s' (%04x:%08x) flag:%x\n",
sym->label_v3.name, curr_func, sym->label_v3.segment,
sym->label_v3.offset, sym->label_v3.flags);
break;
case S_CONSTANT_V2:
case S_CONSTANT_ST:
{
int vlen;
struct full_value fv;
......@@ -1224,7 +1224,7 @@ BOOL codeview_dump_symbols(const void* root, unsigned long size)
}
break;
case S_CONSTANT_V3:
case S_CONSTANT:
{
int vlen;
struct full_value fv;
......@@ -1236,17 +1236,17 @@ BOOL codeview_dump_symbols(const void* root, unsigned long size)
}
break;
case S_UDT_V1:
case S_UDT_16t:
printf("\tS-Udt V1 '%s': type:0x%x\n",
p_string(&sym->udt_v1.p_name), sym->udt_v1.type);
break;
case S_UDT_V2:
case S_UDT_ST:
printf("\tS-Udt V2 '%s': type:0x%x\n",
p_string(&sym->udt_v2.p_name), sym->udt_v2.type);
break;
case S_UDT_V3:
case S_UDT:
printf("\tS-Udt V3 '%s': type:0x%x\n",
sym->udt_v3.name, sym->udt_v3.type);
break;
......@@ -1255,11 +1255,11 @@ BOOL codeview_dump_symbols(const void* root, unsigned long size)
* additional length-prefixed string which is *not* included
* into the symbol length count. We need to skip it.
*/
case S_PROCREF_V1:
case S_PROCREF_ST:
printf("\tS-Procref V1 "); goto doaref;
case S_DATAREF_V1:
case S_DATAREF_ST:
printf("\tS-Dataref V1 "); goto doaref;
case S_LPROCREF_V1:
case S_LPROCREF_ST:
printf("\tS-L-Procref V1 "); goto doaref;
doaref:
{
......@@ -1272,7 +1272,7 @@ BOOL codeview_dump_symbols(const void* root, unsigned long size)
p_string(pname));
}
break;
case S_MSTOOL_V3: /* info about tool used to create CU */
case S_COMPILE2: /* info about tool used to create CU */
{
const unsigned short* ptr = ((const unsigned short*)sym) + 2;
const char* x1;
......@@ -1290,7 +1290,7 @@ BOOL codeview_dump_symbols(const void* root, unsigned long size)
}
break;
case S_MSTOOLINFO_V3:
case S_COMPILE3:
{
const unsigned short* ptr = ((const unsigned short*)sym) + 2;
......@@ -1302,7 +1302,7 @@ BOOL codeview_dump_symbols(const void* root, unsigned long size)
}
break;
case S_MSTOOLENV_V3:
case S_ENVBLOCK:
{
const char* x1 = (const char*)sym + 4 + 1;
const char* x2;
......@@ -1318,16 +1318,16 @@ BOOL codeview_dump_symbols(const void* root, unsigned long size)
}
break;
case S_ALIGN_V1:
case S_ALIGN:
/* simply skip it */
break;
case S_SSEARCH_V1:
case S_SSEARCH:
printf("\tSSearch V1: (%04x:%08x)\n",
sym->ssearch_v1.segment, sym->ssearch_v1.offset);
break;
case S_SECTINFO_V3:
case S_SECTION:
printf("\tSSection Info: seg=%04x ?=%04x rva=%08x size=%08x attr=%08x %s\n",
*(const unsigned short*)((const char*)sym + 4),
*(const unsigned short*)((const char*)sym + 6),
......@@ -1337,7 +1337,7 @@ BOOL codeview_dump_symbols(const void* root, unsigned long size)
(const char*)sym + 20);
break;
case S_SUBSECTINFO_V3:
case S_COFFGROUP:
printf("\tSSubSection Info: addr=%04x:%08x size=%08x attr=%08x %s\n",
*(const unsigned short*)((const char*)sym + 16),
*(const unsigned*)((const char*)sym + 12),
......@@ -1346,31 +1346,31 @@ BOOL codeview_dump_symbols(const void* root, unsigned long size)
(const char*)sym + 18);
break;
case S_ENTRYPOINT_V3:
case S_EXPORT:
printf("\tSEntryPoint: id=%x '%s'\n",
*(const unsigned*)((const char*)sym + 4), (const char*)sym + 8);
break;
case S_LTHREAD_V1:
case S_GTHREAD_V1:
case S_LTHREAD32_16t:
case S_GTHREAD32_16t:
printf("\tS-Thread %s Var V1 '%s' seg=%04x offset=%08x type=%x\n",
sym->generic.id == S_LTHREAD_V1 ? "global" : "local",
sym->generic.id == S_LTHREAD32_16t ? "global" : "local",
p_string(&sym->thread_v1.p_name),
sym->thread_v1.segment, sym->thread_v1.offset, sym->thread_v1.symtype);
break;
case S_LTHREAD_V2:
case S_GTHREAD_V2:
case S_LTHREAD32_ST:
case S_GTHREAD32_ST:
printf("\tS-Thread %s Var V2 '%s' seg=%04x offset=%08x type=%x\n",
sym->generic.id == S_LTHREAD_V2 ? "global" : "local",
sym->generic.id == S_LTHREAD32_ST ? "global" : "local",
p_string(&sym->thread_v2.p_name),
sym->thread_v2.segment, sym->thread_v2.offset, sym->thread_v2.symtype);
break;
case S_LTHREAD_V3:
case S_GTHREAD_V3:
case S_LTHREAD32:
case S_GTHREAD32:
printf("\tS-Thread %s Var V3 '%s' seg=%04x offset=%08x type=%x\n",
sym->generic.id == S_LTHREAD_V3 ? "global" : "local", sym->thread_v3.name,
sym->generic.id == S_LTHREAD32 ? "global" : "local", sym->thread_v3.name,
sym->thread_v3.segment, sym->thread_v3.offset, sym->thread_v3.symtype);
break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment