[PATCH 06/14] tools/winedump: added support for CALLERS/CALLEES/INLINEES codeview records
Eric Pouech
eric.pouech at gmail.com
Tue Aug 24 04:11:55 CDT 2021
Signed-off-by: Eric Pouech <eric.pouech at gmail.com>
---
include/wine/mscvpdb.h | 13 +++++++++++++
tools/winedump/msc.c | 19 +++++++++++++++++++
2 files changed, 32 insertions(+)
diff --git a/include/wine/mscvpdb.h b/include/wine/mscvpdb.h
index 20b3314ea04..4ab83ef1f02 100644
--- a/include/wine/mscvpdb.h
+++ b/include/wine/mscvpdb.h
@@ -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
* ======================================== */
diff --git a/tools/winedump/msc.c b/tools/winedump/msc.c
index aba14af8643..8948428427b 100644
--- a/tools/winedump/msc.c
+++ b/tools/winedump/msc.c
@@ -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, " ");
More information about the wine-devel
mailing list