Browse Source

Fixed segmentation fault when running debug command on newer liblldb

merge-requests/365/head
eidheim 9 years ago
parent
commit
610dd02815
  1. 8
      src/debug_lldb.cc

8
src/debug_lldb.cc

@ -314,8 +314,12 @@ std::pair<std::string, std::string> Debug::LLDB::run_command(const std::string &
if(state==lldb::StateType::eStateStopped || state==lldb::StateType::eStateRunning) { if(state==lldb::StateType::eStateStopped || state==lldb::StateType::eStateRunning) {
lldb::SBCommandReturnObject command_return_object; lldb::SBCommandReturnObject command_return_object;
debugger->GetCommandInterpreter().HandleCommand(command.c_str(), command_return_object, true); debugger->GetCommandInterpreter().HandleCommand(command.c_str(), command_return_object, true);
command_return.first=command_return_object.GetOutput(); auto output=command_return_object.GetOutput();
command_return.second=command_return_object.GetError(); if(output)
command_return.first=output;
auto error=command_return_object.GetError();
if(error)
command_return.second=error;
} }
return command_return; return command_return;
} }

Loading…
Cancel
Save