本文整理汇总了C++中Driver::ParseArgs方法的典型用法代码示例。如果您正苦于以下问题:C++ Driver::ParseArgs方法的具体用法?C++ Driver::ParseArgs怎么用?C++ Driver::ParseArgs使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Driver
的用法示例。
在下文中一共展示了Driver::ParseArgs方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: error
int
main (int argc, char const *argv[], const char *envp[])
{
SBDebugger::Initialize();
SBHostOS::ThreadCreated ("<lldb.driver.main-thread>");
signal (SIGPIPE, SIG_IGN);
signal (SIGWINCH, sigwinch_handler);
signal (SIGINT, sigint_handler);
signal (SIGTSTP, sigtstp_handler);
signal (SIGCONT, sigcont_handler);
// Create a scope for driver so that the driver object will destroy itself
// before SBDebugger::Terminate() is called.
{
Driver driver;
bool exiting = false;
SBError error (driver.ParseArgs (argc, argv, stdout, exiting));
if (error.Fail())
{
const char *error_cstr = error.GetCString ();
if (error_cstr)
::fprintf (stderr, "error: %s\n", error_cstr);
}
else if (!exiting)
{
driver.MainLoop ();
}
}
SBDebugger::Terminate();
return 0;
}
示例2: logStream
int
main (int argc, char const *argv[], const char *envp[])
{
#if 1 // Enable for debug logging
lldb::StreamSP logStream(new lldb_private::StreamCallback(LogOutput, 0));
const char* logCategories[] = { 0 };
lldb::LogSP log = lldb_private::EnableLog(logStream, 0, logCategories, 0);
log->GetMask().Reset(LIBLLDB_LOG_ALL);
#endif
SBDebugger::Initialize();
SBHostOS::ThreadCreated ("<lldb.driver.main-thread>");
SetupPosixSignals();
// Create a scope for driver so that the driver object will destroy itself
// before SBDebugger::Terminate() is called.
{
Driver driver;
bool exit = false;
SBError error = driver.ParseArgs (argc, argv, stdout, exit);
if (error.Fail())
{
const char *error_cstr = error.GetCString ();
if (error_cstr)
::fprintf (stderr, "error: %s\n", error_cstr);
}
else if (!exit)
{
driver.Initialize();
}
}
SBDebugger::Terminate();
return 0;
}