Added the notion of an system root for SDKs. This is a directory where all
libraries and headers exist. This can be specified using the platform select
function:
platform select --sysroot /Volumes/remote-root remote-macosx
Each platform subclass is free to interpret the sysroot as needed.
Expose the new SDK root directory through the SBDebugger class.
Fixed an issue with the GDB remote protocol where unimplemented packets were
not being handled correctly.
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@133231 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Interpreter/OptionGroupPlatform.cpp b/source/Interpreter/OptionGroupPlatform.cpp
index d94c41a..1734a79 100644
--- a/source/Interpreter/OptionGroupPlatform.cpp
+++ b/source/Interpreter/OptionGroupPlatform.cpp
@@ -36,6 +36,12 @@
m_os_version_minor,
m_os_version_update);
}
+
+ if (m_sdk_sysroot)
+ platform_sp->SetSDKRootDirectory (m_sdk_sysroot);
+
+ if (m_sdk_build)
+ platform_sp->SetSDKBuild (m_sdk_build);
}
}
return platform_sp;
@@ -45,6 +51,8 @@
OptionGroupPlatform::OptionParsingStarting (CommandInterpreter &interpreter)
{
m_platform_name.clear();
+ m_sdk_sysroot.Clear();
+ m_sdk_build.Clear();
m_os_version_major = UINT32_MAX;
m_os_version_minor = UINT32_MAX;
m_os_version_update = UINT32_MAX;
@@ -53,8 +61,10 @@
static OptionDefinition
g_option_table[] =
{
- { LLDB_OPT_SET_ALL, false, "platform" , 'p', required_argument, NULL, 0, eArgTypePlatform, "Specify name of the platform to use for this target, creating the platform if necessary."},
- { LLDB_OPT_SET_ALL, false, "sdk-version", 'v', required_argument, NULL, 0, eArgTypeNone, "Specify the initial SDK version to use prior to connecting." }
+ { LLDB_OPT_SET_ALL, false, "platform", 'p', required_argument, NULL, 0, eArgTypePlatform, "Specify name of the platform to use for this target, creating the platform if necessary."},
+ { LLDB_OPT_SET_ALL, false, "version" , 'v', required_argument, NULL, 0, eArgTypeNone, "Specify the initial SDK version to use prior to connecting." },
+ { LLDB_OPT_SET_ALL, false, "build" , 'b', required_argument, NULL, 0, eArgTypeNone, "Specify the initial SDK build number." },
+ { LLDB_OPT_SET_ALL, false, "sysroot" , 's', required_argument, NULL, 0, eArgTypeFilename, "Specify the SDK root directory that contains a root of all remote system files." }
};
static const uint32_t k_option_table_size = sizeof(g_option_table)/sizeof (OptionDefinition);
@@ -101,6 +111,14 @@
error.SetErrorStringWithFormat ("invalid version string '%s'", option_arg);
break;
+ case 'b':
+ m_sdk_build.SetCString (option_arg);
+ break;
+
+ case 's':
+ m_sdk_sysroot.SetCString (option_arg);
+ break;
+
default:
error.SetErrorStringWithFormat ("Unrecognized option '%c'.\n", short_option);
break;