winedump: Add support for CALLERS/CALLEES/INLINEES codeview records.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
3935234265
commit
f5800a7849
|
@ -1852,6 +1852,16 @@ union codeview_symbol
|
|||
unsigned char binaryAnnotations[0];
|
||||
} inline_site2_v3;
|
||||
|
||||
struct
|
||||
{
|
||||
unsigned short int len;
|
||||
unsigned short int id;
|
||||
unsigned int count;
|
||||
cv_typ_t funcs[0]; /* array of cuntions, count entries */
|
||||
#if 0
|
||||
unsigned int invocations[0]; /* array of count entries, paires with funcs */
|
||||
#endif
|
||||
} function_list_v3;
|
||||
};
|
||||
|
||||
enum BinaryAnnotationOpcode
|
||||
|
@ -2025,6 +2035,9 @@ enum BinaryAnnotationOpcode
|
|||
#define S_GDATA_HLSL32_EX 0x1164
|
||||
#define S_LDATA_HLSL32_EX 0x1165
|
||||
|
||||
/* not documented yet on MS CV github repo, but that's how LLVM calls it */
|
||||
#define S_INLINEES 0x1168
|
||||
|
||||
/* ======================================== *
|
||||
* Line number information
|
||||
* ======================================== */
|
||||
|
|
|
@ -1758,6 +1758,25 @@ BOOL codeview_dump_symbols(const void* root, unsigned long size)
|
|||
printf("Inline-site-end\n");
|
||||
break;
|
||||
|
||||
case S_CALLEES:
|
||||
case S_CALLERS:
|
||||
case S_INLINEES:
|
||||
{
|
||||
unsigned i, ninvoc;
|
||||
const unsigned* invoc;
|
||||
const char* tag;
|
||||
|
||||
if (sym->generic.id == S_CALLERS) tag = "Callers";
|
||||
else if (sym->generic.id == S_CALLEES) tag = "Callees";
|
||||
else tag = "Inlinees";
|
||||
printf("%s V3 count:%u\n", tag, sym->function_list_v3.count);
|
||||
invoc = (const unsigned*)&sym->function_list_v3.funcs[sym->function_list_v3.count];
|
||||
ninvoc = (const unsigned*)get_last(sym) - invoc;
|
||||
|
||||
for (i = 0; i < sym->function_list_v3.count; ++i)
|
||||
printf("\t\tfunc:%x invoc:%u\n", sym->function_list_v3.funcs[i], i < ninvoc ? invoc[i] : 0);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
printf("\n\t\t>>> Unsupported symbol-id %x sz=%d\n", sym->generic.id, sym->generic.len + 2);
|
||||
dump_data((const void*)sym, sym->generic.len + 2, " ");
|
||||
|
|
Loading…
Reference in New Issue