summaryrefslogtreecommitdiffstats
path: root/lldb/test/python_api/function_symbol/TestDisasmAPI.py
diff options
context:
space:
mode:
authorJohnny Chen <johnny.chen@apple.com>2011-04-19 19:44:26 +0000
committerJohnny Chen <johnny.chen@apple.com>2011-04-19 19:44:26 +0000
commit9efcb0ec4d19a655a2698a83f5c70f7b622d655a (patch)
tree267e62516102362f946a2347887b6a643cde495c /lldb/test/python_api/function_symbol/TestDisasmAPI.py
parentfbf1cfea129dd49f72126e0e7ba9762052e30fb3 (diff)
downloadbcm5719-llvm-9efcb0ec4d19a655a2698a83f5c70f7b622d655a.tar.gz
bcm5719-llvm-9efcb0ec4d19a655a2698a83f5c70f7b622d655a.zip
Converted to use SBProcess.LaunchSimple() API.
And use self.TraceOn() in order to print more debug output. llvm-svn: 129791
Diffstat (limited to 'lldb/test/python_api/function_symbol/TestDisasmAPI.py')
-rw-r--r--lldb/test/python_api/function_symbol/TestDisasmAPI.py18
1 files changed, 11 insertions, 7 deletions
diff --git a/lldb/test/python_api/function_symbol/TestDisasmAPI.py b/lldb/test/python_api/function_symbol/TestDisasmAPI.py
index 39e6c64cccb..0f36cd854c3 100644
--- a/lldb/test/python_api/function_symbol/TestDisasmAPI.py
+++ b/lldb/test/python_api/function_symbol/TestDisasmAPI.py
@@ -53,8 +53,7 @@ class DisasmAPITestCase(TestBase):
VALID_BREAKPOINT)
# Now launch the process, and do not stop at entry point.
- error = lldb.SBError()
- self.process = target.Launch (self.dbg.GetListener(), None, None, os.ctermid(), os.ctermid(), os.ctermid(), None, 0, False, error)
+ self.process = target.LaunchSimple(None, None, os.getcwd())
self.process = target.GetProcess()
self.assertTrue(self.process.IsValid(), PROCESS_IS_VALID)
@@ -74,7 +73,8 @@ class DisasmAPITestCase(TestBase):
context1 = target.ResolveSymbolContextForAddress(address1, lldb.eSymbolContextEverything)
self.assertTrue(context1.IsValid())
- print "context1:", context1
+ if self.TraceOn():
+ print "context1:", context1
# Continue the inferior, the breakpoint 2 should be hit.
self.process.Continue()
@@ -90,11 +90,15 @@ class DisasmAPITestCase(TestBase):
function = frame0.GetFunction()
self.assertTrue(symbol.IsValid() and function.IsValid())
- print "symbol:", symbol
- print "disassembly=>\n", lldbutil.disassemble(target, symbol)
+ disasm_output = lldbutil.disassemble(target, symbol)
+ if self.TraceOn():
+ print "symbol:", symbol
+ print "disassembly=>\n", disasm_output
- print "function:", function
- print "disassembly=>\n", lldbutil.disassemble(target, function)
+ disasm_output = lldbutil.disassemble(target, function)
+ if self.TraceOn():
+ print "function:", function
+ print "disassembly=>\n", disasm_output
sa1 = symbol.GetStartAddress()
#print "sa1:", sa1
OpenPOWER on IntegriCloud