forked from OSchip/llvm-project
Converted to use SBProcess.LaunchSimple() API.
And use self.TraceOn() in order to print more debug output. llvm-svn: 129791
This commit is contained in:
parent
fbf1cfea12
commit
9efcb0ec4d
|
@ -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
|
||||
|
|
|
@ -53,8 +53,7 @@ class SymbolAPITestCase(TestBase):
|
|||
VALID_BREAKPOINT)
|
||||
|
||||
# Now launch the process, and do not stop at entry point.
|
||||
error = lldb.SBError()
|
||||
self.process = target.LaunchSimple (None, None, os.getcwd())
|
||||
self.process = target.LaunchSimple(None, None, os.getcwd())
|
||||
|
||||
self.process = target.GetProcess()
|
||||
self.assertTrue(self.process.IsValid(), PROCESS_IS_VALID)
|
||||
|
@ -85,7 +84,8 @@ class SymbolAPITestCase(TestBase):
|
|||
self.assertTrue(addr_line2.GetSectionType() == lldb.eSectionTypeCode)
|
||||
|
||||
# Now verify that both addresses point to the same module.
|
||||
print "UUID:", addr_line1.GetModule().GetUUIDString()
|
||||
if self.TraceOn():
|
||||
print "UUID:", addr_line1.GetModule().GetUUIDString()
|
||||
self.assertTrue(addr_line1.GetModule().GetUUIDString() == addr_line2.GetModule().GetUUIDString())
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue