aboutsummaryrefslogtreecommitdiff
path: root/contrib/llvm-project/lldb/include/lldb/Core
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2021-06-13 19:31:46 +0000
committerDimitry Andric <dim@FreeBSD.org>2021-07-31 18:56:55 +0000
commitaf732203b8f7f006927528db5497f5cbc4c4742a (patch)
tree596f112de3b76118552871dbb6114bb7e3e17f40 /contrib/llvm-project/lldb/include/lldb/Core
parent83dea422ac8d4a8323e64203c2eadaa813768717 (diff)
downloadsrc-af732203b8f7f006927528db5497f5cbc4c4742a.tar.gz
src-af732203b8f7f006927528db5497f5cbc4c4742a.zip
Merge llvm-project 12.0.1 release and follow-up fixes
Merge llvm-project main llvmorg-12-init-17869-g8e464dd76bef This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp to llvmorg-12-init-17869-g8e464dd76bef, the last commit before the upstream release/12.x branch was created. PR: 255570 (cherry picked from commit e8d8bef961a50d4dc22501cde4fb9fb0be1b2532) Merge llvm-project 12.0.0 release This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp to llvmorg-12.0.0-0-gd28af7c654d8, a.k.a. 12.0.0 release. PR: 255570 (cherry picked from commit d409305fa3838fb39b38c26fc085fb729b8766d5) Disable strict-fp for powerpcspe, as it does not work properly yet Merge commit 5c18d1136665 from llvm git (by Qiu Chaofan) [SPE] Disable strict-fp for SPE by default As discussed in PR50385, strict-fp on PowerPC SPE has not been handled well. This patch disables it by default for SPE. Reviewed By: nemanjai, vit9696, jhibbits Differential Revision: https://reviews.llvm.org/D103235 PR: 255570 (cherry picked from commit 715df83abc049b23d9acddc81f2480bd4c056d64) Apply upstream libc++ fix to allow building with devel/xxx-xtoolchain-gcc Merge commit 52e9d80d5db2 from llvm git (by Jason Liu): [libc++] add `inline` for __open's definition in ifstream and ofstream Summary: When building with gcc on AIX, it seems that gcc does not like the `always_inline` without the `inline` keyword. So adding the inline keywords in for __open in ifstream and ofstream. That will also make it consistent with __open in basic_filebuf (it seems we added `inline` there before for gcc build as well). Differential Revision: https://reviews.llvm.org/D99422 PR: 255570 (cherry picked from commit d099db25464b826c5724cf2fb5b22292bbe15f6e) Undefine HAVE_(DE)REGISTER_FRAME in llvm's config.h on arm Otherwise, the lli tool (enable by WITH_CLANG_EXTRAS) won't link on arm, stating that __register_frame is undefined. This function is normally provided by libunwind, but explicitly not for the ARM Exception ABI. Reported by: oh PR: 255570 (cherry picked from commit f336b45e943c7f9a90ffcea1a6c4c7039e54c73c) Merge llvm-project 12.0.1 rc2 This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp to llvmorg-12.0.1-rc2-0-ge7dac564cd0e, a.k.a. 12.0.1 rc2. PR: 255570 (cherry picked from commit 23408297fbf3089f0388a8873b02fa75ab3f5bb9) Revert libunwind change to fix backtrace segfault on aarch64 Revert commit 22b615a96593 from llvm git (by Daniel Kiss): [libunwind] Support for leaf function unwinding. Unwinding leaf function is useful in cases when the backtrace finds a leaf function for example when it caused a signal. This patch also add the support for the DW_CFA_undefined because it marks the end of the frames. Ryan Prichard provided code for the tests. Reviewed By: #libunwind, mstorsjo Differential Revision: https://reviews.llvm.org/D83573 Reland with limit the test to the x86_64-linux target. Bisection has shown that this particular upstream commit causes programs using backtrace(3) on aarch64 to segfault. This affects the lang/rust port, for instance. Until we can upstream to fix this problem, revert the commit for now. Reported by: mikael PR: 256864 (cherry picked from commit 5866c369e4fd917c0d456f0f10b92ee354b82279) Merge llvm-project 12.0.1 release This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp to llvmorg-12.0.1-0-gfed41342a82f, a.k.a. 12.0.1 release. PR: 255570 (cherry picked from commit 4652422eb477731f284b1345afeefef7f269da50) compilert-rt: build out-of-line LSE atomics helpers for aarch64 Both clang >= 12 and gcc >= 10.1 now default to -moutline-atomics for aarch64. This requires a bunch of helper functions in libcompiler_rt.a, to avoid link errors like "undefined symbol: __aarch64_ldadd8_acq_rel". (Note: of course you can use -mno-outline-atomics as a workaround too, but this would negate the potential performance benefit of the faster LSE instructions.) Bump __FreeBSD_version so ports maintainers can easily detect this. PR: 257392 (cherry picked from commit cc55ee8009a550810d38777fd6ace9abf3a2f6b4)
Diffstat (limited to 'contrib/llvm-project/lldb/include/lldb/Core')
-rw-r--r--contrib/llvm-project/lldb/include/lldb/Core/Architecture.h7
-rw-r--r--contrib/llvm-project/lldb/include/lldb/Core/Communication.h2
-rw-r--r--contrib/llvm-project/lldb/include/lldb/Core/Debugger.h6
-rw-r--r--contrib/llvm-project/lldb/include/lldb/Core/Disassembler.h19
-rw-r--r--contrib/llvm-project/lldb/include/lldb/Core/IOHandler.h16
-rw-r--r--contrib/llvm-project/lldb/include/lldb/Core/IOHandlerCursesGUI.h2
-rw-r--r--contrib/llvm-project/lldb/include/lldb/Core/Module.h4
-rw-r--r--contrib/llvm-project/lldb/include/lldb/Core/ModuleList.h22
-rw-r--r--contrib/llvm-project/lldb/include/lldb/Core/PluginInterface.h6
-rw-r--r--contrib/llvm-project/lldb/include/lldb/Core/PluginManager.h36
-rw-r--r--contrib/llvm-project/lldb/include/lldb/Core/StructuredDataImpl.h14
-rw-r--r--contrib/llvm-project/lldb/include/lldb/Core/Value.h86
-rw-r--r--contrib/llvm-project/lldb/include/lldb/Core/ValueObject.h6
-rw-r--r--contrib/llvm-project/lldb/include/lldb/Core/ValueObjectCast.h2
-rw-r--r--contrib/llvm-project/lldb/include/lldb/Core/ValueObjectChild.h2
-rw-r--r--contrib/llvm-project/lldb/include/lldb/Core/ValueObjectConstResult.h4
-rw-r--r--contrib/llvm-project/lldb/include/lldb/Core/ValueObjectDynamicValue.h2
-rw-r--r--contrib/llvm-project/lldb/include/lldb/Core/ValueObjectMemory.h2
-rw-r--r--contrib/llvm-project/lldb/include/lldb/Core/ValueObjectRegister.h4
-rw-r--r--contrib/llvm-project/lldb/include/lldb/Core/ValueObjectSyntheticFilter.h2
-rw-r--r--contrib/llvm-project/lldb/include/lldb/Core/ValueObjectVariable.h2
21 files changed, 98 insertions, 148 deletions
diff --git a/contrib/llvm-project/lldb/include/lldb/Core/Architecture.h b/contrib/llvm-project/lldb/include/lldb/Core/Architecture.h
index d8dbbb4f540f..2ea8bd31ebf4 100644
--- a/contrib/llvm-project/lldb/include/lldb/Core/Architecture.h
+++ b/contrib/llvm-project/lldb/include/lldb/Core/Architecture.h
@@ -15,9 +15,6 @@ namespace lldb_private {
class Architecture : public PluginInterface {
public:
- Architecture() = default;
- ~Architecture() override = default;
-
/// This is currently intended to handle cases where a
/// program stops at an instruction that won't get executed and it
/// allows the stop reason, like "breakpoint hit", to be replaced
@@ -100,10 +97,6 @@ public:
Target &target) const {
return addr;
}
-
-private:
- Architecture(const Architecture &) = delete;
- void operator=(const Architecture &) = delete;
};
} // namespace lldb_private
diff --git a/contrib/llvm-project/lldb/include/lldb/Core/Communication.h b/contrib/llvm-project/lldb/include/lldb/Core/Communication.h
index 6b65974f9522..354c4bbcc283 100644
--- a/contrib/llvm-project/lldb/include/lldb/Core/Communication.h
+++ b/contrib/llvm-project/lldb/include/lldb/Core/Communication.h
@@ -285,7 +285,7 @@ public:
///
void SynchronizeWithReadThread();
- static const char *ConnectionStatusAsCString(lldb::ConnectionStatus status);
+ static std::string ConnectionStatusAsString(lldb::ConnectionStatus status);
bool GetCloseOnEOF() const { return m_close_on_eof; }
diff --git a/contrib/llvm-project/lldb/include/lldb/Core/Debugger.h b/contrib/llvm-project/lldb/include/lldb/Core/Debugger.h
index 7bea0dbae082..68daae1a3710 100644
--- a/contrib/llvm-project/lldb/include/lldb/Core/Debugger.h
+++ b/contrib/llvm-project/lldb/include/lldb/Core/Debugger.h
@@ -273,6 +273,8 @@ public:
bool SetUseColor(bool use_color);
+ bool GetUseAutosuggestion() const;
+
bool GetUseSourceCache() const;
bool SetUseSourceCache(bool use_source_cache);
@@ -332,8 +334,8 @@ public:
// This is for use in the command interpreter, when you either want the
// selected target, or if no target is present you want to prime the dummy
// target with entities that will be copied over to new targets.
- Target *GetSelectedOrDummyTarget(bool prefer_dummy = false);
- Target *GetDummyTarget() { return m_dummy_target_sp.get(); }
+ Target &GetSelectedOrDummyTarget(bool prefer_dummy = false);
+ Target &GetDummyTarget() { return *m_dummy_target_sp; }
lldb::BroadcasterManagerSP GetBroadcasterManager() {
return m_broadcaster_manager_sp;
diff --git a/contrib/llvm-project/lldb/include/lldb/Core/Disassembler.h b/contrib/llvm-project/lldb/include/lldb/Core/Disassembler.h
index 926a74b933ef..9a694de0f60a 100644
--- a/contrib/llvm-project/lldb/include/lldb/Core/Disassembler.h
+++ b/contrib/llvm-project/lldb/include/lldb/Core/Disassembler.h
@@ -48,6 +48,7 @@ class DataExtractor;
class Debugger;
class Disassembler;
class Module;
+class StackFrame;
class Stream;
class SymbolContext;
class SymbolContextList;
@@ -270,6 +271,13 @@ public:
lldb::InstructionSP GetInstructionAtIndex(size_t idx) const;
+ /// Get the instruction at the given address.
+ ///
+ /// \return
+ /// A valid \a InstructionSP if the address could be found, or null
+ /// otherwise.
+ lldb::InstructionSP GetInstructionAtAddress(const Address &addr);
+
//------------------------------------------------------------------
/// Get the index of the next branch instruction.
///
@@ -279,9 +287,6 @@ public:
/// @param[in] start
/// The instruction index of the first instruction to check.
///
- /// @param[in] target
- /// A LLDB target object that is used to resolve addresses.
- ///
/// @param[in] ignore_calls
/// It true, then fine the first branch instruction that isn't
/// a function call (a branch that calls and returns to the next
@@ -298,7 +303,6 @@ public:
/// found.
//------------------------------------------------------------------
uint32_t GetIndexOfNextBranchInstruction(uint32_t start,
- Target &target,
bool ignore_calls,
bool *found_calls) const;
@@ -408,11 +412,8 @@ public:
uint32_t num_mixed_context_lines, uint32_t options,
Stream &strm);
- static bool
- Disassemble(Debugger &debugger, const ArchSpec &arch, const char *plugin_name,
- const char *flavor, const ExecutionContext &exe_ctx,
- uint32_t num_instructions, bool mixed_source_and_assembly,
- uint32_t num_mixed_context_lines, uint32_t options, Stream &strm);
+ static bool Disassemble(Debugger &debugger, const ArchSpec &arch,
+ StackFrame &frame, Stream &strm);
// Constructors and Destructors
Disassembler(const ArchSpec &arch, const char *flavor);
diff --git a/contrib/llvm-project/lldb/include/lldb/Core/IOHandler.h b/contrib/llvm-project/lldb/include/lldb/Core/IOHandler.h
index 51592afbbabe..2e8f3225fd5f 100644
--- a/contrib/llvm-project/lldb/include/lldb/Core/IOHandler.h
+++ b/contrib/llvm-project/lldb/include/lldb/Core/IOHandler.h
@@ -15,7 +15,6 @@
#include "lldb/Utility/ConstString.h"
#include "lldb/Utility/Flags.h"
#include "lldb/Utility/Predicate.h"
-#include "lldb/Utility/Reproducer.h"
#include "lldb/Utility/Stream.h"
#include "lldb/Utility/StringList.h"
#include "lldb/lldb-defines.h"
@@ -32,6 +31,9 @@
namespace lldb_private {
class Debugger;
+namespace repro {
+class DataRecorder;
+}
}
namespace curses {
@@ -126,11 +128,11 @@ public:
FILE *GetErrorFILE();
- lldb::FileSP &GetInputFileSP();
+ lldb::FileSP GetInputFileSP();
- lldb::StreamFileSP &GetOutputStreamFileSP();
+ lldb::StreamFileSP GetOutputStreamFileSP();
- lldb::StreamFileSP &GetErrorStreamFileSP();
+ lldb::StreamFileSP GetErrorStreamFileSP();
Debugger &GetDebugger() { return m_debugger; }
@@ -203,6 +205,9 @@ public:
virtual void IOHandlerDeactivated(IOHandler &io_handler) {}
+ virtual llvm::Optional<std::string> IOHandlerSuggestion(IOHandler &io_handler,
+ llvm::StringRef line);
+
virtual void IOHandlerComplete(IOHandler &io_handler,
CompletionRequest &request);
@@ -420,6 +425,9 @@ private:
static int FixIndentationCallback(Editline *editline, const StringList &lines,
int cursor_position, void *baton);
+ static llvm::Optional<std::string> SuggestionCallback(llvm::StringRef line,
+ void *baton);
+
static void AutoCompleteCallback(CompletionRequest &request, void *baton);
#endif
diff --git a/contrib/llvm-project/lldb/include/lldb/Core/IOHandlerCursesGUI.h b/contrib/llvm-project/lldb/include/lldb/Core/IOHandlerCursesGUI.h
index fe62eaea643e..22ca735063ba 100644
--- a/contrib/llvm-project/lldb/include/lldb/Core/IOHandlerCursesGUI.h
+++ b/contrib/llvm-project/lldb/include/lldb/Core/IOHandlerCursesGUI.h
@@ -31,6 +31,8 @@ public:
void Deactivate() override;
+ void TerminalSizeChanged() override;
+
protected:
curses::ApplicationAP m_app_ap;
};
diff --git a/contrib/llvm-project/lldb/include/lldb/Core/Module.h b/contrib/llvm-project/lldb/include/lldb/Core/Module.h
index 8bd70ab16b5a..9eb7477730c1 100644
--- a/contrib/llvm-project/lldb/include/lldb/Core/Module.h
+++ b/contrib/llvm-project/lldb/include/lldb/Core/Module.h
@@ -506,10 +506,6 @@ public:
return m_object_mod_time;
}
- void SetObjectModificationTime(const llvm::sys::TimePoint<> &mod_time) {
- m_mod_time = mod_time;
- }
-
/// This callback will be called by SymbolFile implementations when
/// parsing a compile unit that contains SDK information.
/// \param sysroot will be added to the path remapping dictionary.
diff --git a/contrib/llvm-project/lldb/include/lldb/Core/ModuleList.h b/contrib/llvm-project/lldb/include/lldb/Core/ModuleList.h
index d90b27e474ac..46a718f08f04 100644
--- a/contrib/llvm-project/lldb/include/lldb/Core/ModuleList.h
+++ b/contrib/llvm-project/lldb/include/lldb/Core/ModuleList.h
@@ -56,7 +56,7 @@ public:
ModuleListProperties();
FileSpec GetClangModulesCachePath() const;
- bool SetClangModulesCachePath(llvm::StringRef path);
+ bool SetClangModulesCachePath(const FileSpec &path);
bool GetEnableExternalLookup() const;
bool SetEnableExternalLookup(bool new_value);
@@ -237,20 +237,6 @@ public:
/// \see ModuleList::GetSize()
Module *GetModulePointerAtIndex(size_t idx) const;
- /// Get the module pointer for the module at index \a idx without acquiring
- /// the ModuleList mutex. This MUST already have been acquired with
- /// ModuleList::GetMutex and locked for this call to be safe.
- ///
- /// \param[in] idx
- /// An index into this module collection.
- ///
- /// \return
- /// A pointer to a Module which can by nullptr if \a idx is out
- /// of range.
- ///
- /// \see ModuleList::GetSize()
- Module *GetModulePointerAtIndexUnlocked(size_t idx) const;
-
/// Find compile units by partial or full path.
///
/// Finds all compile units that match \a path in all of the modules and
@@ -491,11 +477,13 @@ public:
typedef LockingAdaptedIterable<collection, lldb::ModuleSP, vector_adapter,
std::recursive_mutex>
ModuleIterable;
- ModuleIterable Modules() { return ModuleIterable(m_modules, GetMutex()); }
+ ModuleIterable Modules() const {
+ return ModuleIterable(m_modules, GetMutex());
+ }
typedef AdaptedIterable<collection, lldb::ModuleSP, vector_adapter>
ModuleIterableNoLocking;
- ModuleIterableNoLocking ModulesNoLocking() {
+ ModuleIterableNoLocking ModulesNoLocking() const {
return ModuleIterableNoLocking(m_modules);
}
};
diff --git a/contrib/llvm-project/lldb/include/lldb/Core/PluginInterface.h b/contrib/llvm-project/lldb/include/lldb/Core/PluginInterface.h
index 17f6dc367155..5bdb2f45b665 100644
--- a/contrib/llvm-project/lldb/include/lldb/Core/PluginInterface.h
+++ b/contrib/llvm-project/lldb/include/lldb/Core/PluginInterface.h
@@ -15,11 +15,15 @@ namespace lldb_private {
class PluginInterface {
public:
- virtual ~PluginInterface() {}
+ PluginInterface() = default;
+ virtual ~PluginInterface() = default;
virtual ConstString GetPluginName() = 0;
virtual uint32_t GetPluginVersion() = 0;
+
+ PluginInterface(const PluginInterface &) = delete;
+ PluginInterface &operator=(const PluginInterface &) = delete;
};
} // namespace lldb_private
diff --git a/contrib/llvm-project/lldb/include/lldb/Core/PluginManager.h b/contrib/llvm-project/lldb/include/lldb/Core/PluginManager.h
index 5e0c9395dae0..0ac8308d1758 100644
--- a/contrib/llvm-project/lldb/include/lldb/Core/PluginManager.h
+++ b/contrib/llvm-project/lldb/include/lldb/Core/PluginManager.h
@@ -330,6 +330,42 @@ public:
static SymbolVendorCreateInstance
GetSymbolVendorCreateCallbackAtIndex(uint32_t idx);
+ // Trace
+ static bool RegisterPlugin(ConstString name, const char *description,
+ TraceCreateInstance create_callback,
+ llvm::StringRef schema,
+ TraceGetStartCommand get_start_command);
+
+ static bool UnregisterPlugin(TraceCreateInstance create_callback);
+
+ static TraceCreateInstance GetTraceCreateCallback(ConstString plugin_name);
+
+ static lldb::CommandObjectSP
+ GetTraceStartCommand(llvm::StringRef plugin_name,
+ CommandInterpreter &interpreter);
+
+ /// Get the JSON schema for a trace session file corresponding to the given
+ /// plugin.
+ ///
+ /// \param[in] plugin_name
+ /// The name of the plugin.
+ ///
+ /// \return
+ /// An empty \a StringRef if no plugin was found with that plugin name,
+ /// otherwise the actual schema is returned.
+ static llvm::StringRef GetTraceSchema(ConstString plugin_name);
+
+ /// Get the JSON schema for a trace session file corresponding to the plugin
+ /// given by its index.
+ ///
+ /// \param[in] index
+ /// The index of the plugin to get the schema of.
+ ///
+ /// \return
+ /// An empty \a StringRef if the index is greater than or equal to the
+ /// number plugins, otherwise the actual schema is returned.
+ static llvm::StringRef GetTraceSchema(size_t index);
+
// UnwindAssembly
static bool RegisterPlugin(ConstString name, const char *description,
UnwindAssemblyCreateInstance create_callback);
diff --git a/contrib/llvm-project/lldb/include/lldb/Core/StructuredDataImpl.h b/contrib/llvm-project/lldb/include/lldb/Core/StructuredDataImpl.h
index 9aea645a3ea6..929ce21fb2f9 100644
--- a/contrib/llvm-project/lldb/include/lldb/Core/StructuredDataImpl.h
+++ b/contrib/llvm-project/lldb/include/lldb/Core/StructuredDataImpl.h
@@ -68,14 +68,18 @@ public:
return error;
}
- // Grab the plugin.
- auto plugin_sp = lldb::StructuredDataPluginSP(m_plugin_wp);
+ // Grab the plugin
+ lldb::StructuredDataPluginSP plugin_sp = m_plugin_wp.lock();
+
+ // If there's no plugin, call underlying data's dump method:
if (!plugin_sp) {
- error.SetErrorString("Cannot pretty print structured data: "
- "plugin doesn't exist.");
+ if (!m_data_sp) {
+ error.SetErrorString("No data to describe.");
+ return error;
+ }
+ m_data_sp->Dump(stream, true);
return error;
}
-
// Get the data's description.
return plugin_sp->GetDescription(m_data_sp, stream);
}
diff --git a/contrib/llvm-project/lldb/include/lldb/Core/Value.h b/contrib/llvm-project/lldb/include/lldb/Core/Value.h
index 641a64a3bbbe..0ff773e59911 100644
--- a/contrib/llvm-project/lldb/include/lldb/Core/Value.h
+++ b/contrib/llvm-project/lldb/include/lldb/Core/Value.h
@@ -43,8 +43,6 @@ public:
// m_value contains...
// ============================
eValueTypeScalar, // raw scalar value
- eValueTypeVector, // byte array of m_vector.length with endianness of
- // m_vector.byte_order
eValueTypeFileAddress, // file address value
eValueTypeLoadAddress, // load address value
eValueTypeHostAddress // host address value (for memory in the process that
@@ -62,66 +60,8 @@ public:
eContextTypeVariable // lldb_private::Variable *
};
- const static size_t kMaxByteSize = 32u;
-
- struct Vector {
- // The byte array must be big enough to hold vector registers for any
- // supported target.
- uint8_t bytes[kMaxByteSize];
- size_t length;
- lldb::ByteOrder byte_order;
-
- Vector() : length(0), byte_order(lldb::eByteOrderInvalid) {}
-
- Vector(const Vector &vector) { *this = vector; }
- const Vector &operator=(const Vector &vector) {
- SetBytes(vector.bytes, vector.length, vector.byte_order);
- return *this;
- }
-
- void Clear() { length = 0; }
-
- bool SetBytes(const void *bytes, size_t length,
- lldb::ByteOrder byte_order) {
- this->length = length;
- this->byte_order = byte_order;
- if (length)
- ::memcpy(this->bytes, bytes,
- length < kMaxByteSize ? length : kMaxByteSize);
- return IsValid();
- }
-
- bool IsValid() const {
- return (length > 0 && length < kMaxByteSize &&
- byte_order != lldb::eByteOrderInvalid);
- }
- // Casts a vector, if valid, to an unsigned int of matching or largest
- // supported size. Truncates to the beginning of the vector if required.
- // Returns a default constructed Scalar if the Vector data is internally
- // inconsistent.
- llvm::APInt rhs = llvm::APInt(BITWIDTH_INT128, NUM_OF_WORDS_INT128,
- ((type128 *)bytes)->x);
- Scalar GetAsScalar() const {
- Scalar scalar;
- if (IsValid()) {
- if (length == 1)
- scalar = *(const uint8_t *)bytes;
- else if (length == 2)
- scalar = *(const uint16_t *)bytes;
- else if (length == 4)
- scalar = *(const uint32_t *)bytes;
- else if (length == 8)
- scalar = *(const uint64_t *)bytes;
- else if (length >= 16)
- scalar = rhs;
- }
- return scalar;
- }
- };
-
Value();
Value(const Scalar &scalar);
- Value(const Vector &vector);
Value(const void *bytes, int len);
Value(const Value &rhs);
@@ -153,8 +93,7 @@ public:
m_context = p;
if (m_context_type == eContextTypeRegisterInfo) {
RegisterInfo *reg_info = GetRegisterInfo();
- if (reg_info->encoding == lldb::eEncodingVector &&
- m_vector.byte_order != lldb::eByteOrderInvalid)
+ if (reg_info->encoding == lldb::eEncodingVector)
SetValueType(eValueTypeScalar);
}
}
@@ -167,30 +106,8 @@ public:
const Scalar &GetScalar() const { return m_value; }
- const Vector &GetVector() const { return m_vector; }
-
Scalar &GetScalar() { return m_value; }
- Vector &GetVector() { return m_vector; }
-
- bool SetVectorBytes(const Vector &vector) {
- m_vector = vector;
- return m_vector.IsValid();
- }
-
- bool SetVectorBytes(uint8_t *bytes, size_t length,
- lldb::ByteOrder byte_order) {
- return m_vector.SetBytes(bytes, length, byte_order);
- }
-
- bool SetScalarFromVector() {
- if (m_vector.IsValid()) {
- m_value = m_vector.GetAsScalar();
- return true;
- }
- return false;
- }
-
size_t ResizeData(size_t len);
size_t AppendDataToHostBuffer(const Value &rhs);
@@ -225,7 +142,6 @@ public:
protected:
Scalar m_value;
- Vector m_vector;
CompilerType m_compiler_type;
void *m_context;
ValueType m_value_type;
diff --git a/contrib/llvm-project/lldb/include/lldb/Core/ValueObject.h b/contrib/llvm-project/lldb/include/lldb/Core/ValueObject.h
index 0080368fd996..a665e7afa0ca 100644
--- a/contrib/llvm-project/lldb/include/lldb/Core/ValueObject.h
+++ b/contrib/llvm-project/lldb/include/lldb/Core/ValueObject.h
@@ -358,7 +358,7 @@ public:
virtual bool CanProvideValue();
// Subclasses must implement the functions below.
- virtual uint64_t GetByteSize() = 0;
+ virtual llvm::Optional<uint64_t> GetByteSize() = 0;
virtual lldb::ValueType GetValueType() const = 0;
@@ -702,12 +702,12 @@ public:
}
void SetSummaryFormat(lldb::TypeSummaryImplSP format) {
- m_type_summary_sp = format;
+ m_type_summary_sp = std::move(format);
ClearUserVisibleData(eClearUserVisibleDataItemsSummary);
}
void SetValueFormat(lldb::TypeFormatImplSP format) {
- m_type_format_sp = format;
+ m_type_format_sp = std::move(format);
ClearUserVisibleData(eClearUserVisibleDataItemsValue);
}
diff --git a/contrib/llvm-project/lldb/include/lldb/Core/ValueObjectCast.h b/contrib/llvm-project/lldb/include/lldb/Core/ValueObjectCast.h
index d91ca6a92be8..342803f8ca63 100644
--- a/contrib/llvm-project/lldb/include/lldb/Core/ValueObjectCast.h
+++ b/contrib/llvm-project/lldb/include/lldb/Core/ValueObjectCast.h
@@ -30,7 +30,7 @@ public:
ConstString name,
const CompilerType &cast_type);
- uint64_t GetByteSize() override;
+ llvm::Optional<uint64_t> GetByteSize() override;
size_t CalculateNumChildren(uint32_t max) override;
diff --git a/contrib/llvm-project/lldb/include/lldb/Core/ValueObjectChild.h b/contrib/llvm-project/lldb/include/lldb/Core/ValueObjectChild.h
index c6f44a29b059..9a9fd9294261 100644
--- a/contrib/llvm-project/lldb/include/lldb/Core/ValueObjectChild.h
+++ b/contrib/llvm-project/lldb/include/lldb/Core/ValueObjectChild.h
@@ -30,7 +30,7 @@ class ValueObjectChild : public ValueObject {
public:
~ValueObjectChild() override;
- uint64_t GetByteSize() override { return m_byte_size; }
+ llvm::Optional<uint64_t> GetByteSize() override { return m_byte_size; }
lldb::offset_t GetByteOffset() override { return m_byte_offset; }
diff --git a/contrib/llvm-project/lldb/include/lldb/Core/ValueObjectConstResult.h b/contrib/llvm-project/lldb/include/lldb/Core/ValueObjectConstResult.h
index 0e868c687e93..8d823baa0b7b 100644
--- a/contrib/llvm-project/lldb/include/lldb/Core/ValueObjectConstResult.h
+++ b/contrib/llvm-project/lldb/include/lldb/Core/ValueObjectConstResult.h
@@ -62,7 +62,7 @@ public:
static lldb::ValueObjectSP Create(ExecutionContextScope *exe_scope,
const Status &error);
- uint64_t GetByteSize() override;
+ llvm::Optional<uint64_t> GetByteSize() override;
lldb::ValueType GetValueType() const override;
@@ -113,7 +113,7 @@ protected:
CompilerType GetCompilerTypeImpl() override;
ConstString m_type_name;
- uint64_t m_byte_size;
+ llvm::Optional<uint64_t> m_byte_size;
ValueObjectConstResultImpl m_impl;
diff --git a/contrib/llvm-project/lldb/include/lldb/Core/ValueObjectDynamicValue.h b/contrib/llvm-project/lldb/include/lldb/Core/ValueObjectDynamicValue.h
index 9f5304b55e93..2806857339ef 100644
--- a/contrib/llvm-project/lldb/include/lldb/Core/ValueObjectDynamicValue.h
+++ b/contrib/llvm-project/lldb/include/lldb/Core/ValueObjectDynamicValue.h
@@ -34,7 +34,7 @@ class ValueObjectDynamicValue : public ValueObject {
public:
~ValueObjectDynamicValue() override;
- uint64_t GetByteSize() override;
+ llvm::Optional<uint64_t> GetByteSize() override;
ConstString GetTypeName() override;
diff --git a/contrib/llvm-project/lldb/include/lldb/Core/ValueObjectMemory.h b/contrib/llvm-project/lldb/include/lldb/Core/ValueObjectMemory.h
index d1cd6ae41445..b5d5e6ecf4c0 100644
--- a/contrib/llvm-project/lldb/include/lldb/Core/ValueObjectMemory.h
+++ b/contrib/llvm-project/lldb/include/lldb/Core/ValueObjectMemory.h
@@ -40,7 +40,7 @@ public:
const Address &address,
const CompilerType &ast_type);
- uint64_t GetByteSize() override;
+ llvm::Optional<uint64_t> GetByteSize() override;
ConstString GetTypeName() override;
diff --git a/contrib/llvm-project/lldb/include/lldb/Core/ValueObjectRegister.h b/contrib/llvm-project/lldb/include/lldb/Core/ValueObjectRegister.h
index 41051d93b707..3968584ad518 100644
--- a/contrib/llvm-project/lldb/include/lldb/Core/ValueObjectRegister.h
+++ b/contrib/llvm-project/lldb/include/lldb/Core/ValueObjectRegister.h
@@ -36,7 +36,7 @@ public:
lldb::RegisterContextSP &reg_ctx_sp,
uint32_t set_idx);
- uint64_t GetByteSize() override;
+ llvm::Optional<uint64_t> GetByteSize() override;
lldb::ValueType GetValueType() const override {
return lldb::eValueTypeRegisterSet;
@@ -86,7 +86,7 @@ public:
lldb::RegisterContextSP &reg_ctx_sp,
uint32_t reg_num);
- uint64_t GetByteSize() override;
+ llvm::Optional<uint64_t> GetByteSize() override;
lldb::ValueType GetValueType() const override {
return lldb::eValueTypeRegister;
diff --git a/contrib/llvm-project/lldb/include/lldb/Core/ValueObjectSyntheticFilter.h b/contrib/llvm-project/lldb/include/lldb/Core/ValueObjectSyntheticFilter.h
index cb471657aec9..41c461ce13f0 100644
--- a/contrib/llvm-project/lldb/include/lldb/Core/ValueObjectSyntheticFilter.h
+++ b/contrib/llvm-project/lldb/include/lldb/Core/ValueObjectSyntheticFilter.h
@@ -36,7 +36,7 @@ class ValueObjectSynthetic : public ValueObject {
public:
~ValueObjectSynthetic() override;
- uint64_t GetByteSize() override;
+ llvm::Optional<uint64_t> GetByteSize() override;
ConstString GetTypeName() override;
diff --git a/contrib/llvm-project/lldb/include/lldb/Core/ValueObjectVariable.h b/contrib/llvm-project/lldb/include/lldb/Core/ValueObjectVariable.h
index b7e262574a14..23fdedbf5a4a 100644
--- a/contrib/llvm-project/lldb/include/lldb/Core/ValueObjectVariable.h
+++ b/contrib/llvm-project/lldb/include/lldb/Core/ValueObjectVariable.h
@@ -37,7 +37,7 @@ public:
static lldb::ValueObjectSP Create(ExecutionContextScope *exe_scope,
const lldb::VariableSP &var_sp);
- uint64_t GetByteSize() override;
+ llvm::Optional<uint64_t> GetByteSize() override;
ConstString GetTypeName() override;