diff options
Diffstat (limited to 'lldb/source')
3 files changed, 20 insertions, 5 deletions
diff --git a/lldb/source/Host/macosx/launcherXPCService/LauncherRootXPCService-Info.plist b/lldb/source/Host/macosx/launcherXPCService/LauncherRootXPCService-Info.plist index dd53ac9b8df..db01bb87ebb 100644 --- a/lldb/source/Host/macosx/launcherXPCService/LauncherRootXPCService-Info.plist +++ b/lldb/source/Host/macosx/launcherXPCService/LauncherRootXPCService-Info.plist @@ -25,7 +25,7 @@ <key>CFBundleSignature</key> <string>????</string> <key>CFBundleVersion</key> - <string>168</string> + <string>300.99.0</string> <key>NSHumanReadableCopyright</key> <string>Copyright © 2012 Apple Inc. All rights reserved.</string> <key>XPCService</key> diff --git a/lldb/source/Host/macosx/launcherXPCService/LauncherXPCService-Info.plist b/lldb/source/Host/macosx/launcherXPCService/LauncherXPCService-Info.plist index b62c6701bc7..106e1f019d6 100644 --- a/lldb/source/Host/macosx/launcherXPCService/LauncherXPCService-Info.plist +++ b/lldb/source/Host/macosx/launcherXPCService/LauncherXPCService-Info.plist @@ -25,7 +25,7 @@ <key>CFBundleSignature</key> <string>????</string> <key>CFBundleVersion</key> - <string>168</string> + <string>300.99.0</string> <key>NSHumanReadableCopyright</key> <string>Copyright © 2012 Apple Inc. All rights reserved.</string> <key>XPCService</key> diff --git a/lldb/source/lldb.cpp b/lldb/source/lldb.cpp index fc2c5b1d472..4cb0aaed2d8 100644 --- a/lldb/source/lldb.cpp +++ b/lldb/source/lldb.cpp @@ -224,9 +224,8 @@ lldb_private::Terminate () Log::Terminate(); } - #if defined (__APPLE__) -extern "C" const double liblldb_coreVersionNumber; +extern "C" const unsigned char liblldb_coreVersionString[]; #else #include "clang/Basic/Version.h" @@ -259,7 +258,23 @@ lldb_private::GetVersion () #if defined (__APPLE__) static char g_version_string[32]; if (g_version_string[0] == '\0') - ::snprintf (g_version_string, sizeof(g_version_string), "LLDB-%g", liblldb_coreVersionNumber); + { + const char *version_string = ::strstr ((const char *)liblldb_coreVersionString, "PROJECT:"); + + if (version_string) + version_string += sizeof("PROJECT:") - 1; + else + version_string = "unknown"; + + const char *newline_loc = strchr(version_string, '\n'); + + size_t version_len = sizeof(g_version_string); + + if (newline_loc && (newline_loc - version_string < version_len)) + version_len = newline_loc - version_string; + + ::strncpy(g_version_string, version_string, version_len); + } return g_version_string; #else |

