diff options
author | Jean-Daniel Dupas <devlists@shadowlab.org> | 2014-07-02 19:37:25 +0000 |
---|---|---|
committer | Jean-Daniel Dupas <devlists@shadowlab.org> | 2014-07-02 19:37:25 +0000 |
commit | 2ab92cf8f091e5262f9e2aa86318560a008359cd (patch) | |
tree | 4ff834a8051e7a69d0bc5019d6b1e5ee6ae6a4d1 | |
parent | e029fa57819b45ef736fa272ef575e552acfa6cc (diff) | |
download | bcm5719-llvm-2ab92cf8f091e5262f9e2aa86318560a008359cd.tar.gz bcm5719-llvm-2ab92cf8f091e5262f9e2aa86318560a008359cd.zip |
Removing Carbon dependency by removing obsolete code.
The only part using Carbon is a function in Host.mm used to open a file in Xcode.
That code is broken and it is no longer useful as Xcode supports LLDB natively.
llvm-svn: 212208
-rw-r--r-- | lldb/lldb.xcodeproj/project.pbxproj | 10 | ||||
-rw-r--r-- | lldb/source/Host/macosx/Host.mm | 93 |
2 files changed, 0 insertions, 103 deletions
diff --git a/lldb/lldb.xcodeproj/project.pbxproj b/lldb/lldb.xcodeproj/project.pbxproj index 863ffaac3b1..bad5721646f 100644 --- a/lldb/lldb.xcodeproj/project.pbxproj +++ b/lldb/lldb.xcodeproj/project.pbxproj @@ -1783,7 +1783,6 @@ 4C626533130F1B0A00C889F6 /* StreamTee.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = StreamTee.h; path = include/lldb/Core/StreamTee.h; sourceTree = "<group>"; }; 4C66499F14EEE7F100B0316F /* StreamCallback.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = StreamCallback.h; path = include/lldb/Core/StreamCallback.h; sourceTree = "<group>"; }; 4C6649A214EEE81000B0316F /* StreamCallback.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = StreamCallback.cpp; path = source/Core/StreamCallback.cpp; sourceTree = "<group>"; }; - 4C74CB6212288704006A8171 /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = /System/Library/Frameworks/Carbon.framework; sourceTree = "<absolute>"; }; 4C7CF7E31295E10E00B4FBB5 /* ThreadPlanCallUserExpression.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ThreadPlanCallUserExpression.h; path = include/lldb/Target/ThreadPlanCallUserExpression.h; sourceTree = "<group>"; }; 4C7CF7E51295E12B00B4FBB5 /* ThreadPlanCallUserExpression.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ThreadPlanCallUserExpression.cpp; path = source/Target/ThreadPlanCallUserExpression.cpp; sourceTree = "<group>"; }; 4C98D3DA118FB96F00E575D0 /* ClangFunction.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ClangFunction.cpp; path = source/Expression/ClangFunction.cpp; sourceTree = "<group>"; }; @@ -3833,7 +3832,6 @@ 26F5C32B10F3DFDD009D5894 /* libtermcap.dylib */, 26D55234159A7DB100708D8D /* libxml2.dylib */, 966C6B7818E6A56A0093F5EC /* libz.dylib */, - 4C74CB6212288704006A8171 /* Carbon.framework */, EDB919B414F6F10D008FF64B /* Security.framework */, ); name = Libraries; @@ -5408,8 +5406,6 @@ "-framework", Foundation, "-framework", - Carbon, - "-framework", DebugSymbols, "-framework", Security, @@ -5469,8 +5465,6 @@ "-framework", Foundation, "-framework", - Carbon, - "-framework", DebugSymbols, "-framework", Security, @@ -5805,8 +5799,6 @@ "-framework", Foundation, "-framework", - Carbon, - "-framework", DebugSymbols, "-framework", Security, @@ -6613,8 +6605,6 @@ "-framework", Foundation, "-framework", - Carbon, - "-framework", DebugSymbols, "-framework", Security, diff --git a/lldb/source/Host/macosx/Host.mm b/lldb/source/Host/macosx/Host.mm index 454de856e25..289ee9ae8ac 100644 --- a/lldb/source/Host/macosx/Host.mm +++ b/lldb/source/Host/macosx/Host.mm @@ -63,10 +63,6 @@ #include <CoreFoundation/CoreFoundation.h> #include <Foundation/Foundation.h> -#if !defined(__arm__) && !defined(__arm64__) -#include <Carbon/Carbon.h> -#endif - #ifndef _POSIX_SPAWN_DISABLE_ASLR #define _POSIX_SPAWN_DISABLE_ASLR 0x0100 #endif @@ -839,96 +835,7 @@ Host::OpenFileInExternalEditor (const FileSpec &file_spec, uint32_t line_no) return false; } - - ProcessInfoRec which_process; - ::memset(&which_process, 0, sizeof(which_process)); - unsigned char ap_name[PATH_MAX]; - which_process.processName = ap_name; - error = ::GetProcessInformation (&psn, &which_process); - - bool using_xcode; - if (error != noErr) - { - if (log) - log->Printf("GetProcessInformation failed, error: %ld.\n", error); - using_xcode = false; - } - else - using_xcode = strncmp((char *) ap_name+1, "Xcode", (int) ap_name[0]) == 0; - - // Xcode doesn't obey the line number in the Open Apple Event. So I have to send - // it an AppleScript to focus on the right line. - - if (using_xcode) - { - static ComponentInstance osa_component = NULL; - static const char *as_template = "tell application \"Xcode\"\n" - "set doc to the first document whose path is \"%s\"\n" - "set the selection to paragraph %d of doc\n" - "--- set the selected paragraph range to {%d, %d} of doc\n" - "end tell\n"; - const int chars_for_int = 32; - static int as_template_len = strlen (as_template); - - - char *as_str; - AEDesc as_desc; - - if (osa_component == NULL) - { - osa_component = ::OpenDefaultComponent (kOSAComponentType, - kAppleScriptSubtype); - } - - if (osa_component == NULL) - { - if (log) - log->Printf("Could not get default AppleScript component.\n"); - return false; - } - uint32_t as_str_size = as_template_len + strlen (file_path) + 3 * chars_for_int + 1; - as_str = (char *) malloc (as_str_size); - ::snprintf (as_str, - as_str_size - 1, - as_template, - file_path, - line_no, - line_no, - line_no); - - error = ::AECreateDesc (typeChar, - as_str, - strlen (as_str), - &as_desc); - - ::free (as_str); - - if (error != noErr) - { - if (log) - log->Printf("Failed to create AEDesc for Xcode AppleEvent: %ld.\n", error); - return false; - } - - OSAID ret_OSAID; - error = ::OSACompileExecute (osa_component, - &as_desc, - kOSANullScript, - kOSAModeNeverInteract, - &ret_OSAID); - - ::OSADispose (osa_component, ret_OSAID); - - ::AEDisposeDesc (&as_desc); - - if (error != noErr) - { - if (log) - log->Printf("Sending AppleEvent to Xcode failed, error: %ld.\n", error); - return false; - } - } return true; #endif // #if !defined(__arm__) } |