[Lldb-commits] [lldb] r177594 - Making the test step count a member variable so that it can be accessed easily
Enrico Granata
egranata at apple.com
Wed Mar 20 15:42:34 PDT 2013
Author: enrico
Date: Wed Mar 20 17:42:34 2013
New Revision: 177594
URL: http://llvm.org/viewvc/llvm-project?rev=177594&view=rev
Log:
Making the test step count a member variable so that it can be accessed easily
Modified:
lldb/trunk/tools/lldb-perf/lib/TestCase.cpp
lldb/trunk/tools/lldb-perf/lib/TestCase.h
Modified: lldb/trunk/tools/lldb-perf/lib/TestCase.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-perf/lib/TestCase.cpp?rev=177594&r1=177593&r2=177594&view=diff
==============================================================================
--- lldb/trunk/tools/lldb-perf/lib/TestCase.cpp (original)
+++ lldb/trunk/tools/lldb-perf/lib/TestCase.cpp Wed Mar 20 17:42:34 2013
@@ -17,7 +17,8 @@ TestCase::TestCase () :
m_process(),
m_thread(),
m_listener(),
- m_verbose(false)
+ m_verbose(false),
+ m_step(0)
{
SBDebugger::Initialize();
SBHostOS::ThreadCreated ("<lldb-tester.app.main>");
@@ -61,7 +62,6 @@ TestCase::GetVerbose ()
void
TestCase::Loop ()
{
- int step = 0;
SBEvent evt;
while (true)
{
@@ -152,10 +152,10 @@ TestCase::Loop ()
exit(1);
}
if (m_verbose)
- printf("RUNNING STEP %d\n",step);
+ printf("RUNNING STEP %d\n",m_step);
ActionWanted action;
- TestStep(step, action);
- step++;
+ TestStep(m_step, action);
+ m_step++;
SBError err;
switch (action.type)
{
@@ -166,7 +166,7 @@ TestCase::Loop ()
if (action.thread.IsValid() == false)
{
if (m_verbose) Xcode::RunCommand(m_debugger,"bt all",true);
- if (m_verbose) printf("[finish invalid] I am gonna die at step %d\n",step);
+ if (m_verbose) printf("[finish invalid] I am gonna die at step %d\n",m_step);
exit(501);
}
m_process.SetSelectedThread(action.thread);
@@ -176,7 +176,7 @@ TestCase::Loop ()
if (action.thread.IsValid() == false)
{
if (m_verbose) Xcode::RunCommand(m_debugger,"bt all",true);
- if (m_verbose) printf("[next invalid] I am gonna die at step %d\n",step);
+ if (m_verbose) printf("[next invalid] I am gonna die at step %d\n",m_step);
exit(500);
}
m_process.SetSelectedThread(action.thread);
@@ -190,7 +190,7 @@ TestCase::Loop ()
}
}
}
- if (GetVerbose()) printf("I am gonna die at step %d\n",step);
+ if (GetVerbose()) printf("I am gonna die at step %d\n",m_step);
}
void
Modified: lldb/trunk/tools/lldb-perf/lib/TestCase.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-perf/lib/TestCase.h?rev=177594&r1=177593&r2=177594&view=diff
==============================================================================
--- lldb/trunk/tools/lldb-perf/lib/TestCase.h (original)
+++ lldb/trunk/tools/lldb-perf/lib/TestCase.h Wed Mar 20 17:42:34 2013
@@ -134,6 +134,13 @@ public:
{
return m_thread;
}
+
+ int
+ GetStep ()
+ {
+ return m_step;
+ }
+
protected:
lldb::SBDebugger m_debugger;
lldb::SBTarget m_target;
@@ -141,6 +148,7 @@ protected:
lldb::SBThread m_thread;
lldb::SBListener m_listener;
bool m_verbose;
+ int m_step;
};
}
More information about the lldb-commits
mailing list