winedump: Correctly support flags in public records (V1 and V2).
Signed-off-by: Eric Pouech <eric.pouech@gmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
d4565f1541
commit
0003c64e5b
|
@ -2058,7 +2058,7 @@ static BOOL codeview_snarf_public(const struct msc_debug_info* msc_dbg, const BY
|
||||||
{
|
{
|
||||||
symt_new_public(msc_dbg->module, compiland,
|
symt_new_public(msc_dbg->module, compiland,
|
||||||
terminate_string(&sym->public_v1.p_name),
|
terminate_string(&sym->public_v1.p_name),
|
||||||
sym->public_v1.symtype == SYMTYPE_FUNCTION,
|
sym->public_v1.pubsymflags == SYMTYPE_FUNCTION,
|
||||||
codeview_get_address(msc_dbg, sym->public_v1.segment, sym->public_v1.offset), 1);
|
codeview_get_address(msc_dbg, sym->public_v1.segment, sym->public_v1.offset), 1);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -2067,7 +2067,7 @@ static BOOL codeview_snarf_public(const struct msc_debug_info* msc_dbg, const BY
|
||||||
{
|
{
|
||||||
symt_new_public(msc_dbg->module, compiland,
|
symt_new_public(msc_dbg->module, compiland,
|
||||||
terminate_string(&sym->public_v2.p_name),
|
terminate_string(&sym->public_v2.p_name),
|
||||||
sym->public_v2.symtype == SYMTYPE_FUNCTION,
|
sym->public_v2.pubsymflags == SYMTYPE_FUNCTION,
|
||||||
codeview_get_address(msc_dbg, sym->public_v2.segment, sym->public_v2.offset), 1);
|
codeview_get_address(msc_dbg, sym->public_v2.segment, sym->public_v2.offset), 1);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -1368,7 +1368,7 @@ union codeview_symbol
|
||||||
unsigned short int id;
|
unsigned short int id;
|
||||||
unsigned int offset;
|
unsigned int offset;
|
||||||
unsigned short segment;
|
unsigned short segment;
|
||||||
cv_typ16_t symtype;
|
unsigned short pubsymflags;
|
||||||
struct p_string p_name;
|
struct p_string p_name;
|
||||||
} public_v1;
|
} public_v1;
|
||||||
|
|
||||||
|
@ -1376,7 +1376,7 @@ union codeview_symbol
|
||||||
{
|
{
|
||||||
unsigned short int len;
|
unsigned short int len;
|
||||||
unsigned short int id;
|
unsigned short int id;
|
||||||
cv_typ_t symtype;
|
unsigned int pubsymflags;
|
||||||
unsigned int offset;
|
unsigned int offset;
|
||||||
unsigned short segment;
|
unsigned short segment;
|
||||||
struct p_string p_name;
|
struct p_string p_name;
|
||||||
|
|
|
@ -457,6 +457,20 @@ static const char* get_callconv(unsigned cc)
|
||||||
return callconv;
|
return callconv;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static const char* get_pubflags(unsigned flags)
|
||||||
|
{
|
||||||
|
static char ret[32];
|
||||||
|
|
||||||
|
ret[0] = '\0';
|
||||||
|
#define X(s) {if (ret[0]) strcat(ret, ";"); strcat(ret, s);}
|
||||||
|
if (flags & 1) X("code");
|
||||||
|
if (flags & 2) X("func");
|
||||||
|
if (flags & 4) X("manage");
|
||||||
|
if (flags & 8) X("msil");
|
||||||
|
#undef X
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
static void do_field(const unsigned char* start, const unsigned char* end)
|
static void do_field(const unsigned char* start, const unsigned char* end)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
|
@ -1134,21 +1148,25 @@ BOOL codeview_dump_symbols(const void* root, unsigned long size)
|
||||||
sym->data_v3.symtype);
|
sym->data_v3.symtype);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case S_PUB32_16t:
|
||||||
|
printf("\tS-Public V1 '%s' %04x:%08x flags:%s\n",
|
||||||
|
get_symbol_str(p_string(&sym->public_v1.p_name)),
|
||||||
|
sym->public_v1.segment, sym->public_v1.offset,
|
||||||
|
get_pubflags(sym->public_v1.pubsymflags));
|
||||||
|
break;
|
||||||
|
|
||||||
case S_PUB32_ST:
|
case S_PUB32_ST:
|
||||||
printf("\tS-Public V2 '%s' %04x:%08x type:%08x\n",
|
printf("\tS-Public V2 '%s' %04x:%08x flags:%s\n",
|
||||||
get_symbol_str(p_string(&sym->public_v2.p_name)),
|
get_symbol_str(p_string(&sym->public_v2.p_name)),
|
||||||
sym->public_v2.segment, sym->public_v2.offset,
|
sym->public_v2.segment, sym->public_v2.offset,
|
||||||
sym->public_v2.symtype);
|
get_pubflags(sym->public_v2.pubsymflags));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case S_PUB32:
|
case S_PUB32:
|
||||||
printf("\tS-Public V3 '%s' %04x:%08x flags%s%s%s%s\n",
|
printf("\tS-Public V3 '%s' %04x:%08x flags:%s\n",
|
||||||
get_symbol_str(sym->public_v3.name),
|
get_symbol_str(sym->public_v3.name),
|
||||||
sym->public_v3.segment, sym->public_v3.offset,
|
sym->public_v3.segment, sym->public_v3.offset,
|
||||||
(sym->public_v3.pubsymflags & 1) ? "-code" : "",
|
get_pubflags(sym->public_v3.pubsymflags));
|
||||||
(sym->public_v3.pubsymflags & 2) ? "-func" : "",
|
|
||||||
(sym->public_v3.pubsymflags & 4) ? "-manage" : "",
|
|
||||||
(sym->public_v3.pubsymflags & 8) ? "-msil" : "");
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case S_DATAREF:
|
case S_DATAREF:
|
||||||
|
|
Loading…
Reference in New Issue