diff options
| author | Deepak Panickal <deepak@codeplay.com> | 2014-08-08 16:47:42 +0000 |
|---|---|---|
| committer | Deepak Panickal <deepak@codeplay.com> | 2014-08-08 16:47:42 +0000 |
| commit | d249928b84c2fc11b0940d702288cbf4f7f2d332 (patch) | |
| tree | 15c9c86005af89960c902e4f24513d5e173d00a6 /lldb/tools/lldb-mi/MICmdInvoker.cpp | |
| parent | caa565887d7a8701624534516308da497ae46078 (diff) | |
| download | bcm5719-llvm-d249928b84c2fc11b0940d702288cbf4f7f2d332.tar.gz bcm5719-llvm-d249928b84c2fc11b0940d702288cbf4f7f2d332.zip | |
Add new MI commands, features and fixes to the lldb-mi driver.
- Can now load an executable directly as an argument.
- Fixes towards supporting local debugging.
- Fixes for stack-list-arguments, data-evaluate-expression, environment-cd, stack-list-locals, interpreter-exec.
- Fix breakpoint event handling.
- Support dynamic loading of libraries using the search paths provided by Eclipse.
llvm-svn: 215223
Diffstat (limited to 'lldb/tools/lldb-mi/MICmdInvoker.cpp')
| -rw-r--r-- | lldb/tools/lldb-mi/MICmdInvoker.cpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/lldb/tools/lldb-mi/MICmdInvoker.cpp b/lldb/tools/lldb-mi/MICmdInvoker.cpp index 2ab09ccca60..41f9f77542a 100644 --- a/lldb/tools/lldb-mi/MICmdInvoker.cpp +++ b/lldb/tools/lldb-mi/MICmdInvoker.cpp @@ -25,6 +25,7 @@ #include "MICmdMgr.h" #include "MICmnLog.h" #include "MICmnStreamStdout.h" +#include "MIDriver.h" //++ ------------------------------------------------------------------------------------ // Details: CMICmdInvoker constructor. @@ -197,6 +198,7 @@ bool CMICmdInvoker::CmdExecute( CMICmdBase & vCmd ) // Report command execution failed const SMICmdData cmdData( vCmd.GetCmdData() ); CmdStdout( cmdData ); + CmdCauseAppExit( vCmd ); CmdDelete( cmdData.id ); // Proceed to wait or execute next command @@ -208,6 +210,7 @@ bool CMICmdInvoker::CmdExecute( CMICmdBase & vCmd ) // Report command execution failed const SMICmdData cmdData( vCmd.GetCmdData() ); CmdStdout( cmdData ); + CmdCauseAppExit( vCmd ); CmdDelete( cmdData.id ); // Proceed to wait or execute next command @@ -240,6 +243,7 @@ bool CMICmdInvoker::CmdExecuteFinished( CMICmdBase & vCmd ) // Report command acknowledge functionality failed const SMICmdData cmdData( vCmd.GetCmdData() ); CmdStdout( cmdData ); + CmdCauseAppExit( vCmd ); CmdDelete( cmdData.id ); // Proceed to wait or execute next command @@ -268,6 +272,27 @@ bool CMICmdInvoker::CmdExecuteFinished( CMICmdBase & vCmd ) } //++ ------------------------------------------------------------------------------------ +// Details: If the MI Driver is not operating via a client i.e. Eclipse check the command +// on failure suggests the application exits. A command can be such that a +// failure cannot the allow the application to continue operating. +// Args: vCmd - (R) Command object. +// Return: None. +// Return: None. +// Throws: None. +//-- +void CMICmdInvoker::CmdCauseAppExit( const CMICmdBase & vCmd ) const +{ + if( vCmd.GetExitAppOnCommandFailure() ) + { + CMIDriver & rDriver( CMIDriver::Instance() ); + if( rDriver.IsDriverDebuggingArgExecutable() ) + { + rDriver.SetExitApplicationFlag( true ); + } + } +} + +//++ ------------------------------------------------------------------------------------ // Details: Write to stdout and the Log file the command's MI formatted result. // Type: vCmdData - (R) A command's information. // Return: MIstatus::success - Functionality succeeded. |

