本文整理汇总了C++中LLDBCommand类的典型用法代码示例。如果您正苦于以下问题:C++ LLDBCommand类的具体用法?C++ LLDBCommand怎么用?C++ LLDBCommand使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了LLDBCommand类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Interrupt
void LLDBConnector::Interrupt(eInterruptReason reason)
{
LLDBCommand command;
command.SetCommandType(kCommandInterrupt);
command.SetInterruptReason( reason );
SendCommand( command );
}
示例2: EvalExpression
void CodeLiteLLDBApp::EvalExpression(const LLDBCommand& command)
{
wxPrintf("codelite-lldb: evaluating expression '%s'\n", command.GetExpression());
if ( CanInteract() ) {
lldb::SBExpressionOptions options;
lldb::SBValue value = m_target.EvaluateExpression( command.GetExpression().mb_str(wxConvUTF8).data(), options);
if ( value.IsValid() ) {
LLDBReply reply;
reply.SetReplyType( kReplyTypeExprEvaluated );
reply.SetExpression( command.GetExpression() );
LLDBVariable::Vect_t vars;
LLDBVariable::Ptr_t var( new LLDBVariable( value ) );
vars.push_back( var );
reply.SetVariables( vars );
// Cache the expanded variable (we will need it later for tooltip expansion
m_variables.insert( std::make_pair(value.GetID(), value) );
SendReply( reply );
}
}
}
示例3: event
void LLDBConnector::DeleteAllBreakpoints()
{
if ( !IsRunning() ) {
m_pendingDeletionBreakpoints.clear();
m_breakpoints.clear();
LLDBEvent event(wxEVT_LLDB_BREAKPOINTS_UPDATED);
event.SetBreakpoints( GetAllBreakpoints() );
ProcessEvent( event );
return;
}
// mark all breakpoints for deletion
CL_DEBUGS(wxString () << "codelite: DeleteAllBreakpoints called");
m_pendingDeletionBreakpoints.swap( m_breakpoints );
if ( !IsCanInteract() ) {
Interrupt( kInterruptReasonDeleteAllBreakpoints );
} else {
LLDBCommand command;
command.SetCommandType(kCommandDeleteAllBreakpoints);
SendCommand( command );
m_pendingDeletionBreakpoints.clear();
}
}
示例4: AttachProcess
void CodeLiteLLDBApp::AttachProcess(const LLDBCommand& command)
{
wxPrintf("codeite-lldb: attaching to process with PID %d\n", command.GetProcessID());
if(!InitializeLLDB(command)) {
return;
}
lldb::SBError errorCode;
lldb::SBListener listener;
lldb::SBProcess process = m_target.AttachToProcessWithID(listener, (lldb::pid_t)command.GetProcessID(), errorCode);
if(!errorCode.Success()) {
wxPrintf("codeite-lldb: error attaching process %d. '%s'\n", command.GetProcessID(), errorCode.GetCString());
NotifyExited();
return;
}
wxPrintf("codeite-lldb: process attached successfully\n");
// Launch the thread that will handle the LLDB process events
m_lldbProcessEventThread =
new LLDBProcessEventHandlerThread(this, m_debugger, m_target.GetProcess(), kDebugSessionTypeAttach);
m_lldbProcessEventThread->Start();
// In any case, reset the interrupt reason
m_interruptReason = kInterruptReasonNone;
// Notify codelite that the debugger started successfully
NotifyStarted(kDebugSessionTypeAttach);
}
示例5: OpenCoreFile
void CodeLiteLLDBApp::OpenCoreFile(const LLDBCommand& command)
{
wxPrintf("codeite-lldb: debugging core file '%s'\n", command.GetCorefile());
wxPrintf("codeite-lldb: executable file '%s'\n", command.GetExecutable());
if(!InitializeLLDB(command)) {
return;
}
lldb::SBProcess process = m_target.LoadCore(command.GetCorefile().mb_str(wxConvUTF8).data());
if(!process.IsValid()) {
wxPrintf("codeite-lldb: error loading core file '%s'\n", command.GetCorefile());
NotifyExited();
return;
}
// Launch the thread that will handle the LLDB process events
m_lldbProcessEventThread =
new LLDBProcessEventHandlerThread(this, m_debugger, m_target.GetProcess(), kDebugSessionTypeCore);
m_lldbProcessEventThread->Start();
// Notify codelite that the debugger started successfully
NotifyStarted(kDebugSessionTypeCore);
// In any case, reset the interrupt reason
m_interruptReason = kInterruptReasonNone;
// Since we are in 'core' session
// immediately notify about 'stop'
NotifyStopped();
}
示例6: EvalExpression
void CodeLiteLLDBApp::EvalExpression(const LLDBCommand& command)
{
wxPrintf("codelite-lldb: evaluating expression '%s'\n", command.GetExpression());
if(CanInteract()) {
// Evaluate the expression based on the current frame
wxString expression = command.GetExpression();
expression.Trim().Trim(false);
lldb::SBValue value = m_target.GetProcess().GetSelectedThread().GetSelectedFrame().GetValueForVariablePath(
expression.mb_str(wxConvUTF8).data());
if(value.IsValid()) {
LLDBReply reply;
reply.SetReplyType(kReplyTypeExprEvaluated);
reply.SetExpression(command.GetExpression());
LLDBVariable::Vect_t vars;
LLDBVariable::Ptr_t var(new LLDBVariable(value));
vars.push_back(var);
reply.SetVariables(vars);
VariableWrapper wrapper;
wrapper.value = value;
// Cache the expanded variable (we will need it later for tooltip expansion
m_variables.insert(std::make_pair(value.GetID(), wrapper));
SendReply(reply);
}
}
}
示例7: NextInstruction
void LLDBConnector::NextInstruction()
{
if(IsCanInteract()) {
LLDBCommand command;
command.SetCommandType(kCommandNextInstruction);
SendCommand(command);
}
}
示例8: ShowCurrentFileLine
void LLDBConnector::ShowCurrentFileLine()
{
if(IsCanInteract()) {
LLDBCommand command;
command.SetCommandType(kCommandCurrentFileLine);
SendCommand(command);
}
}
示例9: RequestLocals
void LLDBConnector::RequestLocals()
{
if(IsCanInteract()) {
LLDBCommand command;
command.SetCommandType(kCommandGetLocals);
SendCommand(command);
}
}
示例10: OnStart
void MainDialog::OnStart(wxCommandEvent& event)
{
LLDBCommand command;
command.SetCommandType( kCommandStart );
command.SetExecutable( m_filePickerExe->GetPath() );
m_connector.SendCommand( command );
LogCommand( command );
}
示例11: SelectFrame
void LLDBConnector::SelectFrame(int frameID)
{
if(IsCanInteract()) {
LLDBCommand command;
command.SetCommandType(kCommandSelectFrame);
command.SetFrameId(frameID);
SendCommand(command);
}
}
示例12: SelectThread
void LLDBConnector::SelectThread(int threadID)
{
if(IsCanInteract()) {
LLDBCommand command;
command.SetCommandType(kCommandSelectThread);
command.SetThreadId(threadID);
SendCommand(command);
}
}
示例13: SelectFrame
void CodeLiteLLDBApp::SelectFrame(const LLDBCommand& command)
{
wxPrintf("codelite-lldb: selecting frame %d\n", command.GetFrameId());
if(CanInteract() && command.GetFrameId() != wxNOT_FOUND) {
m_target.GetProcess().GetSelectedThread().SetSelectedFrame(command.GetFrameId());
m_interruptReason = kInterruptReasonNone;
NotifyStopped();
}
}
示例14: EvaluateExpression
void LLDBConnector::EvaluateExpression(const wxString& expression)
{
if(IsCanInteract()) {
LLDBCommand command;
command.SetCommandType(kCommandEvalExpression);
command.SetExpression(expression);
SendCommand(command);
}
}
示例15: RequestVariableChildren
void LLDBConnector::RequestVariableChildren(int lldbId)
{
if(IsCanInteract()) {
LLDBCommand command;
command.SetCommandType(kCommandExpandVariable);
command.SetLldbId(lldbId);
SendCommand(command);
}
}