Index: tools/debugserver/CMakeLists.txt =================================================================== --- tools/debugserver/CMakeLists.txt +++ tools/debugserver/CMakeLists.txt @@ -1,3 +1,2 @@ project(C CXX ASM-ATT) -add_subdirectory(scripts) add_subdirectory(source) Index: tools/debugserver/Makefile =================================================================== --- tools/debugserver/Makefile +++ tools/debugserver/Makefile @@ -8,6 +8,6 @@ ##===----------------------------------------------------------------------===## LLDB_LEVEL := ../.. -DIRS := scripts source +DIRS := source -include $(LLDB_LEVEL)/Makefile \ No newline at end of file +include $(LLDB_LEVEL)/Makefile Index: tools/debugserver/debugserver.xcodeproj/project.pbxproj =================================================================== --- tools/debugserver/debugserver.xcodeproj/project.pbxproj +++ tools/debugserver/debugserver.xcodeproj/project.pbxproj @@ -83,7 +83,6 @@ 26ACA3340D3E956300A2120B /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = System/Library/Frameworks/CoreFoundation.framework; sourceTree = SDKROOT; }; 26B67DE00EE9BC30006C8BC0 /* MachTask.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MachTask.h; sourceTree = ""; }; 26B67DE10EE9BC30006C8BC0 /* MachTask.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MachTask.mm; sourceTree = ""; }; - 26C636AD0C71303A0024798E /* dbgnub-config.pl */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.perl; path = "dbgnub-config.pl"; sourceTree = ""; }; 26C637D60C71334A0024798E /* DNB.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = DNB.cpp; sourceTree = ""; }; 26C637D70C71334A0024798E /* DNB.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DNB.h; sourceTree = ""; }; 26C637D80C71334A0024798E /* DNBArch.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DNBArch.h; sourceTree = ""; }; @@ -163,7 +162,6 @@ children = ( 26ACA3330D3E94F200A2120B /* Framework */, 26C637D50C71334A0024798E /* source */, - 26C636AC0C71303A0024798E /* scripts */, 1AB674ADFE9D54B511CA2CBB /* Products */, ); name = dbgnub; @@ -259,14 +257,6 @@ name = Framework; sourceTree = ""; }; - 26C636AC0C71303A0024798E /* scripts */ = { - isa = PBXGroup; - children = ( - 26C636AD0C71303A0024798E /* dbgnub-config.pl */, - ); - path = scripts; - sourceTree = ""; - }; 26C637D50C71334A0024798E /* source */ = { isa = PBXGroup; children = ( @@ -377,7 +367,6 @@ isa = PBXNativeTarget; buildConfigurationList = 26CE05A4115C31ED0022F371 /* Build configuration list for PBXNativeTarget "debugserver" */; buildPhases = ( - 26CE05C7115C36870022F371 /* ShellScript */, 26CE0591115C31C20022F371 /* Sources */, 26CE0592115C31C20022F371 /* Frameworks */, 4C3326CB18B2A2F600EB5DD7 /* ShellScript */, @@ -419,21 +408,6 @@ /* End PBXProject section */ /* Begin PBXShellScriptBuildPhase section */ - 26CE05C7115C36870022F371 /* ShellScript */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "$(SRCROOT)/scripts/dbgnub-config.pl", - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/DNBConfig.h", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "perl -x scripts/dbgnub-config.pl\n"; - }; 4C3326CB18B2A2F600EB5DD7 /* ShellScript */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; Index: tools/debugserver/scripts/CMakeLists.txt =================================================================== --- tools/debugserver/scripts/CMakeLists.txt +++ /dev/null @@ -1,14 +0,0 @@ -set(LLVM_NO_RTTI 1) - -set(dnbconfig_builder ${CMAKE_CURRENT_SOURCE_DIR}/dbgnub-config.pl) -set(dnbconfig_header ${LLDB_BINARY_DIR}/tools/debugserver/DNBConfig.h) -set_source_files_properties(${dnbconfig_header} PROPERTIES GENERATED 1) - -add_custom_command(OUTPUT ${dnbconfig_header} - COMMAND SCRIPT_OUTPUT_FILE_0=${dnbconfig_header} perl ${dnbconfig_builder} - DEPENDS ${dnbconfig_builder} - ) -add_custom_target(generate_dnbconfig - DEPENDS ${dnbconfig_header} - ) - Index: tools/debugserver/scripts/Makefile =================================================================== --- tools/debugserver/scripts/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -##===- tools/debugserver/scripts/Makefile ------------------*- Makefile -*-===## -# -# The LLVM Compiler Infrastructure -# -# This file is distributed under the University of Illinois Open Source -# License. See LICENSE.TXT for details. -# -##===----------------------------------------------------------------------===## - -LLDB_LEVEL := ../../.. - -include $(LLDB_LEVEL)/Makefile - -DBCONFIG_FILE = "$(PROJ_OBJ_DIR)/../DNBConfig.h" - -$(DBCONFIG_FILE): - SCRIPT_OUTPUT_FILE_0=$(DBCONFIG_FILE) perl $(PROJ_SRC_DIR)/dbgnub-config.pl - -all:: $(DBCONFIG_FILE) - -.PHONY: all \ No newline at end of file Index: tools/debugserver/scripts/dbgnub-config.pl =================================================================== --- tools/debugserver/scripts/dbgnub-config.pl +++ /dev/null @@ -1,72 +0,0 @@ -#!/usr/bin/perl - -use strict; -my $config_file = "$ENV{SCRIPT_OUTPUT_FILE_0}"; - -# Define the tests we need to run during this configuration -my @config_tests = ( - { - NAME => "HAVE_64_BIT_MACH_EXCEPTIONS", - TEST => "-e '$ENV{SDKROOT}/usr/include/mach/mach_exc.defs'", - COMMENT => "// Defined if we can use 64 bit mach exceptions", - FAIL => "#undef HAVE_64_BIT_MACH_EXCEPTIONS\ -#define mach_exception_data_t exception_data_t\ -#define mach_exception_data_type_t exception_data_type_t\ -#define mach_exc_server exc_server\ -#define MACH_EXCEPTION_CODES 0\n", - SUCCESS => "#define HAVE_64_BIT_MACH_EXCEPTIONS 1\n", - } -); - -#---------------------------------------------------------------------- -# Open the config file -#---------------------------------------------------------------------- -open(CONFIG, "> $config_file") || die "Couldn't open '$config_file' for writing: $!\n"; -print CONFIG "//" . "-" x 72 . "\n"; -print CONFIG "// This file is auto generated by a dbgnub-config.pl, do not edit by hand!\n"; -print CONFIG "//" . "-" x 72 . "\n"; -print CONFIG "// COMMAND LINE\n"; -print CONFIG "// " . join(' ', @ARGV) . "\n"; -print CONFIG "//" . "-" x 72 . "\n"; -print CONFIG "// ENVIRONMENT\n"; -my $key; -my $val; -while (($key, $val) = each %ENV) -{ - $val =~ s/\n/\n\/\/ /g; - printf CONFIG "// %s = %s\n", $key, $val; -} -print CONFIG "//" . "-" x 72 . "\n"; -print CONFIG "// SETTINGS\n"; -print CONFIG "// config_file: '$config_file'\n"; -print CONFIG "//" . "-" x 72 . "\n"; -print CONFIG "\n\n"; -print CONFIG "#ifndef __DBGNUB_CONFIG__\n"; -print CONFIG "#define __DBGNUB_CONFIG__\n"; - - -#---------------------------------------------------------------------- -# Run the tests -#---------------------------------------------------------------------- -foreach my $test_href (@config_tests) -{ - if (exists $test_href->{COMMENT}) { - print CONFIG "\n$test_href->{COMMENT}\n"; - } else { - print CONFIG "\n// $test_href->{NAME}\n"; - } - - my $test_result = eval "$test_href->{TEST}"; - if ($test_result != 0) - { - print CONFIG "$test_href->{SUCCESS}\n"; - } - else - { - print CONFIG "$test_href->{FAIL}\n"; - } -} - -print CONFIG "#endif // #ifndef __DBGNUB_CONFIG__\n"; -close(CONFIG); - Index: tools/debugserver/source/CMakeLists.txt =================================================================== --- tools/debugserver/source/CMakeLists.txt +++ tools/debugserver/source/CMakeLists.txt @@ -41,7 +41,6 @@ endif () add_library(lldbDebugserverCommon - #${dnbconfig_header} debugserver.cpp DNBArch.cpp DNBBreakpoint.cpp @@ -63,8 +62,6 @@ TTYState.cpp ) -add_dependencies(lldbDebugserverCommon generate_dnbconfig) - if (CMAKE_SYSTEM_NAME MATCHES "Darwin") find_library(COCOA_LIBRARY Cocoa) target_link_libraries(lldbDebugserverCommon ${COCOA_LIBRARY}) Index: tools/debugserver/source/MacOSX/CMakeLists.txt =================================================================== --- tools/debugserver/source/MacOSX/CMakeLists.txt +++ tools/debugserver/source/MacOSX/CMakeLists.txt @@ -14,8 +14,7 @@ ${CMAKE_CURRENT_BINARY_DIR}/mach_excUser.c ) add_custom_command(OUTPUT ${generated_mach_interfaces} - COMMAND mig -I${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/dbgnub-mig.defs - DEPENDS ${dnbconfig_header} + COMMAND mig ${CMAKE_CURRENT_SOURCE_DIR}/dbgnub-mig.defs ) set(DEBUGSERVER_VERS_GENERATED_FILE ${CMAKE_CURRENT_BINARY_DIR}/debugserver_vers.c) @@ -34,7 +33,6 @@ ) add_lldb_executable(debugserver - ${dnbconfig_header} HasAVX.s CFBundle.cpp CFData.cpp @@ -57,7 +55,6 @@ PROPERTIES LANGUAGE C COMPILE_FLAGS "-x assembler-with-cpp" ) -add_dependencies(debugserver generate_dnbconfig) target_link_libraries(debugserver ${DEBUGSERVER_USED_LIBS}) # Sign the debugserver binary Index: tools/debugserver/source/MacOSX/MachException.h =================================================================== --- tools/debugserver/source/MacOSX/MachException.h +++ tools/debugserver/source/MacOSX/MachException.h @@ -17,7 +17,6 @@ #include #include -#include "DNBConfig.h" class MachProcess; class PThreadMutex; Index: tools/debugserver/source/MacOSX/dbgnub-mig.defs =================================================================== --- tools/debugserver/source/MacOSX/dbgnub-mig.defs +++ tools/debugserver/source/MacOSX/dbgnub-mig.defs @@ -2,15 +2,4 @@ * nub.defs */ -/* - * DNBConfig.h is autogenerated by a perl script that is run as a build - * script in XCode. XCode is responsible for calling the script and setting - * the include paths correctly to locate it. The file will exist in the - * derived sources directory in the build folder. - * - */ - -#include "DNBConfig.h" - - #import