本文整理汇总了C++中SBError::Success方法的典型用法代码示例。如果您正苦于以下问题:C++ SBError::Success方法的具体用法?C++ SBError::Success怎么用?C++ SBError::Success使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SBError
的用法示例。
在下文中一共展示了SBError::Success方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: listener_func
void listener_func() {
while (!g_done) {
SBEvent event;
bool got_event = g_listener.WaitForEvent(1, event);
if (got_event) {
if (!event.IsValid())
throw Exception("event is not valid in listener thread");
SBProcess process = SBProcess::GetProcessFromEvent(event);
if (process.GetState() == eStateStopped) {
SBError error = process.Continue();
if (!error.Success())
throw Exception(string("Cannot continue process from listener thread: ")
+ error.GetCString());
g_process_started.push(true);
}
}
}
}
示例2: debugger
//.........这里部分代码省略.........
case 'p':
platform = optarg;
break;
case 'v':
verbose = true;
break;
case 'h':
case '?':
default:
show_usage = true;
break;
}
}
argc -= optind;
argv += optind;
const bool add_dependent_libs = false;
SBError error;
for (int arg_idx = 0; arg_idx < argc; ++arg_idx)
{
// The first argument is the file path we want to look something up in
const char *exe_file_path = argv[arg_idx];
// Create a target using the executable.
SBTarget target = debugger.CreateTarget (exe_file_path,
arch,
platform,
add_dependent_libs,
error);
if (error.Success())
{
if (target.IsValid())
{
SBFileSpec exe_file_spec (exe_file_path, true);
SBModule module (target.FindModule (exe_file_spec));
SBFileSpecList comp_unit_list;
if (module.IsValid())
{
char command[1024];
lldb::SBCommandReturnObject command_result;
snprintf (command, sizeof(command), "add-dsym --uuid %s", module.GetUUIDString());
debugger.GetCommandInterpreter().HandleCommand (command, command_result);
if (!command_result.Succeeded())
{
fprintf (stderr, "error: couldn't locate debug symbols for '%s'\n", exe_file_path);
exit(1);
}
SBFileSpecList module_list;
module_list.Append(exe_file_spec);
SBBreakpoint bp = target.BreakpointCreateByRegex (".", module_list, comp_unit_list);
const size_t num_locations = bp.GetNumLocations();
for (uint32_t bp_loc_idx=0; bp_loc_idx<num_locations; ++bp_loc_idx)
{
SBBreakpointLocation bp_loc = bp.GetLocationAtIndex(bp_loc_idx);
SBSymbolContext sc (bp_loc.GetAddress().GetSymbolContext(eSymbolContextEverything));
if (sc.IsValid())
{
if (sc.GetBlock().GetContainingInlinedBlock().IsValid())
{