summaryrefslogtreecommitdiff
path: root/src/ToolBox/SOS/tests/dumpil.py
diff options
context:
space:
mode:
authorJiyoung Yun <jy910.yun@samsung.com>2016-11-23 19:09:09 +0900
committerJiyoung Yun <jy910.yun@samsung.com>2016-11-23 19:09:09 +0900
commit4b4aad7217d3292650e77eec2cf4c198ea9c3b4b (patch)
tree98110734c91668dfdbb126fcc0e15ddbd93738ca /src/ToolBox/SOS/tests/dumpil.py
parentfa45f57ed55137c75ac870356a1b8f76c84b229c (diff)
downloadcoreclr-4b4aad7217d3292650e77eec2cf4c198ea9c3b4b.tar.gz
coreclr-4b4aad7217d3292650e77eec2cf4c198ea9c3b4b.tar.bz2
coreclr-4b4aad7217d3292650e77eec2cf4c198ea9c3b4b.zip
Imported Upstream version 1.1.0upstream/1.1.0
Diffstat (limited to 'src/ToolBox/SOS/tests/dumpil.py')
-rw-r--r--src/ToolBox/SOS/tests/dumpil.py26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/ToolBox/SOS/tests/dumpil.py b/src/ToolBox/SOS/tests/dumpil.py
new file mode 100644
index 0000000000..9539b618bb
--- /dev/null
+++ b/src/ToolBox/SOS/tests/dumpil.py
@@ -0,0 +1,26 @@
+import lldb
+import lldbutil
+import re
+import os
+import testutils
+
+def runScenario(assemblyName, debugger, target):
+ process = target.GetProcess()
+ res = lldb.SBCommandReturnObject()
+ ci = debugger.GetCommandInterpreter()
+
+ testutils.stop_in_main(ci, process, assemblyName)
+ addr = testutils.exec_and_find(ci, "name2ee " + assemblyName + " Program.Main", "MethodDesc:\s+([0-9a-fA-F]+)")
+
+ result = False
+ if addr is not None:
+ ci.HandleCommand("dumpil " + addr, res)
+ if res.Succeeded():
+ result = True
+ else:
+ print("DumpIL failed:")
+ print(res.GetOutput())
+ print(res.GetError())
+
+ process.Continue()
+ return result