Skip to content

Cherry-pick some lldb changes to stable/20230725 #7124

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions lldb/include/lldb/API/SBDefines.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ class LLDB_API SBAddress;
class LLDB_API SBAttachInfo;
class LLDB_API SBBlock;
class LLDB_API SBBreakpoint;
class LLDB_API SBBreakpointList;
class LLDB_API SBBreakpointLocation;
class LLDB_API SBBreakpointName;
class LLDB_API SBBreakpointNameImpl;
Expand Down Expand Up @@ -85,11 +86,13 @@ class LLDB_API SBModule;
class LLDB_API SBModuleSpec;
class LLDB_API SBModuleSpecList;
class LLDB_API SBPlatform;
class LLDB_API SBPlatformConnectOptions;
class LLDB_API SBPlatformShellCommand;
class LLDB_API SBProcess;
class LLDB_API SBProcessInfo;
class LLDB_API SBQueue;
class LLDB_API SBQueueItem;
class LLDB_API SBReplayOptions;
class LLDB_API SBReproducer;
class LLDB_API SBScriptObject;
class LLDB_API SBSection;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,11 @@
//
//===----------------------------------------------------------------------===//

// Include this header if your system does not have a definition of uuid_t
// Include this header for a definition of uuid_t compatible with Darwin's
// definition.

#ifndef utility_UUID_COMPATIBILITY_H
#define utility_UUID_COMPATIBILITY_H

// uuid_t is guaranteed to always be a 16-byte array
typedef unsigned char uuid_t[16];

// Return 1 if uuid is null, that is, all zeroes.
inline __attribute__((always_inline)) int uuid_is_null(uuid_t uuid) {
for (int i = 0; i < 16; i++)
if (uuid[i])
return 0;
return 1;
}

#endif // utility_UUID_COMPATIBILITY_H
9 changes: 4 additions & 5 deletions lldb/source/API/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -232,12 +232,11 @@ else()
# When building the LLDB framework, this isn't necessary as there we copy everything we need into
# the framework (including the Clang resourece directory).
if(NOT LLDB_BUILD_FRAMEWORK)
get_target_property(liblldb_TARGET_FILE_DIR liblldb TARGET_FILE_DIR)
file(MAKE_DIRECTORY "${liblldb_TARGET_FILE_DIR}/clang")
set(LLDB_CLANG_RESOURCE_DIR "$<TARGET_FILE_DIR:liblldb>/clang")
add_custom_command(TARGET liblldb POST_BUILD
COMMENT "Linking Clang resource dir into LLDB build directory: ${liblldb_TARGET_FILE_DIR}/clang"
COMMAND ${CMAKE_COMMAND} -E make_directory "${liblldb_TARGET_FILE_DIR}/clang"
COMMAND ${CMAKE_COMMAND} -E create_symlink "${LLDB_EXTERNAL_CLANG_RESOURCE_DIR}" "${liblldb_TARGET_FILE_DIR}/clang/${LLDB_CLANG_RESOURCE_DIR_NAME}"
COMMENT "Linking Clang resource dir into LLDB build directory: ${LLDB_CLANG_RESOURCE_DIR}"
COMMAND ${CMAKE_COMMAND} -E create_symlink
"${LLDB_EXTERNAL_CLANG_RESOURCE_DIR}" "${LLDB_CLANG_RESOURCE_DIR}"
)
endif()
endif()
Expand Down
4 changes: 0 additions & 4 deletions lldb/source/Expression/ObjectFileJIT.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,6 @@
#include "lldb/Utility/Timer.h"
#include "lldb/Utility/UUID.h"

#ifndef __APPLE__
#include "Utility/UuidCompatibility.h"
#endif

using namespace lldb;
using namespace lldb_private;

Expand Down
2 changes: 1 addition & 1 deletion lldb/source/Host/macosx/objcxx/HostInfoMacOSX.mm
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//

#include "lldb/Host/macosx/HostInfoMacOSX.h"
#include "Utility/UuidCompatibility.h"
#include "lldb/Host/FileSystem.h"
#include "lldb/Host/Host.h"
#include "lldb/Host/HostInfo.h"
Expand All @@ -32,6 +31,7 @@
#include <sys/sysctl.h>
#include <sys/syslimits.h>
#include <sys/types.h>
#include <uuid/uuid.h>

// Objective-C/C++ includes
#include <CoreFoundation/CoreFoundation.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,6 @@
#define DEBUG_PRINTF(fmt, ...)
#endif

#ifndef __APPLE__
#include "Utility/UuidCompatibility.h"
#else
#include <uuid/uuid.h>
#endif

#include <memory>

using namespace lldb;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
#endif

#ifndef __APPLE__
#include "Utility/UuidCompatibility.h"
#include "lldb/Utility/AppleUuidCompatibility.h"
#else
#include <uuid/uuid.h>
#endif
Expand Down
2 changes: 1 addition & 1 deletion lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
#endif

#ifndef __APPLE__
#include "Utility/UuidCompatibility.h"
#include "lldb/Utility/AppleUuidCompatibility.h"
#else
#include <uuid/uuid.h>
#endif
Expand Down