mirror of
https://github.com/intel/llvm.git
synced 2026-01-22 23:49:22 +08:00
Deprecated old forms of SBTarget::Launch. There is not just one and no
SWIG renaming done to work around deprecated APIs. llvm-svn: 124075
This commit is contained in:
@@ -54,33 +54,6 @@ public:
|
||||
lldb::SBProcess
|
||||
GetProcess ();
|
||||
|
||||
lldb::SBProcess
|
||||
LaunchProcess (char const **argv,
|
||||
char const **envp,
|
||||
const char *tty,
|
||||
uint32_t launch_flags, // See LaunchFlags
|
||||
bool stop_at_entry);
|
||||
|
||||
lldb::SBProcess
|
||||
Launch (char const **argv,
|
||||
char const **envp,
|
||||
const char *tty,
|
||||
uint32_t launch_flags, // See LaunchFlags
|
||||
bool stop_at_entry,
|
||||
lldb::SBError& error);
|
||||
|
||||
#ifdef SWIG
|
||||
%rename(LaunchWithCWD) Launch (char const **argv,
|
||||
char const **envp,
|
||||
const char *stdin_path,
|
||||
const char *stdout_path,
|
||||
const char *stderr_path,
|
||||
const char *working_directory,
|
||||
uint32_t launch_flags, // See LaunchFlags
|
||||
bool stop_at_entry,
|
||||
lldb::SBError& error);
|
||||
#endif
|
||||
|
||||
lldb::SBProcess
|
||||
Launch (char const **argv,
|
||||
char const **envp,
|
||||
|
||||
@@ -116,49 +116,6 @@ SBTarget::GetDebugger () const
|
||||
return debugger;
|
||||
}
|
||||
|
||||
SBProcess
|
||||
SBTarget::LaunchProcess
|
||||
(
|
||||
char const **argv,
|
||||
char const **envp,
|
||||
const char *tty,
|
||||
uint32_t launch_flags,
|
||||
bool stop_at_entry
|
||||
)
|
||||
{
|
||||
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
|
||||
|
||||
if (log)
|
||||
log->Printf ("SBTarget(%p)::LaunchProcess (argv=%p, envp=%p, tty=\"%s\", launch_flags=%d, stop_at_entry=%i)",
|
||||
m_opaque_sp.get(), argv, envp, tty, launch_flags, stop_at_entry);
|
||||
|
||||
SBError sb_error;
|
||||
SBProcess sb_process = Launch (argv, envp, tty, tty, tty, NULL, launch_flags, stop_at_entry, sb_error);
|
||||
|
||||
log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
|
||||
if (log)
|
||||
{
|
||||
log->Printf ("SBTarget(%p)::LaunchProcess (...) => SBProcess(%p)",
|
||||
m_opaque_sp.get(), sb_process.get());
|
||||
}
|
||||
|
||||
return sb_process;
|
||||
}
|
||||
|
||||
|
||||
SBProcess
|
||||
SBTarget::Launch
|
||||
(
|
||||
char const **argv,
|
||||
char const **envp,
|
||||
const char *tty,
|
||||
uint32_t launch_flags,
|
||||
bool stop_at_entry,
|
||||
SBError &error
|
||||
)
|
||||
{
|
||||
return Launch (argv, envp, tty, tty, tty, NULL, launch_flags, stop_at_entry, error);
|
||||
}
|
||||
|
||||
SBProcess
|
||||
SBTarget::Launch
|
||||
|
||||
@@ -110,7 +110,8 @@ class ArrayTypesTestCase(TestBase):
|
||||
substrs = ["resolved = 1"])
|
||||
|
||||
# Now launch the process, and do not stop at entry point.
|
||||
self.process = target.LaunchProcess([], [], os.ctermid(), 0, False)
|
||||
error = lldb.SBError()
|
||||
self.process = target.Launch (None, None, os.ctermid(), os.ctermid(), os.ctermid(), None, 0, False, error)
|
||||
|
||||
self.process = target.GetProcess()
|
||||
self.assertTrue(self.process.IsValid(), PROCESS_IS_VALID)
|
||||
|
||||
@@ -94,7 +94,8 @@ class BitfieldsTestCase(TestBase):
|
||||
breakpoint = target.BreakpointCreateByLocation("main.c", self.line)
|
||||
self.assertTrue(breakpoint.IsValid(), VALID_BREAKPOINT)
|
||||
|
||||
self.process = target.LaunchProcess([], [], os.ctermid(), False, 0)
|
||||
error = lldb.SBError()
|
||||
self.process = target.Launch (None, None, os.ctermid(), os.ctermid(), os.ctermid(), None, 0, False, error)
|
||||
self.assertTrue(self.process.IsValid(), PROCESS_IS_VALID)
|
||||
|
||||
# The stop reason of the thread should be breakpoint.
|
||||
|
||||
@@ -139,7 +139,8 @@ class BreakpointConditionsTestCase(TestBase):
|
||||
startstr = 'val == 3')
|
||||
|
||||
# Now launch the process, and do not stop at entry point.
|
||||
self.process = target.LaunchProcess([], [], os.ctermid(), 0, False)
|
||||
error = lldb.SBError()
|
||||
self.process = target.Launch (None, None, os.ctermid(), os.ctermid(), os.ctermid(), None, 0, False, error)
|
||||
|
||||
self.process = target.GetProcess()
|
||||
self.assertTrue(self.process.IsValid(), PROCESS_IS_VALID)
|
||||
|
||||
@@ -101,7 +101,8 @@ class BreakpointIgnoreCountTestCase(TestBase):
|
||||
"SetIgnoreCount() works correctly")
|
||||
|
||||
# Now launch the process, and do not stop at entry point.
|
||||
self.process = target.LaunchProcess([], [], os.ctermid(), 0, False)
|
||||
error = lldb.SBError()
|
||||
self.process = target.Launch (None, None, os.ctermid(), os.ctermid(), os.ctermid(), None, 0, False, error)
|
||||
|
||||
self.process = target.GetProcess()
|
||||
self.assertTrue(self.process.IsValid(), PROCESS_IS_VALID)
|
||||
|
||||
@@ -80,7 +80,8 @@ class StaticVariableTestCase(TestBase):
|
||||
self.assertTrue(breakpoint.IsValid(), VALID_BREAKPOINT)
|
||||
|
||||
# Now launch the process, and do not stop at entry point.
|
||||
self.process = target.LaunchProcess([], [], os.ctermid(), 0, False)
|
||||
error = lldb.SBError()
|
||||
self.process = target.Launch (None, None, os.ctermid(), os.ctermid(), os.ctermid(), None, 0, False, error)
|
||||
|
||||
self.process = target.GetProcess()
|
||||
self.assertTrue(self.process.IsValid(), PROCESS_IS_VALID)
|
||||
|
||||
@@ -119,12 +119,12 @@ class ClassTypesTestCase(TestBase):
|
||||
str(self.line)])
|
||||
|
||||
# Now launch the process, and do not stop at entry point.
|
||||
rc = lldb.SBError()
|
||||
self.process = target.Launch([], [], os.ctermid(), 0, False, rc)
|
||||
error = lldb.SBError()
|
||||
self.process = target.Launch (None, None, os.ctermid(), os.ctermid(), os.ctermid(), None, 0, False, error)
|
||||
#self.breakAfterLaunch(self.process, "C::C(int, int, int)")
|
||||
|
||||
if not rc.Success() or not self.process.IsValid():
|
||||
self.fail("SBTarget.LaunchProcess() failed")
|
||||
if not error.Success() or not self.process.IsValid():
|
||||
self.fail("SBTarget.Launch() failed")
|
||||
|
||||
if self.process.GetState() != lldb.eStateStopped:
|
||||
self.fail("Process should be in the 'stopped' state, "
|
||||
|
||||
@@ -52,10 +52,10 @@ class ConditionalBreakTestCase(TestBase):
|
||||
self.assertTrue(breakpoint.IsValid(), VALID_BREAKPOINT)
|
||||
|
||||
# Now launch the process, and do not stop at entry point.
|
||||
rc = lldb.SBError()
|
||||
self.process = target.Launch([], [], os.ctermid(), 0, False, rc)
|
||||
error = lldb.SBError()
|
||||
self.process = target.Launch (None, None, os.ctermid(), os.ctermid(), os.ctermid(), None, 0, False, error)
|
||||
|
||||
self.assertTrue(rc.Success() and self.process.IsValid(), PROCESS_IS_VALID)
|
||||
self.assertTrue(error.Success() and self.process.IsValid(), PROCESS_IS_VALID)
|
||||
|
||||
# The stop reason of the thread should be breakpoint.
|
||||
self.assertTrue(self.process.GetState() == lldb.eStateStopped,
|
||||
|
||||
@@ -100,10 +100,10 @@ class BasicExprCommandsTestCase(TestBase):
|
||||
|
||||
# Launch the process, and do not stop at the entry point.
|
||||
# Pass 'X Y Z' as the args, which makes argc == 4.
|
||||
rc = lldb.SBError()
|
||||
self.process = target.Launch(['X', 'Y', 'Z'], [], os.ctermid(), 0, False, rc)
|
||||
error = lldb.SBError()
|
||||
self.process = target.Launch(['X', 'Y', 'Z'], None, os.ctermid(), os.ctermid(), os.ctermid(), None, 0, False, error)
|
||||
|
||||
if not rc.Success() or not self.process.IsValid():
|
||||
if not error.Success() or not self.process.IsValid():
|
||||
self.fail("SBTarget.LaunchProcess() failed")
|
||||
|
||||
if self.process.GetState() != lldb.eStateStopped:
|
||||
|
||||
@@ -212,7 +212,8 @@ class FoundationTestCase(TestBase):
|
||||
self.assertTrue(break1.IsValid(), VALID_BREAKPOINT)
|
||||
|
||||
# Now launch the process, and do not stop at entry point.
|
||||
self.process = target.LaunchProcess([], [], os.ctermid(), 0, False)
|
||||
error = lldb.SBError()
|
||||
self.process = target.Launch (None, None, os.ctermid(), os.ctermid(), os.ctermid(), None, 0, False, error)
|
||||
|
||||
self.assertTrue(self.process.IsValid(), PROCESS_IS_VALID)
|
||||
|
||||
|
||||
@@ -45,7 +45,8 @@ class FoundationSymtabTestCase(TestBase):
|
||||
self.assertTrue(target.IsValid(), VALID_TARGET)
|
||||
|
||||
# Launch the process, and do not stop at the entry point.
|
||||
process = target.LaunchProcess([], [], os.ctermid(), 0, False)
|
||||
error = lldb.SBError()
|
||||
process = target.Launch (None, None, os.ctermid(), os.ctermid(), os.ctermid(), None, 0, False, error)
|
||||
|
||||
#
|
||||
# Exercise Python APIs to access the symbol table entries.
|
||||
|
||||
@@ -49,10 +49,11 @@ class HelloWorldTestCase(TestBase):
|
||||
"Breakpoint.SetEnabled(True) works")
|
||||
|
||||
# rdar://problem/8364687
|
||||
# SBTarget.LaunchProcess() issue (or is there some race condition)?
|
||||
# SBTarget.Launch() issue (or is there some race condition)?
|
||||
|
||||
if useLaunchAPI:
|
||||
process = target.LaunchProcess([], [], os.ctermid(), 0, False)
|
||||
error = lldb.SBError()
|
||||
process = target.Launch (None, None, os.ctermid(), os.ctermid(), os.ctermid(), None, 0, False, error)
|
||||
# The following isn't needed anymore, rdar://8364687 is fixed.
|
||||
#
|
||||
# Apply some dances after LaunchProcess() in order to break at "main".
|
||||
|
||||
@@ -816,7 +816,7 @@ class TestBase(unittest2.TestCase):
|
||||
|
||||
def breakAfterLaunch(self, process, func, trace=False):
|
||||
"""
|
||||
Perform some dancees after LaunchProcess() to break at func name.
|
||||
Perform some dances after Launch() to break at func name.
|
||||
|
||||
Return True if we can successfully break at the func name in due time.
|
||||
"""
|
||||
|
||||
@@ -64,7 +64,8 @@ class TestObjCStepping(TestBase):
|
||||
self.assertTrue(break_returnStruct_call_super.IsValid(), VALID_BREAKPOINT)
|
||||
|
||||
# Now launch the process, and do not stop at entry point.
|
||||
self.process = target.LaunchProcess([], [], os.ctermid(), 0, False)
|
||||
error = lldb.SBError()
|
||||
self.process = target.Launch (None, None, os.ctermid(), os.ctermid(), os.ctermid(), None, 0, False, error)
|
||||
|
||||
self.assertTrue(self.process.IsValid(), PROCESS_IS_VALID)
|
||||
|
||||
|
||||
@@ -60,7 +60,8 @@ class EventAPITestCase(TestBase):
|
||||
VALID_BREAKPOINT)
|
||||
|
||||
# Now launch the process, and do not stop at entry point.
|
||||
self.process = target.LaunchProcess([], [], os.ctermid(), 0, False)
|
||||
error = lldb.SBError()
|
||||
self.process = target.Launch (None, None, os.ctermid(), os.ctermid(), os.ctermid(), None, 0, False, error)
|
||||
|
||||
self.process = target.GetProcess()
|
||||
self.assertTrue(self.process.IsValid(), PROCESS_IS_VALID)
|
||||
@@ -121,7 +122,8 @@ class EventAPITestCase(TestBase):
|
||||
VALID_BREAKPOINT)
|
||||
|
||||
# Now launch the process, and do not stop at the entry point.
|
||||
self.process = target.LaunchProcess([], [], os.ctermid(), 0, False)
|
||||
error = lldb.SBError()
|
||||
self.process = target.Launch (None, None, os.ctermid(), os.ctermid(), os.ctermid(), None, 0, False, error)
|
||||
|
||||
self.process = target.GetProcess()
|
||||
self.assertTrue(self.process.GetState() == lldb.eStateStopped,
|
||||
|
||||
@@ -44,7 +44,8 @@ class FrameAPITestCase(TestBase):
|
||||
# Note that we don't assign the process to self.process as in other test
|
||||
# cases. We want the inferior to run till it exits and there's no need
|
||||
# for the testing framework to kill the inferior upon tearDown().
|
||||
process = target.LaunchProcess([], [], os.ctermid(), 0, False)
|
||||
error = lldb.SBError()
|
||||
process = target.Launch (None, None, os.ctermid(), os.ctermid(), os.ctermid(), None, 0, False, error)
|
||||
|
||||
process = target.GetProcess()
|
||||
self.assertTrue(process.GetState() == lldb.eStateStopped,
|
||||
|
||||
@@ -47,7 +47,8 @@ class SymbolContextAPITestCase(TestBase):
|
||||
VALID_BREAKPOINT)
|
||||
|
||||
# Now launch the process, and do not stop at entry point.
|
||||
self.process = target.LaunchProcess([], [], os.ctermid(), 0, False)
|
||||
error = lldb.SBError()
|
||||
self.process = target.Launch (None, None, os.ctermid(), os.ctermid(), os.ctermid(), None, 0, False, error)
|
||||
|
||||
self.process = target.GetProcess()
|
||||
self.assertTrue(self.process.IsValid(), PROCESS_IS_VALID)
|
||||
|
||||
@@ -43,7 +43,8 @@ class SourceManagerTestCase(TestBase):
|
||||
self.assertTrue(target.IsValid(), VALID_TARGET)
|
||||
|
||||
# Launch the process, and do not stop at the entry point.
|
||||
process = target.LaunchProcess([], [], os.ctermid(), 0, False)
|
||||
error = lldb.SBError()
|
||||
process = target.Launch (None, None, os.ctermid(), os.ctermid(), os.ctermid(), None, 0, False, error)
|
||||
|
||||
#
|
||||
# Exercise Python APIs to display source lines.
|
||||
|
||||
@@ -35,7 +35,7 @@ class ThreadsStackTracesTestCase(TestBase):
|
||||
|
||||
# Now launch the process, and do not stop at entry point.
|
||||
rc = lldb.SBError()
|
||||
self.process = target.Launch([], [], os.ctermid(), 0, False, rc)
|
||||
self.process = target.Launch (None, None, os.ctermid(), os.ctermid(), os.ctermid(), None, 0, False, rc)
|
||||
|
||||
if not rc.Success() or not self.process.IsValid():
|
||||
self.fail("SBTarget.LaunchProcess() failed")
|
||||
|
||||
Reference in New Issue
Block a user