Do not require the triple to be hard-coded

llvm-svn: 208982
This commit is contained in:
Deepak Panickal 2014-05-16 13:26:45 +00:00
parent 52c56b93e5
commit 95442c445f
3 changed files with 10 additions and 8 deletions

View File

@ -109,10 +109,9 @@ bool CMICmdCmdFileExecAndSymbols::Execute( void )
const CMIUtilString & strExeFilePath( pArgFile->GetValue() ); const CMIUtilString & strExeFilePath( pArgFile->GetValue() );
CMICmnLLDBDebugSessionInfo & rSessionInfo( CMICmnLLDBDebugSessionInfo::Instance() ); CMICmnLLDBDebugSessionInfo & rSessionInfo( CMICmnLLDBDebugSessionInfo::Instance() );
lldb::SBDebugger & rDbgr = rSessionInfo.m_rLldbDebugger; lldb::SBDebugger & rDbgr = rSessionInfo.m_rLldbDebugger;
// Developer note: lldb::SBError error;
lldb::SBError error; // Arg options may need to be available here for the CreateTarget() const char * pTargetTriple = nullptr; // Let LLDB discover the triple required
const char * pTargetTriple = MICONFIG_TRIPLE; // Match the Arm executeable built for the target platform i.e. hello.elf const char * pTargetPlatformName = "";
const char * pTargetPlatformName = ""; // This works for connecting to an Android development board
const bool bAddDepModules = false; const bool bAddDepModules = false;
lldb::SBTarget target = rDbgr.CreateTarget( strExeFilePath.c_str(), pTargetTriple, pTargetPlatformName, bAddDepModules, error ); lldb::SBTarget target = rDbgr.CreateTarget( strExeFilePath.c_str(), pTargetTriple, pTargetPlatformName, bAddDepModules, error );
CMIUtilString strWkDir; CMIUtilString strWkDir;
@ -128,6 +127,7 @@ bool CMICmdCmdFileExecAndSymbols::Execute( void )
} }
if( !rDbgr.SetCurrentPlatformSDKRoot( strWkDir.c_str() ) ) if( !rDbgr.SetCurrentPlatformSDKRoot( strWkDir.c_str() ) )
{ {
SetError( CMIUtilString::Format( MIRSRC( IDS_CMD_ERR_FNFAILED ), m_cmdData.strMiCmd.c_str(), "SetCurrentPlatformSDKRoot()" ) ); SetError( CMIUtilString::Format( MIRSRC( IDS_CMD_ERR_FNFAILED ), m_cmdData.strMiCmd.c_str(), "SetCurrentPlatformSDKRoot()" ) );
return MIstatus::failure; return MIstatus::failure;
} }

View File

@ -28,6 +28,7 @@
#define MICONFIG_DEBUG_SHOW_ATTACH_DBG_DLG 0 #define MICONFIG_DEBUG_SHOW_ATTACH_DBG_DLG 0
// 1 = Compile in and init LLDB driver code alongside MI version, 0 = do not use // 1 = Compile in and init LLDB driver code alongside MI version, 0 = do not use
// ToDo: This has not been fully implemented as may not be required in the future
#define MICONFIG_COMPILE_MIDRIVER_WITH_LLDBDRIVER 0 #define MICONFIG_COMPILE_MIDRIVER_WITH_LLDBDRIVER 0
// 1 = Give runtime our own custom buffer, 0 = Use runtime managed buffer // 1 = Give runtime our own custom buffer, 0 = Use runtime managed buffer
@ -40,8 +41,8 @@
#define MICONFIG_POLL_FOR_STD_IN 1 #define MICONFIG_POLL_FOR_STD_IN 1
// Temp workaround while needing different triples // Temp workaround while needing different triples
// ToDo: This should be fixed to be figured out automatically // ToDo: Temp workaround while needing different triples - not used ATM, may not be required anymore
#define MICONFIG_TRIPLE "arm" //#define MICONFIG_TRIPLE "arm"
// 1 = Write to MI's Log file warnings about commands that did not handle arguments or // 1 = Write to MI's Log file warnings about commands that did not handle arguments or
// options present to them by the driver's client, 0 = no warnings given // options present to them by the driver's client, 0 = no warnings given

View File

@ -84,7 +84,8 @@ CMICmdCmdVarUpdate
========================================================================= =========================================================================
MI build configuration: MI build configuration:
MICmnConfig.h defines various preprocessor build options i.e. enable MICmnConfig.h defines various preprocessor build options i.e. enable
LLDB fall through should MI interpretor not recognise a command. LLDB fall through should MI interpretor not recognise a command (option
not fully implemented - may be removed in the future).
========================================================================= =========================================================================
MI uses the following libraries: MI uses the following libraries: