Imported Upstream version 6.10.0.49

Former-commit-id: 1d6753294b2993e1fbf92de9366bb9544db4189b
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2020-01-16 16:38:04 +00:00
parent d94e79959b
commit 468663ddbb
48518 changed files with 2789335 additions and 61176 deletions

View File

@@ -0,0 +1,13 @@
add_subdirectory(SysV-arm)
add_subdirectory(SysV-arm64)
add_subdirectory(SysV-hexagon)
add_subdirectory(SysV-ppc)
add_subdirectory(SysV-ppc64)
add_subdirectory(SysV-mips)
add_subdirectory(SysV-mips64)
add_subdirectory(SysV-s390x)
add_subdirectory(SysV-i386)
add_subdirectory(SysV-x86_64)
add_subdirectory(MacOSX-i386)
add_subdirectory(MacOSX-arm)
add_subdirectory(MacOSX-arm64)

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,102 @@
//===-- ABIMacOSX_arm.h ----------------------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
#ifndef liblldb_ABIMacOSX_arm_h_
#define liblldb_ABIMacOSX_arm_h_
// C Includes
// C++ Includes
// Other libraries and framework includes
// Project includes
#include "lldb/Target/ABI.h"
#include "lldb/lldb-private.h"
class ABIMacOSX_arm : public lldb_private::ABI {
public:
~ABIMacOSX_arm() override = default;
size_t GetRedZoneSize() const override;
bool PrepareTrivialCall(lldb_private::Thread &thread, lldb::addr_t sp,
lldb::addr_t func_addr, lldb::addr_t returnAddress,
llvm::ArrayRef<lldb::addr_t> args) const override;
bool GetArgumentValues(lldb_private::Thread &thread,
lldb_private::ValueList &values) const override;
lldb_private::Status
SetReturnValueObject(lldb::StackFrameSP &frame_sp,
lldb::ValueObjectSP &new_value) override;
bool
CreateFunctionEntryUnwindPlan(lldb_private::UnwindPlan &unwind_plan) override;
bool CreateDefaultUnwindPlan(lldb_private::UnwindPlan &unwind_plan) override;
bool RegisterIsVolatile(const lldb_private::RegisterInfo *reg_info) override;
bool CallFrameAddressIsValid(lldb::addr_t cfa) override {
// Make sure the stack call frame addresses are are 4 byte aligned
if (cfa & (4ull - 1ull))
return false; // Not 4 byte aligned
if (cfa == 0)
return false; // Zero is not a valid stack address
return true;
}
bool CodeAddressIsValid(lldb::addr_t pc) override {
// Just make sure the address is a valid 32 bit address. Bit zero
// might be set due to Thumb function calls, so don't enforce 2 byte
// alignment
return pc <= UINT32_MAX;
}
lldb::addr_t FixCodeAddress(lldb::addr_t pc) override {
// ARM uses bit zero to signify a code address is thumb, so we must
// strip bit zero in any code addresses.
return pc & ~(lldb::addr_t)1;
}
const lldb_private::RegisterInfo *
GetRegisterInfoArray(uint32_t &count) override;
bool IsArmv7kProcess() const;
//------------------------------------------------------------------
// Static Functions
//------------------------------------------------------------------
static void Initialize();
static void Terminate();
static lldb::ABISP CreateInstance(lldb::ProcessSP process_sp, const lldb_private::ArchSpec &arch);
static lldb_private::ConstString GetPluginNameStatic();
//------------------------------------------------------------------
// PluginInterface protocol
//------------------------------------------------------------------
lldb_private::ConstString GetPluginName() override;
uint32_t GetPluginVersion() override;
protected:
lldb::ValueObjectSP
GetReturnValueObjectImpl(lldb_private::Thread &thread,
lldb_private::CompilerType &ast_type) const override;
private:
ABIMacOSX_arm(lldb::ProcessSP process_sp) : lldb_private::ABI(process_sp) {
// Call CreateInstance instead.
}
};
#endif // liblldb_ABIMacOSX_arm_h_

View File

@@ -0,0 +1,11 @@
add_lldb_library(lldbPluginABIMacOSX_arm PLUGIN
ABIMacOSX_arm.cpp
LINK_LIBS
lldbCore
lldbSymbol
lldbTarget
lldbPluginProcessUtility
LINK_COMPONENTS
Support
)

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,110 @@
//===-- ABIMacOSX_arm64.h ---------------------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
#ifndef liblldb_ABIMacOSX_arm64_h_
#define liblldb_ABIMacOSX_arm64_h_
// C Includes
// C++ Includes
// Other libraries and framework includes
// Project includes
#include "lldb/Target/ABI.h"
#include "lldb/Utility/ConstString.h"
#include "lldb/lldb-private.h"
class ABIMacOSX_arm64 : public lldb_private::ABI {
public:
~ABIMacOSX_arm64() override = default;
size_t GetRedZoneSize() const override;
bool PrepareTrivialCall(lldb_private::Thread &thread, lldb::addr_t sp,
lldb::addr_t functionAddress,
lldb::addr_t returnAddress,
llvm::ArrayRef<lldb::addr_t> args) const override;
bool GetArgumentValues(lldb_private::Thread &thread,
lldb_private::ValueList &values) const override;
bool
CreateFunctionEntryUnwindPlan(lldb_private::UnwindPlan &unwind_plan) override;
bool CreateDefaultUnwindPlan(lldb_private::UnwindPlan &unwind_plan) override;
bool RegisterIsVolatile(const lldb_private::RegisterInfo *reg_info) override;
// The arm64 ABI requires that stack frames be 16 byte aligned.
// When there is a trap handler on the stack, e.g. _sigtramp in userland
// code, we've seen that the stack pointer is often not aligned properly
// before the handler is invoked. This means that lldb will stop the unwind
// early -- before the function which caused the trap.
//
// To work around this, we relax that alignment to be just word-size
// (8-bytes).
// Whitelisting the trap handlers for user space would be easy (_sigtramp) but
// in other environments there can be a large number of different functions
// involved in async traps.
bool CallFrameAddressIsValid(lldb::addr_t cfa) override {
// Make sure the stack call frame addresses are are 8 byte aligned
if (cfa & (8ull - 1ull))
return false; // Not 8 byte aligned
if (cfa == 0)
return false; // Zero is not a valid stack address
return true;
}
bool CodeAddressIsValid(lldb::addr_t pc) override {
if (pc & (4ull - 1ull))
return false; // Not 4 byte aligned
// Anything else if fair game..
return true;
}
const lldb_private::RegisterInfo *
GetRegisterInfoArray(uint32_t &count) override;
//------------------------------------------------------------------
// Static Functions
//------------------------------------------------------------------
static void Initialize();
static void Terminate();
static lldb::ABISP CreateInstance(lldb::ProcessSP process_sp, const lldb_private::ArchSpec &arch);
//------------------------------------------------------------------
// PluginInterface protocol
//------------------------------------------------------------------
static lldb_private::ConstString GetPluginNameStatic();
lldb_private::ConstString GetPluginName() override {
return GetPluginNameStatic();
}
uint32_t GetPluginVersion() override;
lldb_private::Status
SetReturnValueObject(lldb::StackFrameSP &frame_sp,
lldb::ValueObjectSP &new_value) override;
protected:
lldb::ValueObjectSP
GetReturnValueObjectImpl(lldb_private::Thread &thread,
lldb_private::CompilerType &ast_type) const override;
private:
ABIMacOSX_arm64(lldb::ProcessSP process_sp) : lldb_private::ABI(process_sp) {
// Call CreateInstance instead.
}
};
#endif // liblldb_ABIMacOSX_arm64_h_

View File

@@ -0,0 +1,10 @@
add_lldb_library(lldbPluginABIMacOSX_arm64 PLUGIN
ABIMacOSX_arm64.cpp
LINK_LIBS
lldbCore
lldbSymbol
lldbTarget
LINK_COMPONENTS
Support
)

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,109 @@
//===-- ABIMacOSX_i386.h ----------------------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
#ifndef liblldb_ABIMacOSX_i386_h_
#define liblldb_ABIMacOSX_i386_h_
// C Includes
// C++ Includes
// Other libraries and framework includes
// Project includes
#include "lldb/Core/Value.h"
#include "lldb/Target/ABI.h"
#include "lldb/lldb-private.h"
class ABIMacOSX_i386 : public lldb_private::ABI {
public:
~ABIMacOSX_i386() override = default;
size_t GetRedZoneSize() const override;
bool PrepareTrivialCall(lldb_private::Thread &thread, lldb::addr_t sp,
lldb::addr_t func_addr, lldb::addr_t return_addr,
llvm::ArrayRef<lldb::addr_t> args) const override;
bool GetArgumentValues(lldb_private::Thread &thread,
lldb_private::ValueList &values) const override;
lldb_private::Status
SetReturnValueObject(lldb::StackFrameSP &frame_sp,
lldb::ValueObjectSP &new_value) override;
bool
CreateFunctionEntryUnwindPlan(lldb_private::UnwindPlan &unwind_plan) override;
bool CreateDefaultUnwindPlan(lldb_private::UnwindPlan &unwind_plan) override;
bool RegisterIsVolatile(const lldb_private::RegisterInfo *reg_info) override;
// The Darwin i386 ABI requires that stack frames be 16 byte aligned.
// When there is a trap handler on the stack, e.g. _sigtramp in userland
// code, we've seen that the stack pointer is often not aligned properly
// before the handler is invoked. This means that lldb will stop the unwind
// early -- before the function which caused the trap.
//
// To work around this, we relax that alignment to be just word-size
// (4-bytes).
// Whitelisting the trap handlers for user space would be easy (_sigtramp) but
// in other environments there can be a large number of different functions
// involved in async traps.
//
// If we were to enforce 16-byte alignment, we also need to relax to 4-byte
// alignment for non-darwin i386 targets.
bool CallFrameAddressIsValid(lldb::addr_t cfa) override {
// Make sure the stack call frame addresses are are 4 byte aligned
if (cfa & (4ull - 1ull))
return false; // Not 4 byte aligned
if (cfa == 0)
return false; // Zero is not a valid stack address
return true;
}
bool CodeAddressIsValid(lldb::addr_t pc) override {
// Just make sure the address is a valid 32 bit address.
return pc <= UINT32_MAX;
}
const lldb_private::RegisterInfo *
GetRegisterInfoArray(uint32_t &count) override;
//------------------------------------------------------------------
// Static Functions
//------------------------------------------------------------------
static void Initialize();
static void Terminate();
static lldb::ABISP CreateInstance(lldb::ProcessSP process_sp, const lldb_private::ArchSpec &arch);
//------------------------------------------------------------------
// PluginInterface protocol
//------------------------------------------------------------------
static lldb_private::ConstString GetPluginNameStatic();
lldb_private::ConstString GetPluginName() override;
uint32_t GetPluginVersion() override;
protected:
lldb::ValueObjectSP
GetReturnValueObjectImpl(lldb_private::Thread &thread,
lldb_private::CompilerType &ast_type) const override;
bool RegisterIsCalleeSaved(const lldb_private::RegisterInfo *reg_info);
private:
ABIMacOSX_i386(lldb::ProcessSP process_sp) : lldb_private::ABI(process_sp) {
// Call CreateInstance instead.
}
};
#endif // liblldb_ABIMacOSX_i386_h_

View File

@@ -0,0 +1,10 @@
add_lldb_library(lldbPluginABIMacOSX_i386 PLUGIN
ABIMacOSX_i386.cpp
LINK_LIBS
lldbCore
lldbSymbol
lldbTarget
LINK_COMPONENTS
Support
)

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,102 @@
//===-- ABISysV_arm.h ----------------------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
#ifndef liblldb_ABISysV_arm_h_
#define liblldb_ABISysV_arm_h_
// C Includes
// C++ Includes
// Other libraries and framework includes
// Project includes
#include "lldb/Target/ABI.h"
#include "lldb/lldb-private.h"
class ABISysV_arm : public lldb_private::ABI {
public:
~ABISysV_arm() override = default;
size_t GetRedZoneSize() const override;
bool PrepareTrivialCall(lldb_private::Thread &thread, lldb::addr_t sp,
lldb::addr_t func_addr, lldb::addr_t returnAddress,
llvm::ArrayRef<lldb::addr_t> args) const override;
bool GetArgumentValues(lldb_private::Thread &thread,
lldb_private::ValueList &values) const override;
lldb_private::Status
SetReturnValueObject(lldb::StackFrameSP &frame_sp,
lldb::ValueObjectSP &new_value) override;
bool
CreateFunctionEntryUnwindPlan(lldb_private::UnwindPlan &unwind_plan) override;
bool CreateDefaultUnwindPlan(lldb_private::UnwindPlan &unwind_plan) override;
bool RegisterIsVolatile(const lldb_private::RegisterInfo *reg_info) override;
bool CallFrameAddressIsValid(lldb::addr_t cfa) override {
// Make sure the stack call frame addresses are are 4 byte aligned
if (cfa & (4ull - 1ull))
return false; // Not 4 byte aligned
if (cfa == 0)
return false; // Zero is not a valid stack address
return true;
}
bool CodeAddressIsValid(lldb::addr_t pc) override {
// Just make sure the address is a valid 32 bit address. Bit zero
// might be set due to Thumb function calls, so don't enforce 2 byte
// alignment
return pc <= UINT32_MAX;
}
lldb::addr_t FixCodeAddress(lldb::addr_t pc) override {
// ARM uses bit zero to signify a code address is thumb, so we must
// strip bit zero in any code addresses.
return pc & ~(lldb::addr_t)1;
}
const lldb_private::RegisterInfo *
GetRegisterInfoArray(uint32_t &count) override;
bool IsArmHardFloat(lldb_private::Thread &thread) const;
//------------------------------------------------------------------
// Static Functions
//------------------------------------------------------------------
static void Initialize();
static void Terminate();
static lldb::ABISP CreateInstance(lldb::ProcessSP process_sp, const lldb_private::ArchSpec &arch);
static lldb_private::ConstString GetPluginNameStatic();
//------------------------------------------------------------------
// PluginInterface protocol
//------------------------------------------------------------------
lldb_private::ConstString GetPluginName() override;
uint32_t GetPluginVersion() override;
protected:
lldb::ValueObjectSP
GetReturnValueObjectImpl(lldb_private::Thread &thread,
lldb_private::CompilerType &ast_type) const override;
private:
ABISysV_arm(lldb::ProcessSP process_sp) : lldb_private::ABI(process_sp) {
// Call CreateInstance instead.
}
};
#endif // liblldb_ABISysV_arm_h_

View File

@@ -0,0 +1,11 @@
add_lldb_library(lldbPluginABISysV_arm PLUGIN
ABISysV_arm.cpp
LINK_LIBS
lldbCore
lldbSymbol
lldbTarget
lldbPluginProcessUtility
LINK_COMPONENTS
Support
)

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,109 @@
//===-- ABISysV_arm64.h ---------------------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
#ifndef liblldb_ABISysV_arm64_h_
#define liblldb_ABISysV_arm64_h_
// C Includes
// C++ Includes
// Other libraries and framework includes
// Project includes
#include "lldb/Target/ABI.h"
#include "lldb/lldb-private.h"
class ABISysV_arm64 : public lldb_private::ABI {
public:
~ABISysV_arm64() override = default;
size_t GetRedZoneSize() const override;
bool PrepareTrivialCall(lldb_private::Thread &thread, lldb::addr_t sp,
lldb::addr_t functionAddress,
lldb::addr_t returnAddress,
llvm::ArrayRef<lldb::addr_t> args) const override;
bool GetArgumentValues(lldb_private::Thread &thread,
lldb_private::ValueList &values) const override;
lldb_private::Status
SetReturnValueObject(lldb::StackFrameSP &frame_sp,
lldb::ValueObjectSP &new_value) override;
bool
CreateFunctionEntryUnwindPlan(lldb_private::UnwindPlan &unwind_plan) override;
bool CreateDefaultUnwindPlan(lldb_private::UnwindPlan &unwind_plan) override;
bool RegisterIsVolatile(const lldb_private::RegisterInfo *reg_info) override;
// The arm64 ABI requires that stack frames be 16 byte aligned.
// When there is a trap handler on the stack, e.g. _sigtramp in userland
// code, we've seen that the stack pointer is often not aligned properly
// before the handler is invoked. This means that lldb will stop the unwind
// early -- before the function which caused the trap.
//
// To work around this, we relax that alignment to be just word-size
// (8-bytes).
// Whitelisting the trap handlers for user space would be easy (_sigtramp) but
// in other environments there can be a large number of different functions
// involved in async traps.
bool CallFrameAddressIsValid(lldb::addr_t cfa) override {
// Make sure the stack call frame addresses are are 8 byte aligned
if (cfa & (8ull - 1ull))
return false; // Not 8 byte aligned
if (cfa == 0)
return false; // Zero is not a valid stack address
return true;
}
bool CodeAddressIsValid(lldb::addr_t pc) override {
if (pc & (4ull - 1ull))
return false; // Not 4 byte aligned
// Anything else if fair game..
return true;
}
const lldb_private::RegisterInfo *
GetRegisterInfoArray(uint32_t &count) override;
bool GetPointerReturnRegister(const char *&name) override;
//------------------------------------------------------------------
// Static Functions
//------------------------------------------------------------------
static void Initialize();
static void Terminate();
static lldb::ABISP CreateInstance(lldb::ProcessSP process_sp, const lldb_private::ArchSpec &arch);
static lldb_private::ConstString GetPluginNameStatic();
//------------------------------------------------------------------
// PluginInterface protocol
//------------------------------------------------------------------
lldb_private::ConstString GetPluginName() override;
uint32_t GetPluginVersion() override;
protected:
lldb::ValueObjectSP
GetReturnValueObjectImpl(lldb_private::Thread &thread,
lldb_private::CompilerType &ast_type) const override;
private:
ABISysV_arm64(lldb::ProcessSP process_sp) : lldb_private::ABI(process_sp) {
// Call CreateInstance instead.
}
};
#endif // liblldb_ABISysV_arm64_h_

View File

@@ -0,0 +1,10 @@
add_lldb_library(lldbPluginABISysV_arm64 PLUGIN
ABISysV_arm64.cpp
LINK_LIBS
lldbCore
lldbSymbol
lldbTarget
LINK_COMPONENTS
Support
)

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,114 @@
//===-- ABISysV_hexagon.h ----------------------------------------*- C++
//-*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
#ifndef liblldb_ABISysV_hexagon_h_
#define liblldb_ABISysV_hexagon_h_
// C Includes
// C++ Includes
// Other libraries and framework includes
// Project includes
#include "lldb/Target/ABI.h"
#include "lldb/lldb-private.h"
class ABISysV_hexagon : public lldb_private::ABI {
public:
~ABISysV_hexagon() override = default;
size_t GetRedZoneSize() const override;
bool PrepareTrivialCall(lldb_private::Thread &thread, lldb::addr_t sp,
lldb::addr_t functionAddress,
lldb::addr_t returnAddress,
llvm::ArrayRef<lldb::addr_t> args) const override;
// special thread plan for GDB style non-jit function calls
bool
PrepareTrivialCall(lldb_private::Thread &thread, lldb::addr_t sp,
lldb::addr_t functionAddress, lldb::addr_t returnAddress,
llvm::Type &prototype,
llvm::ArrayRef<ABI::CallArgument> args) const override;
bool GetArgumentValues(lldb_private::Thread &thread,
lldb_private::ValueList &values) const override;
lldb_private::Status
SetReturnValueObject(lldb::StackFrameSP &frame_sp,
lldb::ValueObjectSP &new_value) override;
lldb::ValueObjectSP
GetReturnValueObjectImpl(lldb_private::Thread &thread,
lldb_private::CompilerType &type) const override;
// specialized to work with llvm IR types
lldb::ValueObjectSP GetReturnValueObjectImpl(lldb_private::Thread &thread,
llvm::Type &type) const override;
bool
CreateFunctionEntryUnwindPlan(lldb_private::UnwindPlan &unwind_plan) override;
bool CreateDefaultUnwindPlan(lldb_private::UnwindPlan &unwind_plan) override;
bool RegisterIsVolatile(const lldb_private::RegisterInfo *reg_info) override;
bool CallFrameAddressIsValid(lldb::addr_t cfa) override {
// Make sure the stack call frame addresses are 8 byte aligned
if (cfa & 0x07)
return false; // Not 8 byte aligned
if (cfa == 0)
return false; // Zero is not a valid stack address
return true;
}
bool CodeAddressIsValid(lldb::addr_t pc) override {
// We have a 64 bit address space, so anything is valid as opcodes
// aren't fixed width...
return true;
}
const lldb_private::RegisterInfo *
GetRegisterInfoArray(uint32_t &count) override;
//------------------------------------------------------------------
// Static Functions
//------------------------------------------------------------------
static void Initialize();
static void Terminate();
static lldb::ABISP CreateInstance(lldb::ProcessSP process_sp, const lldb_private::ArchSpec &arch);
static lldb_private::ConstString GetPluginNameStatic();
//------------------------------------------------------------------
// PluginInterface protocol
//------------------------------------------------------------------
lldb_private::ConstString GetPluginName() override;
uint32_t GetPluginVersion() override;
protected:
void CreateRegisterMapIfNeeded();
lldb::ValueObjectSP
GetReturnValueObjectSimple(lldb_private::Thread &thread,
lldb_private::CompilerType &ast_type) const;
bool RegisterIsCalleeSaved(const lldb_private::RegisterInfo *reg_info);
private:
ABISysV_hexagon(lldb::ProcessSP process_sp) : lldb_private::ABI(process_sp) {
// Call CreateInstance instead.
}
};
#endif // liblldb_ABISysV_hexagon_h_

View File

@@ -0,0 +1,10 @@
add_lldb_library(lldbPluginABISysV_hexagon PLUGIN
ABISysV_hexagon.cpp
LINK_LIBS
lldbCore
lldbSymbol
lldbTarget
LINK_COMPONENTS
Support
)

File diff suppressed because it is too large Load Diff

Some files were not shown because too many files have changed in this diff Show More