summaryrefslogtreecommitdiff
path: root/src/ToolBox/superpmi/mcs/verbdumptoc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ToolBox/superpmi/mcs/verbdumptoc.cpp')
-rw-r--r--src/ToolBox/superpmi/mcs/verbdumptoc.cpp32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/ToolBox/superpmi/mcs/verbdumptoc.cpp b/src/ToolBox/superpmi/mcs/verbdumptoc.cpp
new file mode 100644
index 0000000000..2837f0bf3e
--- /dev/null
+++ b/src/ToolBox/superpmi/mcs/verbdumptoc.cpp
@@ -0,0 +1,32 @@
+//
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
+
+#include "standardpch.h"
+#include "verbdumptoc.h"
+#include "methodcontext.h"
+#include "tocfile.h"
+#include "runtimedetails.h"
+
+int verbDumpToc::DoWork(const char *nameOfInput)
+{
+ TOCFile tf;
+
+ tf.LoadToc(nameOfInput, false);
+
+ for (size_t i = 0; i < tf.GetTocCount(); i++)
+ {
+ const TOCElement* te = tf.GetElementPtr(i);
+ printf("%4u: %016llX ", te->Number, te->Offset);
+
+ for (int j = 0; j < sizeof(te->Hash); j++)
+ {
+ printf("%02x ", te->Hash[j]);
+ }
+
+ printf("\n");
+ }
+
+ return 0;
+}