[lldb/Test] Add a trace method to replace print statements.

Many tests use (commented out) print statement for debugging the test
itself. This patch adds a new trace method to lldbtest to reuse the
existing tracing infrastructure and replace these print statements.

Differential revision: https://reviews.llvm.org/D80448
This commit is contained in:
Jonas Devlieghere
2020-05-25 10:59:39 -07:00
parent 5bf2409a4e
commit b321b42941
23 changed files with 136 additions and 172 deletions

View File

@@ -38,8 +38,8 @@ class SymbolAPITestCase(TestBase):
# Now create the two breakpoints inside function 'a'.
breakpoint1 = target.BreakpointCreateByLocation('main.c', self.line1)
breakpoint2 = target.BreakpointCreateByLocation('main.c', self.line2)
#print("breakpoint1:", breakpoint1)
#print("breakpoint2:", breakpoint2)
self.trace("breakpoint1:", breakpoint1)
self.trace("breakpoint2:", breakpoint2)
self.assertTrue(breakpoint1 and
breakpoint1.GetNumLocations() == 1,
VALID_BREAKPOINT)