aboutsummaryrefslogtreecommitdiff
path: root/include/lldb
diff options
context:
space:
mode:
Diffstat (limited to 'include/lldb')
-rw-r--r--include/lldb/API/SBError.h12
-rw-r--r--include/lldb/API/SBPlatform.h3
-rw-r--r--include/lldb/API/SBTarget.h2
-rw-r--r--include/lldb/Breakpoint/Breakpoint.h6
-rw-r--r--include/lldb/Breakpoint/BreakpointID.h2
-rw-r--r--include/lldb/Breakpoint/BreakpointLocation.h2
-rw-r--r--include/lldb/Breakpoint/BreakpointOptions.h4
-rw-r--r--include/lldb/Breakpoint/BreakpointResolver.h4
-rw-r--r--include/lldb/Breakpoint/BreakpointResolverAddress.h2
-rw-r--r--include/lldb/Breakpoint/BreakpointResolverFileLine.h2
-rw-r--r--include/lldb/Breakpoint/BreakpointResolverFileRegex.h2
-rw-r--r--include/lldb/Breakpoint/BreakpointResolverName.h2
-rw-r--r--include/lldb/Breakpoint/Watchpoint.h6
-rw-r--r--include/lldb/Core/Communication.h24
-rw-r--r--include/lldb/Core/Connection.h14
-rw-r--r--include/lldb/Core/Debugger.h12
-rw-r--r--include/lldb/Core/FormatEntity.h16
-rw-r--r--include/lldb/Core/MappedHash.h4
-rw-r--r--include/lldb/Core/Module.h8
-rw-r--r--include/lldb/Core/ModuleList.h16
-rw-r--r--include/lldb/Core/PluginManager.h6
-rw-r--r--include/lldb/Core/RegisterValue.h18
-rw-r--r--include/lldb/Core/Scalar.h12
-rw-r--r--include/lldb/Core/SearchFilter.h14
-rw-r--r--include/lldb/Core/StructuredData.h40
-rw-r--r--include/lldb/Core/StructuredDataImpl.h12
-rw-r--r--include/lldb/Core/Timer.h17
-rw-r--r--include/lldb/Core/UserSettingsController.h17
-rw-r--r--include/lldb/Core/Value.h10
-rw-r--r--include/lldb/Core/ValueObject.h23
-rw-r--r--include/lldb/Core/ValueObjectConstResult.h10
-rw-r--r--include/lldb/Core/ValueObjectConstResultCast.h6
-rw-r--r--include/lldb/Core/ValueObjectConstResultChild.h6
-rw-r--r--include/lldb/Core/ValueObjectConstResultImpl.h6
-rw-r--r--include/lldb/Core/ValueObjectDynamicValue.h6
-rw-r--r--include/lldb/Core/ValueObjectRegister.h6
-rw-r--r--include/lldb/Core/ValueObjectSyntheticFilter.h4
-rw-r--r--include/lldb/Core/ValueObjectVariable.h6
-rw-r--r--include/lldb/DataFormatters/TypeSummary.h4
-rw-r--r--include/lldb/Expression/DWARFExpression.h8
-rw-r--r--include/lldb/Expression/ExpressionParser.h4
-rw-r--r--include/lldb/Expression/IRExecutionUnit.h10
-rw-r--r--include/lldb/Expression/IRInterpreter.h6
-rw-r--r--include/lldb/Expression/IRMemoryMap.h20
-rw-r--r--include/lldb/Expression/LLVMUserExpression.h2
-rw-r--r--include/lldb/Expression/Materializer.h20
-rw-r--r--include/lldb/Expression/REPL.h6
-rw-r--r--include/lldb/Expression/UserExpression.h8
-rw-r--r--include/lldb/Expression/UtilityFunction.h2
-rw-r--r--include/lldb/Host/File.h42
-rw-r--r--include/lldb/Host/FileCache.h10
-rw-r--r--include/lldb/Host/FileSystem.h8
-rw-r--r--include/lldb/Host/Host.h16
-rw-r--r--include/lldb/Host/HostNativeProcessBase.h6
-rw-r--r--include/lldb/Host/HostNativeThreadBase.h6
-rw-r--r--include/lldb/Host/HostProcess.h4
-rw-r--r--include/lldb/Host/HostThread.h6
-rw-r--r--include/lldb/Host/IOObject.h6
-rw-r--r--include/lldb/Host/LockFileBase.h26
-rw-r--r--include/lldb/Host/MainLoop.h6
-rw-r--r--include/lldb/Host/MainLoopBase.h6
-rw-r--r--include/lldb/Host/MonitoringProcessLauncher.h2
-rw-r--r--include/lldb/Host/PipeBase.h33
-rw-r--r--include/lldb/Host/ProcessLauncher.h4
-rw-r--r--include/lldb/Host/Socket.h55
-rw-r--r--include/lldb/Host/ThreadLauncher.h4
-rw-r--r--include/lldb/Host/common/NativeBreakpoint.h8
-rw-r--r--include/lldb/Host/common/NativeBreakpointList.h21
-rw-r--r--include/lldb/Host/common/NativeProcessProtocol.h82
-rw-r--r--include/lldb/Host/common/NativeRegisterContext.h42
-rw-r--r--include/lldb/Host/common/NativeThreadProtocol.h18
-rw-r--r--include/lldb/Host/common/NativeWatchpointList.h8
-rw-r--r--include/lldb/Host/common/SoftwareBreakpoint.h20
-rw-r--r--include/lldb/Host/common/TCPSocket.h8
-rw-r--r--include/lldb/Host/common/UDPSocket.h10
-rw-r--r--include/lldb/Host/posix/ConnectionFileDescriptorPosix.h24
-rw-r--r--include/lldb/Host/posix/DomainSocket.h6
-rw-r--r--include/lldb/Host/posix/HostProcessPosix.h10
-rw-r--r--include/lldb/Host/posix/HostThreadPosix.h6
-rw-r--r--include/lldb/Host/posix/LockFilePosix.h10
-rw-r--r--include/lldb/Host/posix/PipePosix.h24
-rw-r--r--include/lldb/Host/posix/ProcessLauncherPosix.h2
-rw-r--r--include/lldb/Host/posix/ProcessLauncherPosixFork.h2
-rw-r--r--include/lldb/Host/windows/ConnectionGenericFileWindows.h10
-rw-r--r--include/lldb/Host/windows/HostProcessWindows.h4
-rw-r--r--include/lldb/Host/windows/HostThreadWindows.h4
-rw-r--r--include/lldb/Host/windows/LockFileWindows.h10
-rw-r--r--include/lldb/Host/windows/PipeWindows.h28
-rw-r--r--include/lldb/Host/windows/ProcessLauncherWindows.h2
-rw-r--r--include/lldb/Interpreter/Args.h18
-rw-r--r--include/lldb/Interpreter/CommandInterpreter.h2
-rw-r--r--include/lldb/Interpreter/CommandReturnObject.h2
-rw-r--r--include/lldb/Interpreter/OptionGroupArchitecture.h4
-rw-r--r--include/lldb/Interpreter/OptionGroupBoolean.h6
-rw-r--r--include/lldb/Interpreter/OptionGroupFile.h12
-rw-r--r--include/lldb/Interpreter/OptionGroupFormat.h6
-rw-r--r--include/lldb/Interpreter/OptionGroupOutputFile.h6
-rw-r--r--include/lldb/Interpreter/OptionGroupPlatform.h8
-rw-r--r--include/lldb/Interpreter/OptionGroupString.h6
-rw-r--r--include/lldb/Interpreter/OptionGroupUInt64.h6
-rw-r--r--include/lldb/Interpreter/OptionGroupUUID.h6
-rw-r--r--include/lldb/Interpreter/OptionGroupValueObjectDisplay.h6
-rw-r--r--include/lldb/Interpreter/OptionGroupVariable.h6
-rw-r--r--include/lldb/Interpreter/OptionGroupWatchpoint.h6
-rw-r--r--include/lldb/Interpreter/OptionValue.h17
-rw-r--r--include/lldb/Interpreter/OptionValueArch.h4
-rw-r--r--include/lldb/Interpreter/OptionValueArray.h8
-rw-r--r--include/lldb/Interpreter/OptionValueBoolean.h4
-rw-r--r--include/lldb/Interpreter/OptionValueChar.h4
-rw-r--r--include/lldb/Interpreter/OptionValueDictionary.h10
-rw-r--r--include/lldb/Interpreter/OptionValueEnumeration.h6
-rw-r--r--include/lldb/Interpreter/OptionValueFileSpec.h4
-rw-r--r--include/lldb/Interpreter/OptionValueFileSpecList.h4
-rw-r--r--include/lldb/Interpreter/OptionValueFormat.h4
-rw-r--r--include/lldb/Interpreter/OptionValueFormatEntity.h4
-rw-r--r--include/lldb/Interpreter/OptionValueLanguage.h4
-rw-r--r--include/lldb/Interpreter/OptionValuePathMappings.h4
-rw-r--r--include/lldb/Interpreter/OptionValueProperties.h17
-rw-r--r--include/lldb/Interpreter/OptionValueRegex.h4
-rw-r--r--include/lldb/Interpreter/OptionValueSInt64.h4
-rw-r--r--include/lldb/Interpreter/OptionValueString.h12
-rw-r--r--include/lldb/Interpreter/OptionValueUInt64.h8
-rw-r--r--include/lldb/Interpreter/OptionValueUUID.h4
-rw-r--r--include/lldb/Interpreter/Options.h32
-rw-r--r--include/lldb/Interpreter/ScriptInterpreter.h54
-rw-r--r--include/lldb/Symbol/ClangASTContext.h13
-rw-r--r--include/lldb/Symbol/ObjectFile.h2
-rw-r--r--include/lldb/Symbol/SymbolContext.h2
-rw-r--r--include/lldb/Symbol/Variable.h2
-rw-r--r--include/lldb/Target/ABI.h6
-rw-r--r--include/lldb/Target/DynamicLoader.h4
-rw-r--r--include/lldb/Target/Language.h2
-rw-r--r--include/lldb/Target/LanguageRuntime.h2
-rw-r--r--include/lldb/Target/Memory.h6
-rw-r--r--include/lldb/Target/ModuleCache.h28
-rw-r--r--include/lldb/Target/ObjCLanguageRuntime.h2
-rw-r--r--include/lldb/Target/PathMappingList.h2
-rw-r--r--include/lldb/Target/Platform.h130
-rw-r--r--include/lldb/Target/Process.h215
-rw-r--r--include/lldb/Target/ProcessLaunchInfo.h2
-rw-r--r--include/lldb/Target/ProcessStructReader.h4
-rw-r--r--include/lldb/Target/RegisterContext.h4
-rw-r--r--include/lldb/Target/StackFrame.h10
-rw-r--r--include/lldb/Target/StructuredDataPlugin.h4
-rw-r--r--include/lldb/Target/Target.h57
-rw-r--r--include/lldb/Target/TargetList.h38
-rw-r--r--include/lldb/Target/Thread.h24
-rw-r--r--include/lldb/Target/ThreadSpec.h6
-rw-r--r--include/lldb/Utility/JSON.h2
-rw-r--r--include/lldb/Utility/RegularExpression.h2
-rw-r--r--include/lldb/Utility/SelectHelper.h4
-rw-r--r--include/lldb/Utility/Status.h (renamed from include/lldb/Utility/Error.h)37
-rw-r--r--include/lldb/Utility/UUID.h1
-rw-r--r--include/lldb/lldb-forward.h2
-rw-r--r--include/lldb/lldb-private-enumerations.h7
-rw-r--r--include/lldb/lldb-private-interfaces.h8
-rw-r--r--include/lldb/lldb-private-types.h2
157 files changed, 1008 insertions, 985 deletions
diff --git a/include/lldb/API/SBError.h b/include/lldb/API/SBError.h
index a3b1f87053ad..a099a9be271a 100644
--- a/include/lldb/API/SBError.h
+++ b/include/lldb/API/SBError.h
@@ -68,18 +68,18 @@ protected:
friend class SBBreakpoint;
friend class SBBreakpointLocation;
- lldb_private::Error *get();
+ lldb_private::Status *get();
- lldb_private::Error *operator->();
+ lldb_private::Status *operator->();
- const lldb_private::Error &operator*() const;
+ const lldb_private::Status &operator*() const;
- lldb_private::Error &ref();
+ lldb_private::Status &ref();
- void SetError(const lldb_private::Error &lldb_error);
+ void SetError(const lldb_private::Status &lldb_error);
private:
- std::unique_ptr<lldb_private::Error> m_opaque_ap;
+ std::unique_ptr<lldb_private::Status> m_opaque_ap;
void CreateIfNeeded();
};
diff --git a/include/lldb/API/SBPlatform.h b/include/lldb/API/SBPlatform.h
index 3f7e1acb74b5..952e31066319 100644
--- a/include/lldb/API/SBPlatform.h
+++ b/include/lldb/API/SBPlatform.h
@@ -156,7 +156,8 @@ protected:
void SetSP(const lldb::PlatformSP &platform_sp);
SBError ExecuteConnected(
- const std::function<lldb_private::Error(const lldb::PlatformSP &)> &func);
+ const std::function<lldb_private::Status(const lldb::PlatformSP &)>
+ &func);
lldb::PlatformSP m_opaque_sp;
};
diff --git a/include/lldb/API/SBTarget.h b/include/lldb/API/SBTarget.h
index 21341fbc27fa..62398fcd4b94 100644
--- a/include/lldb/API/SBTarget.h
+++ b/include/lldb/API/SBTarget.h
@@ -544,7 +544,7 @@ public:
/// into this call
///
/// @param[out] error
- /// Error information is written here if the memory read fails.
+ /// Status information is written here if the memory read fails.
///
/// @return
/// The amount of data read in host bytes.
diff --git a/include/lldb/Breakpoint/Breakpoint.h b/include/lldb/Breakpoint/Breakpoint.h
index 4a16df047ee3..408647c3b5da 100644
--- a/include/lldb/Breakpoint/Breakpoint.h
+++ b/include/lldb/Breakpoint/Breakpoint.h
@@ -169,7 +169,7 @@ public:
virtual bool EvaluatePrecondition(StoppointCallbackContext &context);
- virtual Error ConfigurePrecondition(Args &options);
+ virtual Status ConfigurePrecondition(Args &options);
virtual void GetDescription(Stream &stream, lldb::DescriptionLevel level);
};
@@ -178,7 +178,7 @@ public:
// Saving & restoring breakpoints:
static lldb::BreakpointSP CreateFromStructuredData(
- Target &target, StructuredData::ObjectSP &data_object_sp, Error &error);
+ Target &target, StructuredData::ObjectSP &data_object_sp, Status &error);
static bool
SerializedBreakpointMatchesNames(StructuredData::ObjectSP &bkpt_object_sp,
@@ -613,7 +613,7 @@ public:
lldb::SearchFilterSP GetSearchFilter() { return m_filter_sp; }
- bool AddName(const char *new_name, Error &error);
+ bool AddName(llvm::StringRef new_name, Status &error);
void RemoveName(const char *name_to_remove) {
if (name_to_remove)
diff --git a/include/lldb/Breakpoint/BreakpointID.h b/include/lldb/Breakpoint/BreakpointID.h
index aa4add4cd665..57411b316317 100644
--- a/include/lldb/Breakpoint/BreakpointID.h
+++ b/include/lldb/Breakpoint/BreakpointID.h
@@ -84,7 +84,7 @@ public:
/// \b true if the name is a breakpoint name (as opposed to an ID or
/// range) false otherwise.
//------------------------------------------------------------------
- static bool StringIsBreakpointName(llvm::StringRef str, Error &error);
+ static bool StringIsBreakpointName(llvm::StringRef str, Status &error);
//------------------------------------------------------------------
/// Takes a breakpoint ID and the breakpoint location id and returns
diff --git a/include/lldb/Breakpoint/BreakpointLocation.h b/include/lldb/Breakpoint/BreakpointLocation.h
index d0567ccf2e04..a1086aa3fe5f 100644
--- a/include/lldb/Breakpoint/BreakpointLocation.h
+++ b/include/lldb/Breakpoint/BreakpointLocation.h
@@ -161,7 +161,7 @@ public:
//------------------------------------------------------------------
const char *GetConditionText(size_t *hash = nullptr) const;
- bool ConditionSaysStop(ExecutionContext &exe_ctx, Error &error);
+ bool ConditionSaysStop(ExecutionContext &exe_ctx, Status &error);
//------------------------------------------------------------------
/// Set the valid thread to be checked when the breakpoint is hit.
diff --git a/include/lldb/Breakpoint/BreakpointOptions.h b/include/lldb/Breakpoint/BreakpointOptions.h
index 024e915908c0..4ed8469eba3d 100644
--- a/include/lldb/Breakpoint/BreakpointOptions.h
+++ b/include/lldb/Breakpoint/BreakpointOptions.h
@@ -50,7 +50,7 @@ public:
static std::unique_ptr<CommandData>
CreateFromStructuredData(const StructuredData::Dictionary &options_dict,
- Error &error);
+ Status &error);
StringList user_source;
std::string script_source;
@@ -119,7 +119,7 @@ public:
static std::unique_ptr<BreakpointOptions>
CreateFromStructuredData(Target &target,
const StructuredData::Dictionary &data_dict,
- Error &error);
+ Status &error);
virtual StructuredData::ObjectSP SerializeToStructuredData();
diff --git a/include/lldb/Breakpoint/BreakpointResolver.h b/include/lldb/Breakpoint/BreakpointResolver.h
index 7a57250d632b..7bcd889ce78b 100644
--- a/include/lldb/Breakpoint/BreakpointResolver.h
+++ b/include/lldb/Breakpoint/BreakpointResolver.h
@@ -140,7 +140,7 @@ public:
static lldb::BreakpointResolverSP
CreateFromStructuredData(const StructuredData::Dictionary &resolver_dict,
- Error &error);
+ Status &error);
virtual StructuredData::ObjectSP SerializeToStructuredData() {
return StructuredData::ObjectSP();
@@ -192,7 +192,7 @@ public:
static const char *ResolverTyToName(enum ResolverTy);
- static ResolverTy NameToResolverTy(const char *name);
+ static ResolverTy NameToResolverTy(llvm::StringRef name);
virtual lldb::BreakpointResolverSP
CopyForBreakpoint(Breakpoint &breakpoint) = 0;
diff --git a/include/lldb/Breakpoint/BreakpointResolverAddress.h b/include/lldb/Breakpoint/BreakpointResolverAddress.h
index 6d2d505811f9..9d757c8853b9 100644
--- a/include/lldb/Breakpoint/BreakpointResolverAddress.h
+++ b/include/lldb/Breakpoint/BreakpointResolverAddress.h
@@ -39,7 +39,7 @@ public:
static BreakpointResolver *
CreateFromStructuredData(Breakpoint *bkpt,
const StructuredData::Dictionary &options_dict,
- Error &error);
+ Status &error);
StructuredData::ObjectSP SerializeToStructuredData() override;
diff --git a/include/lldb/Breakpoint/BreakpointResolverFileLine.h b/include/lldb/Breakpoint/BreakpointResolverFileLine.h
index 50750b1fbdf5..f7bba3d4ccb4 100644
--- a/include/lldb/Breakpoint/BreakpointResolverFileLine.h
+++ b/include/lldb/Breakpoint/BreakpointResolverFileLine.h
@@ -36,7 +36,7 @@ public:
static BreakpointResolver *
CreateFromStructuredData(Breakpoint *bkpt,
const StructuredData::Dictionary &data_dict,
- Error &error);
+ Status &error);
StructuredData::ObjectSP SerializeToStructuredData() override;
diff --git a/include/lldb/Breakpoint/BreakpointResolverFileRegex.h b/include/lldb/Breakpoint/BreakpointResolverFileRegex.h
index 6f00dac3f0a7..d620e99ffc60 100644
--- a/include/lldb/Breakpoint/BreakpointResolverFileRegex.h
+++ b/include/lldb/Breakpoint/BreakpointResolverFileRegex.h
@@ -38,7 +38,7 @@ public:
static BreakpointResolver *
CreateFromStructuredData(Breakpoint *bkpt,
const StructuredData::Dictionary &options_dict,
- Error &error);
+ Status &error);
StructuredData::ObjectSP SerializeToStructuredData() override;
diff --git a/include/lldb/Breakpoint/BreakpointResolverName.h b/include/lldb/Breakpoint/BreakpointResolverName.h
index 4223125d9268..c7716d5146ef 100644
--- a/include/lldb/Breakpoint/BreakpointResolverName.h
+++ b/include/lldb/Breakpoint/BreakpointResolverName.h
@@ -57,7 +57,7 @@ public:
static BreakpointResolver *
CreateFromStructuredData(Breakpoint *bkpt,
const StructuredData::Dictionary &data_dict,
- Error &error);
+ Status &error);
StructuredData::ObjectSP SerializeToStructuredData() override;
diff --git a/include/lldb/Breakpoint/Watchpoint.h b/include/lldb/Breakpoint/Watchpoint.h
index beb7bad1ee9d..69067a567621 100644
--- a/include/lldb/Breakpoint/Watchpoint.h
+++ b/include/lldb/Breakpoint/Watchpoint.h
@@ -100,7 +100,7 @@ public:
void DumpSnapshots(Stream *s, const char *prefix = nullptr) const;
void DumpWithLevel(Stream *s, lldb::DescriptionLevel description_level) const;
Target &GetTarget() { return m_target; }
- const Error &GetError() { return m_error; }
+ const Status &GetError() { return m_error; }
//------------------------------------------------------------------
/// Returns the WatchpointOptions structure set for this watchpoint.
@@ -213,8 +213,8 @@ private:
lldb::ValueObjectSP m_old_value_sp;
lldb::ValueObjectSP m_new_value_sp;
CompilerType m_type;
- Error m_error; // An error object describing errors associated with this
- // watchpoint.
+ Status m_error; // An error object describing errors associated with this
+ // watchpoint.
WatchpointOptions
m_options; // Settable watchpoint options, which is a delegate to handle
// the callback machinery.
diff --git a/include/lldb/Core/Communication.h b/include/lldb/Core/Communication.h
index 9459573ca90e..57fa483bd3a3 100644
--- a/include/lldb/Core/Communication.h
+++ b/include/lldb/Core/Communication.h
@@ -33,7 +33,7 @@ namespace lldb_private {
class ConstString;
}
namespace lldb_private {
-class Error;
+class Status;
}
namespace lldb_private {
@@ -71,7 +71,7 @@ namespace lldb_private {
/// reads data and caches any received bytes. To start the read thread
/// clients call:
///
-/// bool Communication::StartReadThread (Error *);
+/// bool Communication::StartReadThread (Status *);
///
/// If true is returned a read thread has been spawned that will
/// continually execute a call to the pure virtual DoRead function:
@@ -154,10 +154,10 @@ public:
/// internal error object should be filled in with an
/// appropriate value based on the result of this function.
///
- /// @see Error& Communication::GetError ();
+ /// @see Status& Communication::GetError ();
/// @see bool Connection::Connect (const char *url);
//------------------------------------------------------------------
- lldb::ConnectionStatus Connect(const char *url, Error *error_ptr);
+ lldb::ConnectionStatus Connect(const char *url, Status *error_ptr);
//------------------------------------------------------------------
/// Disconnect the communications connection if one is currently
@@ -168,10 +168,10 @@ public:
/// internal error object should be filled in with an
/// appropriate value based on the result of this function.
///
- /// @see Error& Communication::GetError ();
+ /// @see Status& Communication::GetError ();
/// @see bool Connection::Disconnect ();
//------------------------------------------------------------------
- lldb::ConnectionStatus Disconnect(Error *error_ptr = nullptr);
+ lldb::ConnectionStatus Disconnect(Status *error_ptr = nullptr);
//------------------------------------------------------------------
/// Check if the connection is valid.
@@ -217,7 +217,7 @@ public:
/// @see size_t Connection::Read (void *, size_t);
//------------------------------------------------------------------
size_t Read(void *dst, size_t dst_len, const Timeout<std::micro> &timeout,
- lldb::ConnectionStatus &status, Error *error_ptr);
+ lldb::ConnectionStatus &status, Status *error_ptr);
//------------------------------------------------------------------
/// The actual write function that attempts to write to the
@@ -237,7 +237,7 @@ public:
/// The number of bytes actually Written.
//------------------------------------------------------------------
size_t Write(const void *src, size_t src_len, lldb::ConnectionStatus &status,
- Error *error_ptr);
+ Status *error_ptr);
//------------------------------------------------------------------
/// Sets the connection that it to be used by this class.
@@ -280,7 +280,7 @@ public:
/// @see void Communication::AppendBytesToCache (const uint8_t * bytes, size_t
/// len, bool broadcast);
//------------------------------------------------------------------
- virtual bool StartReadThread(Error *error_ptr = nullptr);
+ virtual bool StartReadThread(Status *error_ptr = nullptr);
//------------------------------------------------------------------
/// Stops the read thread by cancelling it.
@@ -289,9 +289,9 @@ public:
/// \b True if the read thread was successfully canceled, \b
/// false otherwise.
//------------------------------------------------------------------
- virtual bool StopReadThread(Error *error_ptr = nullptr);
+ virtual bool StopReadThread(Status *error_ptr = nullptr);
- virtual bool JoinReadThread(Error *error_ptr = nullptr);
+ virtual bool JoinReadThread(Status *error_ptr = nullptr);
//------------------------------------------------------------------
/// Checks if there is a currently running read thread.
///
@@ -361,7 +361,7 @@ protected:
size_t ReadFromConnection(void *dst, size_t dst_len,
const Timeout<std::micro> &timeout,
- lldb::ConnectionStatus &status, Error *error_ptr);
+ lldb::ConnectionStatus &status, Status *error_ptr);
//------------------------------------------------------------------
/// Append new bytes that get read from the read thread into the
diff --git a/include/lldb/Core/Connection.h b/include/lldb/Core/Connection.h
index 8d84377e3757..27757b2f77e7 100644
--- a/include/lldb/Core/Connection.h
+++ b/include/lldb/Core/Connection.h
@@ -22,7 +22,7 @@
#include <stddef.h> // for size_t
namespace lldb_private {
-class Error;
+class Status;
}
namespace lldb_private {
template <typename Ratio> class Timeout;
@@ -75,10 +75,10 @@ public:
/// internal error object should be filled in with an
/// appropriate value based on the result of this function.
///
- /// @see Error& Communication::GetError ();
+ /// @see Status& Communication::GetError ();
//------------------------------------------------------------------
virtual lldb::ConnectionStatus Connect(llvm::StringRef url,
- Error *error_ptr) = 0;
+ Status *error_ptr) = 0;
//------------------------------------------------------------------
/// Disconnect the communications connection if one is currently
@@ -94,9 +94,9 @@ public:
/// internal error object should be filled in with an
/// appropriate value based on the result of this function.
///
- /// @see Error& Communication::GetError ();
+ /// @see Status& Communication::GetError ();
//------------------------------------------------------------------
- virtual lldb::ConnectionStatus Disconnect(Error *error_ptr) = 0;
+ virtual lldb::ConnectionStatus Disconnect(Status *error_ptr) = 0;
//------------------------------------------------------------------
/// Check if the connection is valid.
@@ -137,7 +137,7 @@ public:
//------------------------------------------------------------------
virtual size_t Read(void *dst, size_t dst_len,
const Timeout<std::micro> &timeout,
- lldb::ConnectionStatus &status, Error *error_ptr) = 0;
+ lldb::ConnectionStatus &status, Status *error_ptr) = 0;
//------------------------------------------------------------------
/// The actual write function that attempts to write to the
@@ -162,7 +162,7 @@ public:
/// The number of bytes actually Written.
//------------------------------------------------------------------
virtual size_t Write(const void *dst, size_t dst_len,
- lldb::ConnectionStatus &status, Error *error_ptr) = 0;
+ lldb::ConnectionStatus &status, Status *error_ptr) = 0;
//------------------------------------------------------------------
/// Returns a URI that describes this connection object
diff --git a/include/lldb/Core/Debugger.h b/include/lldb/Core/Debugger.h
index 56201273fdd2..cedf9ecdb120 100644
--- a/include/lldb/Core/Debugger.h
+++ b/include/lldb/Core/Debugger.h
@@ -30,8 +30,8 @@
#include "lldb/Target/Platform.h"
#include "lldb/Target/TargetList.h"
#include "lldb/Utility/ConstString.h" // for ConstString
-#include "lldb/Utility/Error.h" // for Error
#include "lldb/Utility/FileSpec.h" // for FileSpec
+#include "lldb/Utility/Status.h" // for Status
#include "lldb/Utility/UserID.h"
#include "lldb/lldb-defines.h" // for DISALLOW_COPY_AND_ASSIGN
#include "lldb/lldb-enumerations.h" // for ScriptLanguage, Langua...
@@ -239,9 +239,9 @@ public:
eStopDisassemblyTypeAlways
};
- Error SetPropertyValue(const ExecutionContext *exe_ctx,
- VarSetOperationType op, llvm::StringRef property_path,
- llvm::StringRef value) override;
+ Status SetPropertyValue(const ExecutionContext *exe_ctx,
+ VarSetOperationType op, llvm::StringRef property_path,
+ llvm::StringRef value) override;
bool GetAutoConfirm() const;
@@ -306,7 +306,7 @@ public:
const ConstString &GetInstanceName() { return m_instance_name; }
- bool LoadPlugin(const FileSpec &spec, Error &error);
+ bool LoadPlugin(const FileSpec &spec, Status &error);
void ExecuteIOHandlers();
@@ -318,7 +318,7 @@ public:
bool IsHandlingEvents() const { return m_event_handler_thread.IsJoinable(); }
- Error RunREPL(lldb::LanguageType language, const char *repl_options);
+ Status RunREPL(lldb::LanguageType language, const char *repl_options);
// This is for use in the command interpreter, when you either want the
// selected target, or if no target
diff --git a/include/lldb/Core/FormatEntity.h b/include/lldb/Core/FormatEntity.h
index 6705c155cefc..aa5ccb48e56a 100644
--- a/include/lldb/Core/FormatEntity.h
+++ b/include/lldb/Core/FormatEntity.h
@@ -10,8 +10,8 @@
#ifndef liblldb_FormatEntity_h_
#define liblldb_FormatEntity_h_
-#include "lldb/Utility/Error.h"
-#include "lldb/Utility/FileSpec.h" // for FileSpec
+#include "lldb/Utility/FileSpec.h" // for FileSpec
+#include "lldb/Utility/Status.h"
#include "lldb/lldb-enumerations.h" // for Format::eFormatDefault, Format
#include "lldb/lldb-types.h" // for addr_t
#include <algorithm> // for min
@@ -205,11 +205,11 @@ public:
const Address *addr, ValueObject *valobj,
bool function_changed, bool initial_function);
- static Error Parse(const llvm::StringRef &format, Entry &entry);
+ static Status Parse(const llvm::StringRef &format, Entry &entry);
- static Error ExtractVariableInfo(llvm::StringRef &format_str,
- llvm::StringRef &variable_name,
- llvm::StringRef &variable_format);
+ static Status ExtractVariableInfo(llvm::StringRef &format_str,
+ llvm::StringRef &variable_name,
+ llvm::StringRef &variable_format);
static size_t AutoComplete(llvm::StringRef s, int match_start_point,
int max_return_elements, bool &word_complete,
@@ -228,8 +228,8 @@ public:
llvm::StringRef element_format);
protected:
- static Error ParseInternal(llvm::StringRef &format, Entry &parent_entry,
- uint32_t depth);
+ static Status ParseInternal(llvm::StringRef &format, Entry &parent_entry,
+ uint32_t depth);
};
} // namespace lldb_private
diff --git a/include/lldb/Core/MappedHash.h b/include/lldb/Core/MappedHash.h
index cab98ee5b302..18d383ed581c 100644
--- a/include/lldb/Core/MappedHash.h
+++ b/include/lldb/Core/MappedHash.h
@@ -326,7 +326,7 @@ public:
1u, // Bucket hash data collision, but key didn't match
eResultEndOfHashData = 2u, // The chain of items for this hash data in
// this bucket is terminated, search no more
- eResultError = 3u // Error parsing the hash data, abort
+ eResultError = 3u // Status parsing the hash data, abort
};
struct Pair {
@@ -409,7 +409,7 @@ public:
// searching
return false;
case eResultError:
- // Error parsing the hash data, abort
+ // Status parsing the hash data, abort
return false;
}
}
diff --git a/include/lldb/Core/Module.h b/include/lldb/Core/Module.h
index 33735bc99f60..2ffe57ad8a4d 100644
--- a/include/lldb/Core/Module.h
+++ b/include/lldb/Core/Module.h
@@ -17,8 +17,8 @@
#include "lldb/Symbol/TypeSystem.h"
#include "lldb/Target/PathMappingList.h"
#include "lldb/Utility/ConstString.h" // for ConstString
-#include "lldb/Utility/Error.h" // for Error
#include "lldb/Utility/FileSpec.h"
+#include "lldb/Utility/Status.h" // for Status
#include "lldb/Utility/UUID.h"
#include "lldb/lldb-defines.h" // for DISALLOW_COPY_AND_ASSIGN
#include "lldb/lldb-enumerations.h" // for LanguageType, SymbolType
@@ -652,7 +652,7 @@ public:
//------------------------------------------------------------------
bool IsLoadedInTarget(Target *target);
- bool LoadScriptingResourceInTarget(Target *target, Error &error,
+ bool LoadScriptingResourceInTarget(Target *target, Status &error,
Stream *feedback_stream = nullptr);
//------------------------------------------------------------------
@@ -728,7 +728,7 @@ public:
/// failed (see the `error` for more information in that case).
//------------------------------------------------------------------
ObjectFile *GetMemoryObjectFile(const lldb::ProcessSP &process_sp,
- lldb::addr_t header_addr, Error &error,
+ lldb::addr_t header_addr, Status &error,
size_t size_to_read = 512);
//------------------------------------------------------------------
/// Get the symbol vendor interface for the current architecture.
@@ -1033,7 +1033,7 @@ public:
///
/// @return
//------------------------------------------------------------------
- Error LoadInMemory(Target &target, bool set_pc);
+ Status LoadInMemory(Target &target, bool set_pc);
//----------------------------------------------------------------------
/// @class LookupInfo Module.h "lldb/Core/Module.h"
diff --git a/include/lldb/Core/ModuleList.h b/include/lldb/Core/ModuleList.h
index d82d1c0d48d8..4b637c9b0427 100644
--- a/include/lldb/Core/ModuleList.h
+++ b/include/lldb/Core/ModuleList.h
@@ -12,9 +12,9 @@
#include "lldb/Core/Address.h" // for Address
#include "lldb/Core/ModuleSpec.h" // for ModuleSpec
-#include "lldb/Utility/Error.h" // for Error
#include "lldb/Utility/FileSpec.h" // for FileSpec
#include "lldb/Utility/Iterable.h"
+#include "lldb/Utility/Status.h" // for Status
#include "lldb/lldb-enumerations.h"
#include "lldb/lldb-forward.h"
#include "lldb/lldb-types.h"
@@ -530,18 +530,18 @@ public:
//------------------------------------------------------------------
size_t GetSize() const;
- bool LoadScriptingResourcesInTarget(Target *target, std::list<Error> &errors,
+ bool LoadScriptingResourcesInTarget(Target *target, std::list<Status> &errors,
Stream *feedback_stream = nullptr,
bool continue_on_error = true);
static bool ModuleIsInCache(const Module *module_ptr);
- static Error GetSharedModule(const ModuleSpec &module_spec,
- lldb::ModuleSP &module_sp,
- const FileSpecList *module_search_paths_ptr,
- lldb::ModuleSP *old_module_sp_ptr,
- bool *did_create_ptr,
- bool always_create = false);
+ static Status GetSharedModule(const ModuleSpec &module_spec,
+ lldb::ModuleSP &module_sp,
+ const FileSpecList *module_search_paths_ptr,
+ lldb::ModuleSP *old_module_sp_ptr,
+ bool *did_create_ptr,
+ bool always_create = false);
static bool RemoveSharedModule(lldb::ModuleSP &module_sp);
diff --git a/include/lldb/Core/PluginManager.h b/include/lldb/Core/PluginManager.h
index 645ab85eaa7e..d9851e5ecfc1 100644
--- a/include/lldb/Core/PluginManager.h
+++ b/include/lldb/Core/PluginManager.h
@@ -10,8 +10,8 @@
#ifndef liblldb_PluginManager_h_
#define liblldb_PluginManager_h_
-#include "lldb/Utility/Error.h" // for Error
#include "lldb/Utility/FileSpec.h"
+#include "lldb/Utility/Status.h" // for Status
#include "lldb/lldb-enumerations.h" // for ScriptLanguage
#include "lldb/lldb-forward.h" // for OptionValuePropertiesSP
#include "lldb/lldb-private-interfaces.h" // for DebuggerInitializeCallback
@@ -202,8 +202,8 @@ public:
static ObjectFileCreateMemoryInstance
GetObjectFileCreateMemoryCallbackForPluginName(const ConstString &name);
- static Error SaveCore(const lldb::ProcessSP &process_sp,
- const FileSpec &outfile);
+ static Status SaveCore(const lldb::ProcessSP &process_sp,
+ const FileSpec &outfile);
//------------------------------------------------------------------
// ObjectContainer
diff --git a/include/lldb/Core/RegisterValue.h b/include/lldb/Core/RegisterValue.h
index 66c4689d702d..a45db00fb76e 100644
--- a/include/lldb/Core/RegisterValue.h
+++ b/include/lldb/Core/RegisterValue.h
@@ -12,7 +12,7 @@
#include "lldb/Core/Scalar.h"
#include "lldb/Utility/Endian.h"
-#include "lldb/Utility/Error.h" // for Error
+#include "lldb/Utility/Status.h" // for Status
#include "lldb/lldb-enumerations.h" // for ByteOrder, Format
#include "lldb/lldb-types.h" // for offset_t
@@ -105,11 +105,11 @@ public:
// into "dst".
uint32_t GetAsMemoryData(const RegisterInfo *reg_info, void *dst,
uint32_t dst_len, lldb::ByteOrder dst_byte_order,
- Error &error) const;
+ Status &error) const;
uint32_t SetFromMemoryData(const RegisterInfo *reg_info, const void *src,
uint32_t src_len, lldb::ByteOrder src_byte_order,
- Error &error);
+ Status &error);
bool GetScalarValue(Scalar &scalar) const;
@@ -241,13 +241,13 @@ public:
bool SignExtend(uint32_t sign_bitpos);
- Error SetValueFromString(const RegisterInfo *reg_info,
- llvm::StringRef value_str);
- Error SetValueFromString(const RegisterInfo *reg_info,
- const char *value_str) = delete;
+ Status SetValueFromString(const RegisterInfo *reg_info,
+ llvm::StringRef value_str);
+ Status SetValueFromString(const RegisterInfo *reg_info,
+ const char *value_str) = delete;
- Error SetValueFromData(const RegisterInfo *reg_info, DataExtractor &data,
- lldb::offset_t offset, bool partial_data_ok);
+ Status SetValueFromData(const RegisterInfo *reg_info, DataExtractor &data,
+ lldb::offset_t offset, bool partial_data_ok);
// The default value of 0 for reg_name_right_align_at means no alignment at
// all.
diff --git a/include/lldb/Core/Scalar.h b/include/lldb/Core/Scalar.h
index c534044af753..943398b88020 100644
--- a/include/lldb/Core/Scalar.h
+++ b/include/lldb/Core/Scalar.h
@@ -10,7 +10,7 @@
#ifndef liblldb_Scalar_h_
#define liblldb_Scalar_h_
-#include "lldb/Utility/Error.h" // for Error
+#include "lldb/Utility/Status.h" // for Status
#include "lldb/lldb-enumerations.h" // for Encoding, ByteOrder
#include "lldb/lldb-private-types.h" // for type128
@@ -146,7 +146,7 @@ public:
bool GetData(DataExtractor &data, size_t limit_byte_size = UINT32_MAX) const;
size_t GetAsMemoryData(void *dst, size_t dst_len,
- lldb::ByteOrder dst_byte_order, Error &error) const;
+ lldb::ByteOrder dst_byte_order, Status &error) const;
bool IsZero() const;
@@ -272,11 +272,11 @@ public:
long double LongDouble(long double fail_value = 0.0) const;
- Error SetValueFromCString(const char *s, lldb::Encoding encoding,
- size_t byte_size);
+ Status SetValueFromCString(const char *s, lldb::Encoding encoding,
+ size_t byte_size);
- Error SetValueFromData(DataExtractor &data, lldb::Encoding encoding,
- size_t byte_size);
+ Status SetValueFromData(DataExtractor &data, lldb::Encoding encoding,
+ size_t byte_size);
static bool UIntValueIsValidForSize(uint64_t uval64, size_t total_byte_size) {
if (total_byte_size > 8)
diff --git a/include/lldb/Core/SearchFilter.h b/include/lldb/Core/SearchFilter.h
index 829305ff5dee..06fb94d8fbdf 100644
--- a/include/lldb/Core/SearchFilter.h
+++ b/include/lldb/Core/SearchFilter.h
@@ -28,7 +28,7 @@ namespace lldb_private {
class CompileUnit;
}
namespace lldb_private {
-class Error;
+class Status;
}
namespace lldb_private {
class Function;
@@ -250,7 +250,7 @@ public:
static lldb::SearchFilterSP
CreateFromStructuredData(Target &target,
const StructuredData::Dictionary &data_dict,
- Error &error);
+ Status &error);
virtual StructuredData::ObjectSP SerializeToStructuredData() {
return StructuredData::ObjectSP();
@@ -285,7 +285,7 @@ public:
static const char *FilterTyToName(enum FilterTy);
- static FilterTy NameToFilterTy(const char *name);
+ static FilterTy NameToFilterTy(llvm::StringRef name);
protected:
// Serialization of SearchFilter options:
@@ -351,7 +351,7 @@ public:
static lldb::SearchFilterSP
CreateFromStructuredData(Target &target,
const StructuredData::Dictionary &data_dict,
- Error &error);
+ Status &error);
StructuredData::ObjectSP SerializeToStructuredData() override;
@@ -405,7 +405,7 @@ public:
static lldb::SearchFilterSP
CreateFromStructuredData(Target &target,
const StructuredData::Dictionary &data_dict,
- Error &error);
+ Status &error);
StructuredData::ObjectSP SerializeToStructuredData() override;
@@ -462,7 +462,7 @@ public:
static lldb::SearchFilterSP
CreateFromStructuredData(Target &target,
const StructuredData::Dictionary &data_dict,
- Error &error);
+ Status &error);
StructuredData::ObjectSP SerializeToStructuredData() override;
@@ -515,7 +515,7 @@ public:
static lldb::SearchFilterSP
CreateFromStructuredData(Target &target,
const StructuredData::Dictionary &data_dict,
- Error &error);
+ Status &error);
StructuredData::ObjectSP SerializeToStructuredData() override;
diff --git a/include/lldb/Core/StructuredData.h b/include/lldb/Core/StructuredData.h
index eecfd86f7988..6cb78dc48ab5 100644
--- a/include/lldb/Core/StructuredData.h
+++ b/include/lldb/Core/StructuredData.h
@@ -28,7 +28,7 @@
#include <stdint.h> // for uint64_t
namespace lldb_private {
-class Error;
+class Status;
}
namespace lldb_private {
class Stream;
@@ -143,15 +143,12 @@ public:
: nullptr);
}
- std::string GetStringValue(const char *fail_value = nullptr) {
+ llvm::StringRef GetStringValue(const char *fail_value = nullptr) {
String *s = GetAsString();
if (s)
return s->GetValue();
- if (fail_value && fail_value[0])
- return std::string(fail_value);
-
- return std::string();
+ return fail_value;
}
Generic *GetAsGeneric() {
@@ -220,7 +217,7 @@ public:
return success;
}
- bool GetItemAtIndexAsString(size_t idx, std::string &result) const {
+ bool GetItemAtIndexAsString(size_t idx, llvm::StringRef &result) const {
ObjectSP value_sp = GetItemAtIndex(idx);
if (value_sp.get()) {
if (auto string_value = value_sp->GetAsString()) {
@@ -231,8 +228,8 @@ public:
return false;
}
- bool GetItemAtIndexAsString(size_t idx, std::string &result,
- const std::string &default_val) const {
+ bool GetItemAtIndexAsString(size_t idx, llvm::StringRef &result,
+ llvm::StringRef default_val) const {
bool success = GetItemAtIndexAsString(idx, result);
if (!success)
result = default_val;
@@ -339,18 +336,13 @@ public:
class String : public Object {
public:
- String(const char *cstr = nullptr) : Object(Type::eTypeString), m_value() {
- if (cstr)
- m_value = cstr;
- }
-
- String(const std::string &s) : Object(Type::eTypeString), m_value(s) {}
-
- String(const std::string &&s) : Object(Type::eTypeString), m_value(s) {}
+ String() : Object(Type::eTypeString) {}
+ explicit String(llvm::StringRef S)
+ : Object(Type::eTypeString), m_value(S) {}
- void SetValue(const std::string &string) { m_value = string; }
+ void SetValue(llvm::StringRef S) { m_value = S; }
- const std::string &GetValue() { return m_value; }
+ llvm::StringRef GetValue() { return m_value; }
void Dump(Stream &s, bool pretty_print = true) const override;
@@ -430,7 +422,7 @@ public:
}
bool GetValueForKeyAsString(llvm::StringRef key,
- std::string &result) const {
+ llvm::StringRef &result) const {
ObjectSP value_sp = GetValueForKey(key);
if (value_sp.get()) {
if (auto string_value = value_sp->GetAsString()) {
@@ -441,14 +433,14 @@ public:
return false;
}
- bool GetValueForKeyAsString(llvm::StringRef key, std::string &result,
+ bool GetValueForKeyAsString(llvm::StringRef key, llvm::StringRef &result,
const char *default_val) const {
bool success = GetValueForKeyAsString(key, result);
if (!success) {
if (default_val)
result = default_val;
else
- result.clear();
+ result = llvm::StringRef();
}
return success;
}
@@ -513,7 +505,7 @@ public:
AddItem(key, std::make_shared<Float>(value));
}
- void AddStringItem(llvm::StringRef key, std::string value) {
+ void AddStringItem(llvm::StringRef key, llvm::StringRef value) {
AddItem(key, std::make_shared<String>(std::move(value)));
}
@@ -558,7 +550,7 @@ public:
static ObjectSP ParseJSON(std::string json_text);
- static ObjectSP ParseJSONFromFile(const FileSpec &file, Error &error);
+ static ObjectSP ParseJSONFromFile(const FileSpec &file, Status &error);
};
} // namespace lldb_private
diff --git a/include/lldb/Core/StructuredDataImpl.h b/include/lldb/Core/StructuredDataImpl.h
index 94f9cce52548..81d59f83ac3d 100644
--- a/include/lldb/Core/StructuredDataImpl.h
+++ b/include/lldb/Core/StructuredDataImpl.h
@@ -12,9 +12,9 @@
#include "lldb/Core/Event.h"
#include "lldb/Core/StructuredData.h"
-#include "lldb/Utility/Error.h"
-#include "lldb/Utility/Stream.h"
#include "lldb/Target/StructuredDataPlugin.h"
+#include "lldb/Utility/Status.h"
+#include "lldb/Utility/Stream.h"
#include "lldb/lldb-forward.h"
#pragma mark--
@@ -45,8 +45,8 @@ public:
m_data_sp.reset();
}
- Error GetAsJSON(Stream &stream) const {
- Error error;
+ Status GetAsJSON(Stream &stream) const {
+ Status error;
if (!m_data_sp) {
error.SetErrorString("No structured data.");
@@ -57,8 +57,8 @@ public:
return error;
}
- Error GetDescription(Stream &stream) const {
- Error error;
+ Status GetDescription(Stream &stream) const {
+ Status error;
if (!m_data_sp) {
error.SetErrorString("Cannot pretty print structured data: "
diff --git a/include/lldb/Core/Timer.h b/include/lldb/Core/Timer.h
index 6da00b0e27a4..55aab193032e 100644
--- a/include/lldb/Core/Timer.h
+++ b/include/lldb/Core/Timer.h
@@ -37,10 +37,23 @@ namespace lldb_private {
class Timer {
public:
+ class Category {
+ public:
+ explicit Category(const char *category_name);
+
+ private:
+ friend class Timer;
+ const char *m_name;
+ std::atomic<uint64_t> m_nanos;
+ std::atomic<Category *> m_next;
+
+ DISALLOW_COPY_AND_ASSIGN(Category);
+ };
+
//--------------------------------------------------------------
/// Default constructor.
//--------------------------------------------------------------
- Timer(const char *category, const char *format, ...)
+ Timer(Category &category, const char *format, ...)
__attribute__((format(printf, 3, 4)));
//--------------------------------------------------------------
@@ -62,7 +75,7 @@ protected:
using TimePoint = std::chrono::steady_clock::time_point;
void ChildDuration(TimePoint::duration dur) { m_child_duration += dur; }
- const char *m_category;
+ Category &m_category;
TimePoint m_total_start;
TimePoint::duration m_child_duration{0};
diff --git a/include/lldb/Core/UserSettingsController.h b/include/lldb/Core/UserSettingsController.h
index 0207187f0718..67bc9b2c0713 100644
--- a/include/lldb/Core/UserSettingsController.h
+++ b/include/lldb/Core/UserSettingsController.h
@@ -10,7 +10,7 @@
#ifndef liblldb_UserSettingsController_h_
#define liblldb_UserSettingsController_h_
-#include "lldb/Utility/Error.h" // for Error
+#include "lldb/Utility/Status.h" // for Status
#include "lldb/lldb-forward.h" // for OptionValuePropertiesSP
#include "lldb/lldb-private-enumerations.h" // for VarSetOperationType
@@ -57,15 +57,16 @@ public:
virtual lldb::OptionValueSP GetPropertyValue(const ExecutionContext *exe_ctx,
llvm::StringRef property_path,
bool will_modify,
- Error &error) const;
+ Status &error) const;
- virtual Error SetPropertyValue(const ExecutionContext *exe_ctx,
- VarSetOperationType op,
- llvm::StringRef property_path, llvm::StringRef value);
+ virtual Status SetPropertyValue(const ExecutionContext *exe_ctx,
+ VarSetOperationType op,
+ llvm::StringRef property_path,
+ llvm::StringRef value);
- virtual Error DumpPropertyValue(const ExecutionContext *exe_ctx, Stream &strm,
- llvm::StringRef property_path,
- uint32_t dump_mask);
+ virtual Status DumpPropertyValue(const ExecutionContext *exe_ctx,
+ Stream &strm, llvm::StringRef property_path,
+ uint32_t dump_mask);
virtual void DumpAllPropertyValues(const ExecutionContext *exe_ctx,
Stream &strm, uint32_t dump_mask);
diff --git a/include/lldb/Core/Value.h b/include/lldb/Core/Value.h
index 9a667cf65752..678b56fc49f5 100644
--- a/include/lldb/Core/Value.h
+++ b/include/lldb/Core/Value.h
@@ -13,7 +13,7 @@
#include "lldb/Core/Scalar.h"
#include "lldb/Symbol/CompilerType.h"
#include "lldb/Utility/DataBufferHeap.h"
-#include "lldb/Utility/Error.h"
+#include "lldb/Utility/Status.h"
#include "lldb/lldb-enumerations.h" // for ByteOrder, ByteOrder::eB...
#include "lldb/lldb-private-enumerations.h" // for AddressType
#include "lldb/lldb-private-types.h" // for type128, RegisterInfo
@@ -219,11 +219,11 @@ public:
lldb::Format GetValueDefaultFormat();
- uint64_t GetValueByteSize(Error *error_ptr, ExecutionContext *exe_ctx);
+ uint64_t GetValueByteSize(Status *error_ptr, ExecutionContext *exe_ctx);
- Error GetValueAsData(ExecutionContext *exe_ctx, DataExtractor &data,
- uint32_t data_offset,
- Module *module); // Can be nullptr
+ Status GetValueAsData(ExecutionContext *exe_ctx, DataExtractor &data,
+ uint32_t data_offset,
+ Module *module); // Can be nullptr
static const char *GetValueTypeAsCString(ValueType context_type);
diff --git a/include/lldb/Core/ValueObject.h b/include/lldb/Core/ValueObject.h
index 0898754b211a..fa1d14870b05 100644
--- a/include/lldb/Core/ValueObject.h
+++ b/include/lldb/Core/ValueObject.h
@@ -18,8 +18,8 @@
#include "lldb/Target/Process.h"
#include "lldb/Utility/ConstString.h"
#include "lldb/Utility/DataExtractor.h"
-#include "lldb/Utility/Error.h"
#include "lldb/Utility/SharedCluster.h"
+#include "lldb/Utility/Status.h"
#include "lldb/Utility/UserID.h"
#include "lldb/lldb-defines.h" // for LLDB_INVALID...
#include "lldb/lldb-enumerations.h" // for DynamicValue...
@@ -462,7 +462,7 @@ public:
virtual int64_t GetValueAsSigned(int64_t fail_value, bool *success = nullptr);
- virtual bool SetValueFromCString(const char *value_str, Error &error);
+ virtual bool SetValueFromCString(const char *value_str, Status &error);
// Return the module associated with this value object in case the
// value is from an executable file and might have its data in
@@ -482,7 +482,7 @@ public:
//------------------------------------------------------------------
// The functions below should NOT be modified by subclasses
//------------------------------------------------------------------
- const Error &GetError();
+ const Status &GetError();
const ConstString &GetName() const;
@@ -520,7 +520,7 @@ public:
// return 'false' whenever you set the error, otherwise
// callers may assume true means everything is OK - this will
// break breakpoint conditions among potentially a few others
- virtual bool IsLogicalTrue(Error &error);
+ virtual bool IsLogicalTrue(Status &error);
virtual const char *GetLocationAsCString();
@@ -620,7 +620,7 @@ public:
virtual lldb::ValueObjectSP CreateConstantValue(const ConstString &name);
- virtual lldb::ValueObjectSP Dereference(Error &error);
+ virtual lldb::ValueObjectSP Dereference(Status &error);
// Creates a copy of the ValueObject with a new name and setting the current
// ValueObject as its parent. It should be used when we want to change the
@@ -628,7 +628,7 @@ public:
// (e.g. sythetic child provider).
virtual lldb::ValueObjectSP Clone(const ConstString &new_name);
- virtual lldb::ValueObjectSP AddressOf(Error &error);
+ virtual lldb::ValueObjectSP AddressOf(Status &error);
virtual lldb::addr_t GetLiveAddress() { return LLDB_INVALID_ADDRESS; }
@@ -700,16 +700,16 @@ public:
bool IsCStringContainer(bool check_pointer = false);
std::pair<size_t, bool>
- ReadPointedString(lldb::DataBufferSP &buffer_sp, Error &error,
+ ReadPointedString(lldb::DataBufferSP &buffer_sp, Status &error,
uint32_t max_length = 0, bool honor_array = true,
lldb::Format item_format = lldb::eFormatCharArray);
virtual size_t GetPointeeData(DataExtractor &data, uint32_t item_idx = 0,
uint32_t item_count = 1);
- virtual uint64_t GetData(DataExtractor &data, Error &error);
+ virtual uint64_t GetData(DataExtractor &data, Status &error);
- virtual bool SetData(DataExtractor &data, Error &error);
+ virtual bool SetData(DataExtractor &data, Status &error);
virtual bool GetIsConstant() const { return m_update_point.IsConstant(); }
@@ -880,8 +880,9 @@ protected:
DataExtractor
m_data; // A data extractor that can be used to extract the value.
Value m_value;
- Error m_error; // An error object that can describe any errors that occur when
- // updating values.
+ Status
+ m_error; // An error object that can describe any errors that occur when
+ // updating values.
std::string m_value_str; // Cached value string that will get cleared if/when
// the value is updated.
std::string m_old_value_str; // Cached old value string from the last time the
diff --git a/include/lldb/Core/ValueObjectConstResult.h b/include/lldb/Core/ValueObjectConstResult.h
index 403d19324c46..1f56129df24a 100644
--- a/include/lldb/Core/ValueObjectConstResult.h
+++ b/include/lldb/Core/ValueObjectConstResult.h
@@ -15,7 +15,7 @@
#include "lldb/Core/ValueObjectConstResultImpl.h"
#include "lldb/Symbol/CompilerType.h" // for CompilerType
#include "lldb/Utility/ConstString.h" // for ConstString
-#include "lldb/Utility/Error.h" // for Error
+#include "lldb/Utility/Status.h" // for Status
#include "lldb/lldb-defines.h" // for LLDB_INVALID_ADDRESS
#include "lldb/lldb-enumerations.h" // for ByteOrder, Dynamic...
#include "lldb/lldb-forward.h" // for ValueObjectSP, Dat...
@@ -69,7 +69,7 @@ public:
// When an expression fails to evaluate, we return an error
static lldb::ValueObjectSP Create(ExecutionContextScope *exe_scope,
- const Error &error);
+ const Status &error);
uint64_t GetByteSize() override;
@@ -85,7 +85,7 @@ public:
void SetByteSize(size_t size);
- lldb::ValueObjectSP Dereference(Error &error) override;
+ lldb::ValueObjectSP Dereference(Status &error) override;
ValueObject *CreateChildAtIndex(size_t idx, bool synthetic_array_member,
int32_t synthetic_index) override;
@@ -94,7 +94,7 @@ public:
uint32_t offset, const CompilerType &type, bool can_create,
ConstString name_const_str = ConstString()) override;
- lldb::ValueObjectSP AddressOf(Error &error) override;
+ lldb::ValueObjectSP AddressOf(Status &error) override;
lldb::addr_t GetAddressOf(bool scalar_is_load_address = true,
AddressType *address_type = nullptr) override;
@@ -153,7 +153,7 @@ private:
ValueObjectConstResult(ExecutionContextScope *exe_scope, const Value &value,
const ConstString &name, Module *module = nullptr);
- ValueObjectConstResult(ExecutionContextScope *exe_scope, const Error &error);
+ ValueObjectConstResult(ExecutionContextScope *exe_scope, const Status &error);
DISALLOW_COPY_AND_ASSIGN(ValueObjectConstResult);
};
diff --git a/include/lldb/Core/ValueObjectConstResultCast.h b/include/lldb/Core/ValueObjectConstResultCast.h
index 3443bfb4885b..442cce420855 100644
--- a/include/lldb/Core/ValueObjectConstResultCast.h
+++ b/include/lldb/Core/ValueObjectConstResultCast.h
@@ -25,7 +25,7 @@ namespace lldb_private {
class DataExtractor;
}
namespace lldb_private {
-class Error;
+class Status;
}
namespace lldb_private {
class ValueObject;
@@ -41,7 +41,7 @@ public:
~ValueObjectConstResultCast() override;
- lldb::ValueObjectSP Dereference(Error &error) override;
+ lldb::ValueObjectSP Dereference(Status &error) override;
ValueObject *CreateChildAtIndex(size_t idx, bool synthetic_array_member,
int32_t synthetic_index) override;
@@ -54,7 +54,7 @@ public:
uint32_t offset, const CompilerType &type, bool can_create,
ConstString name_const_str = ConstString()) override;
- lldb::ValueObjectSP AddressOf(Error &error) override;
+ lldb::ValueObjectSP AddressOf(Status &error) override;
size_t GetPointeeData(DataExtractor &data, uint32_t item_idx = 0,
uint32_t item_count = 1) override;
diff --git a/include/lldb/Core/ValueObjectConstResultChild.h b/include/lldb/Core/ValueObjectConstResultChild.h
index 3da59dc2eb56..a74da0013aba 100644
--- a/include/lldb/Core/ValueObjectConstResultChild.h
+++ b/include/lldb/Core/ValueObjectConstResultChild.h
@@ -24,7 +24,7 @@ namespace lldb_private {
class DataExtractor;
}
namespace lldb_private {
-class Error;
+class Status;
}
namespace lldb_private {
class ValueObject;
@@ -48,7 +48,7 @@ public:
~ValueObjectConstResultChild() override;
- lldb::ValueObjectSP Dereference(Error &error) override;
+ lldb::ValueObjectSP Dereference(Status &error) override;
ValueObject *CreateChildAtIndex(size_t idx, bool synthetic_array_member,
int32_t synthetic_index) override;
@@ -61,7 +61,7 @@ public:
uint32_t offset, const CompilerType &type, bool can_create,
ConstString name_const_str = ConstString()) override;
- lldb::ValueObjectSP AddressOf(Error &error) override;
+ lldb::ValueObjectSP AddressOf(Status &error) override;
size_t GetPointeeData(DataExtractor &data, uint32_t item_idx = 0,
uint32_t item_count = 1) override;
diff --git a/include/lldb/Core/ValueObjectConstResultImpl.h b/include/lldb/Core/ValueObjectConstResultImpl.h
index 2586aab4c781..d86f25e30579 100644
--- a/include/lldb/Core/ValueObjectConstResultImpl.h
+++ b/include/lldb/Core/ValueObjectConstResultImpl.h
@@ -25,7 +25,7 @@ namespace lldb_private {
class DataExtractor;
}
namespace lldb_private {
-class Error;
+class Status;
}
namespace lldb_private {
class ValueObject;
@@ -45,7 +45,7 @@ public:
virtual ~ValueObjectConstResultImpl() = default;
- lldb::ValueObjectSP Dereference(Error &error);
+ lldb::ValueObjectSP Dereference(Status &error);
ValueObject *CreateChildAtIndex(size_t idx, bool synthetic_array_member,
int32_t synthetic_index);
@@ -55,7 +55,7 @@ public:
bool can_create,
ConstString name_const_str = ConstString());
- lldb::ValueObjectSP AddressOf(Error &error);
+ lldb::ValueObjectSP AddressOf(Status &error);
lldb::addr_t GetLiveAddress() { return m_live_address; }
diff --git a/include/lldb/Core/ValueObjectDynamicValue.h b/include/lldb/Core/ValueObjectDynamicValue.h
index 99eb1ebcf977..018ee2c764bf 100644
--- a/include/lldb/Core/ValueObjectDynamicValue.h
+++ b/include/lldb/Core/ValueObjectDynamicValue.h
@@ -32,7 +32,7 @@ namespace lldb_private {
class Declaration;
}
namespace lldb_private {
-class Error;
+class Status;
}
namespace lldb_private {
@@ -86,9 +86,9 @@ public:
m_owning_valobj_sp = owning_sp;
}
- bool SetValueFromCString(const char *value_str, Error &error) override;
+ bool SetValueFromCString(const char *value_str, Status &error) override;
- bool SetData(DataExtractor &data, Error &error) override;
+ bool SetData(DataExtractor &data, Status &error) override;
TypeImpl GetTypeImpl() override;
diff --git a/include/lldb/Core/ValueObjectRegister.h b/include/lldb/Core/ValueObjectRegister.h
index 50d0e12bb3f4..2aaef9bee99e 100644
--- a/include/lldb/Core/ValueObjectRegister.h
+++ b/include/lldb/Core/ValueObjectRegister.h
@@ -26,7 +26,7 @@ namespace lldb_private {
class DataExtractor;
}
namespace lldb_private {
-class Error;
+class Status;
}
namespace lldb_private {
class ExecutionContextScope;
@@ -148,9 +148,9 @@ public:
size_t CalculateNumChildren(uint32_t max) override;
- bool SetValueFromCString(const char *value_str, Error &error) override;
+ bool SetValueFromCString(const char *value_str, Status &error) override;
- bool SetData(DataExtractor &data, Error &error) override;
+ bool SetData(DataExtractor &data, Status &error) override;
bool ResolveValue(Scalar &scalar) override;
diff --git a/include/lldb/Core/ValueObjectSyntheticFilter.h b/include/lldb/Core/ValueObjectSyntheticFilter.h
index d83f038744e5..e32e14030418 100644
--- a/include/lldb/Core/ValueObjectSyntheticFilter.h
+++ b/include/lldb/Core/ValueObjectSyntheticFilter.h
@@ -29,7 +29,7 @@ namespace lldb_private {
class Declaration;
}
namespace lldb_private {
-class Error;
+class Status;
}
namespace lldb_private {
class SyntheticChildrenFrontEnd;
@@ -110,7 +110,7 @@ public:
bool GetIsConstant() const override { return false; }
- bool SetValueFromCString(const char *value_str, Error &error) override;
+ bool SetValueFromCString(const char *value_str, Status &error) override;
void SetFormat(lldb::Format format) override;
diff --git a/include/lldb/Core/ValueObjectVariable.h b/include/lldb/Core/ValueObjectVariable.h
index dbb7c2b9483e..9dd140a84f45 100644
--- a/include/lldb/Core/ValueObjectVariable.h
+++ b/include/lldb/Core/ValueObjectVariable.h
@@ -29,7 +29,7 @@ namespace lldb_private {
class Declaration;
}
namespace lldb_private {
-class Error;
+class Status;
}
namespace lldb_private {
class ExecutionContextScope;
@@ -73,9 +73,9 @@ public:
const char *GetLocationAsCString() override;
- bool SetValueFromCString(const char *value_str, Error &error) override;
+ bool SetValueFromCString(const char *value_str, Status &error) override;
- bool SetData(DataExtractor &data, Error &error) override;
+ bool SetData(DataExtractor &data, Status &error) override;
virtual lldb::VariableSP GetVariable() override { return m_variable_sp; }
diff --git a/include/lldb/DataFormatters/TypeSummary.h b/include/lldb/DataFormatters/TypeSummary.h
index fbfc25dd9c9f..a4d51b065480 100644
--- a/include/lldb/DataFormatters/TypeSummary.h
+++ b/include/lldb/DataFormatters/TypeSummary.h
@@ -25,7 +25,7 @@
#include "lldb/Core/FormatEntity.h"
#include "lldb/Core/StructuredData.h"
-#include "lldb/Utility/Error.h"
+#include "lldb/Utility/Status.h"
namespace lldb_private {
class TypeSummaryOptions {
@@ -286,7 +286,7 @@ private:
struct StringSummaryFormat : public TypeSummaryImpl {
std::string m_format_str;
FormatEntity::Entry m_format;
- Error m_error;
+ Status m_error;
StringSummaryFormat(const TypeSummaryImpl::Flags &flags, const char *f);
diff --git a/include/lldb/Expression/DWARFExpression.h b/include/lldb/Expression/DWARFExpression.h
index ae9eb3fb2d16..1816c3b7a00f 100644
--- a/include/lldb/Expression/DWARFExpression.h
+++ b/include/lldb/Expression/DWARFExpression.h
@@ -14,7 +14,7 @@
#include "lldb/Core/Disassembler.h"
#include "lldb/Core/Scalar.h"
#include "lldb/Utility/DataExtractor.h"
-#include "lldb/Utility/Error.h"
+#include "lldb/Utility/Status.h"
#include "lldb/lldb-private.h"
#include <functional>
@@ -266,7 +266,7 @@ public:
ClangExpressionDeclMap *decl_map,
lldb::addr_t loclist_base_load_addr,
const Value *initial_value_ptr, const Value *object_address_ptr,
- Value &result, Error *error_ptr) const;
+ Value &result, Status *error_ptr) const;
//------------------------------------------------------------------
/// Wrapper for the static evaluate function that uses member
@@ -277,7 +277,7 @@ public:
ClangExpressionDeclMap *decl_map, RegisterContext *reg_ctx,
lldb::addr_t loclist_base_load_addr,
const Value *initial_value_ptr, const Value *object_address_ptr,
- Value &result, Error *error_ptr) const;
+ Value &result, Status *error_ptr) const;
//------------------------------------------------------------------
/// Evaluate a DWARF location expression in a particular context
@@ -345,7 +345,7 @@ public:
DWARFCompileUnit *dwarf_cu, const lldb::offset_t offset,
const lldb::offset_t length, const lldb::RegisterKind reg_set,
const Value *initial_value_ptr, const Value *object_address_ptr,
- Value &result, Error *error_ptr);
+ Value &result, Status *error_ptr);
//------------------------------------------------------------------
/// Loads a ClangExpressionVariableList into the object
diff --git a/include/lldb/Expression/ExpressionParser.h b/include/lldb/Expression/ExpressionParser.h
index 9f33908b8f1b..19526d28b9b3 100644
--- a/include/lldb/Expression/ExpressionParser.h
+++ b/include/lldb/Expression/ExpressionParser.h
@@ -10,7 +10,7 @@
#ifndef liblldb_ExpressionParser_h_
#define liblldb_ExpressionParser_h_
-#include "lldb/Utility/Error.h"
+#include "lldb/Utility/Status.h"
#include "lldb/lldb-public.h"
namespace lldb_private {
@@ -108,7 +108,7 @@ public:
/// An error code indicating the success or failure of the operation.
/// Test with Success().
//------------------------------------------------------------------
- virtual Error
+ virtual Status
PrepareForExecution(lldb::addr_t &func_addr, lldb::addr_t &func_end,
std::shared_ptr<IRExecutionUnit> &execution_unit_sp,
ExecutionContext &exe_ctx, bool &can_interpret,
diff --git a/include/lldb/Expression/IRExecutionUnit.h b/include/lldb/Expression/IRExecutionUnit.h
index 635e0b727d5c..b0b4d7a5c586 100644
--- a/include/lldb/Expression/IRExecutionUnit.h
+++ b/include/lldb/Expression/IRExecutionUnit.h
@@ -39,7 +39,7 @@ class ObjectCache;
namespace lldb_private {
-class Error;
+class Status;
//----------------------------------------------------------------------
/// @class IRExecutionUnit IRExecutionUnit.h "lldb/Expression/IRExecutionUnit.h"
@@ -86,7 +86,7 @@ public:
: nullptr);
}
- void GetRunnableInfo(Error &error, lldb::addr_t &func_addr,
+ void GetRunnableInfo(Status &error, lldb::addr_t &func_addr,
lldb::addr_t &func_end);
//------------------------------------------------------------------
@@ -95,7 +95,7 @@ public:
/// IRExecutionUnit unless the client explicitly chooses to free it.
//------------------------------------------------------------------
- lldb::addr_t WriteNow(const uint8_t *bytes, size_t size, Error &error);
+ lldb::addr_t WriteNow(const uint8_t *bytes, size_t size, Status &error);
void FreeNow(lldb::addr_t allocation);
@@ -240,7 +240,7 @@ private:
//------------------------------------------------------------------
bool WriteData(lldb::ProcessSP &process_sp);
- Error DisassembleFunction(Stream &stream, lldb::ProcessSP &process_sp);
+ Status DisassembleFunction(Stream &stream, lldb::ProcessSP &process_sp);
struct SearchSpec;
@@ -391,7 +391,7 @@ private:
void dump(Log *log);
};
- bool CommitOneAllocation(lldb::ProcessSP &process_sp, Error &error,
+ bool CommitOneAllocation(lldb::ProcessSP &process_sp, Status &error,
AllocationRecord &record);
typedef std::vector<AllocationRecord> RecordVector;
diff --git a/include/lldb/Expression/IRInterpreter.h b/include/lldb/Expression/IRInterpreter.h
index f9392c18c25c..36e03c6fc4f6 100644
--- a/include/lldb/Expression/IRInterpreter.h
+++ b/include/lldb/Expression/IRInterpreter.h
@@ -39,20 +39,20 @@ class IRMemoryMap;
class IRInterpreter {
public:
static bool CanInterpret(llvm::Module &module, llvm::Function &function,
- lldb_private::Error &error,
+ lldb_private::Status &error,
const bool support_function_calls);
static bool Interpret(llvm::Module &module, llvm::Function &function,
llvm::ArrayRef<lldb::addr_t> args,
lldb_private::IRExecutionUnit &execution_unit,
- lldb_private::Error &error,
+ lldb_private::Status &error,
lldb::addr_t stack_frame_bottom,
lldb::addr_t stack_frame_top,
lldb_private::ExecutionContext &exe_ctx);
private:
static bool supportsFunction(llvm::Function &llvm_function,
- lldb_private::Error &err);
+ lldb_private::Status &err);
};
#endif
diff --git a/include/lldb/Expression/IRMemoryMap.h b/include/lldb/Expression/IRMemoryMap.h
index c1a194d1afad..abb5cd745053 100644
--- a/include/lldb/Expression/IRMemoryMap.h
+++ b/include/lldb/Expression/IRMemoryMap.h
@@ -54,25 +54,25 @@ public:
};
lldb::addr_t Malloc(size_t size, uint8_t alignment, uint32_t permissions,
- AllocationPolicy policy, bool zero_memory, Error &error);
- void Leak(lldb::addr_t process_address, Error &error);
- void Free(lldb::addr_t process_address, Error &error);
+ AllocationPolicy policy, bool zero_memory, Status &error);
+ void Leak(lldb::addr_t process_address, Status &error);
+ void Free(lldb::addr_t process_address, Status &error);
void WriteMemory(lldb::addr_t process_address, const uint8_t *bytes,
- size_t size, Error &error);
+ size_t size, Status &error);
void WriteScalarToMemory(lldb::addr_t process_address, Scalar &scalar,
- size_t size, Error &error);
+ size_t size, Status &error);
void WritePointerToMemory(lldb::addr_t process_address, lldb::addr_t address,
- Error &error);
+ Status &error);
void ReadMemory(uint8_t *bytes, lldb::addr_t process_address, size_t size,
- Error &error);
+ Status &error);
void ReadScalarFromMemory(Scalar &scalar, lldb::addr_t process_address,
- size_t size, Error &error);
+ size_t size, Status &error);
void ReadPointerFromMemory(lldb::addr_t *address,
- lldb::addr_t process_address, Error &error);
+ lldb::addr_t process_address, Status &error);
bool GetAllocSize(lldb::addr_t address, size_t &size);
void GetMemoryData(DataExtractor &extractor, lldb::addr_t process_address,
- size_t size, Error &error);
+ size_t size, Status &error);
lldb::ByteOrder GetByteOrder();
uint32_t GetAddressByteSize();
diff --git a/include/lldb/Expression/LLVMUserExpression.h b/include/lldb/Expression/LLVMUserExpression.h
index 48d0161991d7..745d413e077b 100644
--- a/include/lldb/Expression/LLVMUserExpression.h
+++ b/include/lldb/Expression/LLVMUserExpression.h
@@ -81,7 +81,7 @@ protected:
lldb::ExpressionVariableSP &result) override;
virtual void ScanContext(ExecutionContext &exe_ctx,
- lldb_private::Error &err) = 0;
+ lldb_private::Status &err) = 0;
bool PrepareToExecuteJITExpression(DiagnosticManager &diagnostic_manager,
ExecutionContext &exe_ctx,
diff --git a/include/lldb/Expression/Materializer.h b/include/lldb/Expression/Materializer.h
index ed3f91cc67ec..b86bc656d6b5 100644
--- a/include/lldb/Expression/Materializer.h
+++ b/include/lldb/Expression/Materializer.h
@@ -20,7 +20,7 @@
#include "lldb/Expression/IRMemoryMap.h"
#include "lldb/Symbol/TaggedASTType.h"
#include "lldb/Target/StackFrame.h"
-#include "lldb/Utility/Error.h"
+#include "lldb/Utility/Status.h"
#include "lldb/lldb-private-types.h"
namespace lldb_private {
@@ -38,7 +38,7 @@ public:
~Dematerializer() { Wipe(); }
- void Dematerialize(Error &err, lldb::addr_t frame_top,
+ void Dematerialize(Status &err, lldb::addr_t frame_top,
lldb::addr_t frame_bottom);
void Wipe();
@@ -72,7 +72,7 @@ public:
typedef std::weak_ptr<Dematerializer> DematerializerWP;
DematerializerSP Materialize(lldb::StackFrameSP &frame_sp, IRMemoryMap &map,
- lldb::addr_t process_address, Error &err);
+ lldb::addr_t process_address, Status &err);
class PersistentVariableDelegate {
public:
@@ -83,13 +83,13 @@ public:
uint32_t
AddPersistentVariable(lldb::ExpressionVariableSP &persistent_variable_sp,
- PersistentVariableDelegate *delegate, Error &err);
- uint32_t AddVariable(lldb::VariableSP &variable_sp, Error &err);
+ PersistentVariableDelegate *delegate, Status &err);
+ uint32_t AddVariable(lldb::VariableSP &variable_sp, Status &err);
uint32_t AddResultVariable(const CompilerType &type, bool is_lvalue,
bool keep_in_memory,
- PersistentVariableDelegate *delegate, Error &err);
- uint32_t AddSymbol(const Symbol &symbol_sp, Error &err);
- uint32_t AddRegister(const RegisterInfo &register_info, Error &err);
+ PersistentVariableDelegate *delegate, Status &err);
+ uint32_t AddSymbol(const Symbol &symbol_sp, Status &err);
+ uint32_t AddRegister(const RegisterInfo &register_info, Status &err);
uint32_t GetStructAlignment() { return m_struct_alignment; }
@@ -102,11 +102,11 @@ public:
virtual ~Entity() = default;
virtual void Materialize(lldb::StackFrameSP &frame_sp, IRMemoryMap &map,
- lldb::addr_t process_address, Error &err) = 0;
+ lldb::addr_t process_address, Status &err) = 0;
virtual void Dematerialize(lldb::StackFrameSP &frame_sp, IRMemoryMap &map,
lldb::addr_t process_address,
lldb::addr_t frame_top,
- lldb::addr_t frame_bottom, Error &err) = 0;
+ lldb::addr_t frame_bottom, Status &err) = 0;
virtual void DumpToLog(IRMemoryMap &map, lldb::addr_t process_address,
Log *log) = 0;
virtual void Wipe(IRMemoryMap &map, lldb::addr_t process_address) = 0;
diff --git a/include/lldb/Expression/REPL.h b/include/lldb/Expression/REPL.h
index 56d31cfd3b15..0c1e97fec259 100644
--- a/include/lldb/Expression/REPL.h
+++ b/include/lldb/Expression/REPL.h
@@ -60,7 +60,7 @@ public:
/// @return
/// The range of the containing object in the target process.
//------------------------------------------------------------------
- static lldb::REPLSP Create(Error &Error, lldb::LanguageType language,
+ static lldb::REPLSP Create(Status &Status, lldb::LanguageType language,
Debugger *debugger, Target *target,
const char *repl_options);
@@ -85,7 +85,7 @@ public:
lldb::IOHandlerSP GetIOHandler();
- Error RunLoop();
+ Status RunLoop();
//------------------------------------------------------------------
// IOHandler::Delegate functions
@@ -126,7 +126,7 @@ protected:
// Subclasses should override these functions to implement a functional REPL.
//----------------------------------------------------------------------
- virtual Error DoInitialization() = 0;
+ virtual Status DoInitialization() = 0;
virtual ConstString GetSourceFileBasename() = 0;
diff --git a/include/lldb/Expression/UserExpression.h b/include/lldb/Expression/UserExpression.h
index fca667e8ee96..ced5cb2bf2b7 100644
--- a/include/lldb/Expression/UserExpression.h
+++ b/include/lldb/Expression/UserExpression.h
@@ -259,13 +259,13 @@ public:
static lldb::ExpressionResults
Evaluate(ExecutionContext &exe_ctx, const EvaluateExpressionOptions &options,
llvm::StringRef expr_cstr, llvm::StringRef expr_prefix,
- lldb::ValueObjectSP &result_valobj_sp, Error &error,
+ lldb::ValueObjectSP &result_valobj_sp, Status &error,
uint32_t line_offset = 0, std::string *fixed_expression = nullptr,
lldb::ModuleSP *jit_module_sp_ptr = nullptr);
- static const Error::ValueType kNoResult =
+ static const Status::ValueType kNoResult =
0x1001; ///< ValueObject::GetError() returns this if there is no result
- ///from the expression.
+ /// from the expression.
const char *GetFixedText() {
if (m_fixed_text.empty())
@@ -281,7 +281,7 @@ protected:
lldb::ExpressionVariableSP &result) = 0;
static lldb::addr_t GetObjectPointer(lldb::StackFrameSP frame_sp,
- ConstString &object_name, Error &err);
+ ConstString &object_name, Status &err);
//------------------------------------------------------------------
/// Populate m_in_cplusplus_method and m_in_objectivec_method based on the
diff --git a/include/lldb/Expression/UtilityFunction.h b/include/lldb/Expression/UtilityFunction.h
index 0e2b87da20ad..9c54db35fa37 100644
--- a/include/lldb/Expression/UtilityFunction.h
+++ b/include/lldb/Expression/UtilityFunction.h
@@ -123,7 +123,7 @@ public:
FunctionCaller *MakeFunctionCaller(const CompilerType &return_type,
const ValueList &arg_value_list,
lldb::ThreadSP compilation_thread,
- Error &error);
+ Status &error);
// This one retrieves the function caller that is already made. If you
// haven't made it yet, this returns nullptr
diff --git a/include/lldb/Host/File.h b/include/lldb/Host/File.h
index 35317780f1ce..560a655237f3 100644
--- a/include/lldb/Host/File.h
+++ b/include/lldb/Host/File.h
@@ -12,7 +12,7 @@
#include "lldb/Host/IOObject.h"
#include "lldb/Host/PosixApi.h"
-#include "lldb/Utility/Error.h"
+#include "lldb/Utility/Status.h"
#include "lldb/lldb-private.h"
#include <stdarg.h>
@@ -164,7 +164,7 @@ public:
/// @return
/// A reference to the file specification object.
//------------------------------------------------------------------
- Error GetFileSpec(FileSpec &file_spec) const;
+ Status GetFileSpec(FileSpec &file_spec) const;
//------------------------------------------------------------------
/// Open a file for read/writing with the specified options.
@@ -181,10 +181,10 @@ public:
/// @param[in] permissions
/// Options to use when opening (see File::Permissions)
//------------------------------------------------------------------
- Error Open(const char *path, uint32_t options,
- uint32_t permissions = lldb::eFilePermissionsFileDefault);
+ Status Open(const char *path, uint32_t options,
+ uint32_t permissions = lldb::eFilePermissionsFileDefault);
- Error Close() override;
+ Status Close() override;
void Clear();
@@ -216,7 +216,7 @@ public:
/// An error object that indicates success or the reason for
/// failure.
//------------------------------------------------------------------
- Error Read(void *buf, size_t &num_bytes) override;
+ Status Read(void *buf, size_t &num_bytes) override;
//------------------------------------------------------------------
/// Write bytes to a file at the current file position.
@@ -237,7 +237,7 @@ public:
/// An error object that indicates success or the reason for
/// failure.
//------------------------------------------------------------------
- Error Write(const void *buf, size_t &num_bytes) override;
+ Status Write(const void *buf, size_t &num_bytes) override;
//------------------------------------------------------------------
/// Seek to an offset relative to the beginning of the file.
@@ -253,13 +253,13 @@ public:
/// beginning of the file.
///
/// @param[in] error_ptr
- /// A pointer to a lldb_private::Error object that will be
+ /// A pointer to a lldb_private::Status object that will be
/// filled in if non-nullptr.
///
/// @return
/// The resulting seek offset, or -1 on error.
//------------------------------------------------------------------
- off_t SeekFromStart(off_t offset, Error *error_ptr = nullptr);
+ off_t SeekFromStart(off_t offset, Status *error_ptr = nullptr);
//------------------------------------------------------------------
/// Seek to an offset relative to the current file position.
@@ -275,13 +275,13 @@ public:
/// current file position.
///
/// @param[in] error_ptr
- /// A pointer to a lldb_private::Error object that will be
+ /// A pointer to a lldb_private::Status object that will be
/// filled in if non-nullptr.
///
/// @return
/// The resulting seek offset, or -1 on error.
//------------------------------------------------------------------
- off_t SeekFromCurrent(off_t offset, Error *error_ptr = nullptr);
+ off_t SeekFromCurrent(off_t offset, Status *error_ptr = nullptr);
//------------------------------------------------------------------
/// Seek to an offset relative to the end of the file.
@@ -298,13 +298,13 @@ public:
/// absolute file offset.
///
/// @param[in] error_ptr
- /// A pointer to a lldb_private::Error object that will be
+ /// A pointer to a lldb_private::Status object that will be
/// filled in if non-nullptr.
///
/// @return
/// The resulting seek offset, or -1 on error.
//------------------------------------------------------------------
- off_t SeekFromEnd(off_t offset, Error *error_ptr = nullptr);
+ off_t SeekFromEnd(off_t offset, Status *error_ptr = nullptr);
//------------------------------------------------------------------
/// Read bytes from a file from the specified file offset.
@@ -329,7 +329,7 @@ public:
/// An error object that indicates success or the reason for
/// failure.
//------------------------------------------------------------------
- Error Read(void *dst, size_t &num_bytes, off_t &offset);
+ Status Read(void *dst, size_t &num_bytes, off_t &offset);
//------------------------------------------------------------------
/// Read bytes from a file from the specified file offset.
@@ -360,8 +360,8 @@ public:
/// An error object that indicates success or the reason for
/// failure.
//------------------------------------------------------------------
- Error Read(size_t &num_bytes, off_t &offset, bool null_terminate,
- lldb::DataBufferSP &data_buffer_sp);
+ Status Read(size_t &num_bytes, off_t &offset, bool null_terminate,
+ lldb::DataBufferSP &data_buffer_sp);
//------------------------------------------------------------------
/// Write bytes to a file at the specified file offset.
@@ -388,7 +388,7 @@ public:
/// An error object that indicates success or the reason for
/// failure.
//------------------------------------------------------------------
- Error Write(const void *src, size_t &num_bytes, off_t &offset);
+ Status Write(const void *src, size_t &num_bytes, off_t &offset);
//------------------------------------------------------------------
/// Flush the current stream
@@ -397,7 +397,7 @@ public:
/// An error object that indicates success or the reason for
/// failure.
//------------------------------------------------------------------
- Error Flush();
+ Status Flush();
//------------------------------------------------------------------
/// Sync to disk.
@@ -406,7 +406,7 @@ public:
/// An error object that indicates success or the reason for
/// failure.
//------------------------------------------------------------------
- Error Sync();
+ Status Sync();
//------------------------------------------------------------------
/// Get the permissions for a this file.
@@ -415,9 +415,9 @@ public:
/// Bits logical OR'ed together from the permission bits defined
/// in lldb_private::File::Permissions.
//------------------------------------------------------------------
- uint32_t GetPermissions(Error &error) const;
+ uint32_t GetPermissions(Status &error) const;
- static uint32_t GetPermissions(const FileSpec &file_spec, Error &error);
+ static uint32_t GetPermissions(const FileSpec &file_spec, Status &error);
//------------------------------------------------------------------
/// Return true if this file is interactive.
diff --git a/include/lldb/Host/FileCache.h b/include/lldb/Host/FileCache.h
index 094ee695ce32..1c03540c1eb3 100644
--- a/include/lldb/Host/FileCache.h
+++ b/include/lldb/Host/FileCache.h
@@ -15,8 +15,8 @@
#include "lldb/lldb-forward.h"
#include "lldb/lldb-types.h"
-#include "lldb/Utility/Error.h"
#include "lldb/Utility/FileSpec.h"
+#include "lldb/Utility/Status.h"
namespace lldb_private {
class FileCache {
@@ -29,13 +29,13 @@ public:
static FileCache &GetInstance();
lldb::user_id_t OpenFile(const FileSpec &file_spec, uint32_t flags,
- uint32_t mode, Error &error);
- bool CloseFile(lldb::user_id_t fd, Error &error);
+ uint32_t mode, Status &error);
+ bool CloseFile(lldb::user_id_t fd, Status &error);
uint64_t WriteFile(lldb::user_id_t fd, uint64_t offset, const void *src,
- uint64_t src_len, Error &error);
+ uint64_t src_len, Status &error);
uint64_t ReadFile(lldb::user_id_t fd, uint64_t offset, void *dst,
- uint64_t dst_len, Error &error);
+ uint64_t dst_len, Status &error);
private:
static FileCache *m_instance;
diff --git a/include/lldb/Host/FileSystem.h b/include/lldb/Host/FileSystem.h
index 794308ff4244..c13d5c84c631 100644
--- a/include/lldb/Host/FileSystem.h
+++ b/include/lldb/Host/FileSystem.h
@@ -10,8 +10,8 @@
#ifndef liblldb_Host_FileSystem_h
#define liblldb_Host_FileSystem_h
-#include "lldb/Utility/Error.h"
#include "lldb/Utility/FileSpec.h"
+#include "lldb/Utility/Status.h"
#include "llvm/Support/Chrono.h"
#include "lldb/lldb-types.h"
@@ -26,10 +26,10 @@ public:
static const char *DEV_NULL;
static const char *PATH_CONVERSION_ERROR;
- static Error Symlink(const FileSpec &src, const FileSpec &dst);
- static Error Readlink(const FileSpec &src, FileSpec &dst);
+ static Status Symlink(const FileSpec &src, const FileSpec &dst);
+ static Status Readlink(const FileSpec &src, FileSpec &dst);
- static Error ResolveSymbolicLink(const FileSpec &src, FileSpec &dst);
+ static Status ResolveSymbolicLink(const FileSpec &src, FileSpec &dst);
/// Wraps ::fopen in a platform-independent way. Once opened, FILEs can be
/// manipulated and closed with the normal ::fread, ::fclose, etc. functions.
diff --git a/include/lldb/Host/Host.h b/include/lldb/Host/Host.h
index 8415d429d5e2..c474dccab5db 100644
--- a/include/lldb/Host/Host.h
+++ b/include/lldb/Host/Host.h
@@ -190,19 +190,19 @@ public:
static short GetPosixspawnFlags(const ProcessLaunchInfo &launch_info);
- static Error LaunchProcessPosixSpawn(const char *exe_path,
- const ProcessLaunchInfo &launch_info,
- lldb::pid_t &pid);
+ static Status LaunchProcessPosixSpawn(const char *exe_path,
+ const ProcessLaunchInfo &launch_info,
+ lldb::pid_t &pid);
static bool AddPosixSpawnFileAction(void *file_actions,
const FileAction *info, Log *log,
- Error &error);
+ Status &error);
#endif
static const lldb::UnixSignalsSP &GetUnixSignals();
- static Error LaunchProcess(ProcessLaunchInfo &launch_info);
+ static Status LaunchProcess(ProcessLaunchInfo &launch_info);
//------------------------------------------------------------------
/// Perform expansion of the command-line for this launch info
@@ -211,10 +211,10 @@ public:
// argument magic the platform defines as part of its typical
// user experience
//------------------------------------------------------------------
- static Error ShellExpandArguments(ProcessLaunchInfo &launch_info);
+ static Status ShellExpandArguments(ProcessLaunchInfo &launch_info);
// TODO: Convert this function to take a StringRef.
- static Error RunShellCommand(
+ static Status RunShellCommand(
const char *command, // Shouldn't be NULL
const FileSpec &working_dir, // Pass empty FileSpec to use the current
// working directory
@@ -226,7 +226,7 @@ public:
uint32_t timeout_sec,
bool run_in_default_shell = true);
- static Error RunShellCommand(
+ static Status RunShellCommand(
const Args &args,
const FileSpec &working_dir, // Pass empty FileSpec to use the current
// working directory
diff --git a/include/lldb/Host/HostNativeProcessBase.h b/include/lldb/Host/HostNativeProcessBase.h
index 0befe867c296..07f98c24776c 100644
--- a/include/lldb/Host/HostNativeProcessBase.h
+++ b/include/lldb/Host/HostNativeProcessBase.h
@@ -11,7 +11,7 @@
#define lldb_Host_HostNativeProcessBase_h_
#include "lldb/Host/HostProcess.h"
-#include "lldb/Utility/Error.h"
+#include "lldb/Utility/Status.h"
#include "lldb/lldb-defines.h"
#include "lldb/lldb-types.h"
@@ -28,8 +28,8 @@ public:
: m_process(process) {}
virtual ~HostNativeProcessBase() {}
- virtual Error Terminate() = 0;
- virtual Error GetMainModule(FileSpec &file_spec) const = 0;
+ virtual Status Terminate() = 0;
+ virtual Status GetMainModule(FileSpec &file_spec) const = 0;
virtual lldb::pid_t GetProcessId() const = 0;
virtual bool IsRunning() const = 0;
diff --git a/include/lldb/Host/HostNativeThreadBase.h b/include/lldb/Host/HostNativeThreadBase.h
index 9bf86e0759f5..f1f89f3b75fe 100644
--- a/include/lldb/Host/HostNativeThreadBase.h
+++ b/include/lldb/Host/HostNativeThreadBase.h
@@ -10,7 +10,7 @@
#ifndef lldb_Host_HostNativeThreadBase_h_
#define lldb_Host_HostNativeThreadBase_h_
-#include "lldb/Utility/Error.h"
+#include "lldb/Utility/Status.h"
#include "lldb/lldb-defines.h"
#include "lldb/lldb-types.h"
@@ -31,8 +31,8 @@ public:
explicit HostNativeThreadBase(lldb::thread_t thread);
virtual ~HostNativeThreadBase() {}
- virtual Error Join(lldb::thread_result_t *result) = 0;
- virtual Error Cancel() = 0;
+ virtual Status Join(lldb::thread_result_t *result) = 0;
+ virtual Status Cancel() = 0;
virtual bool IsJoinable() const;
virtual void Reset();
lldb::thread_t Release();
diff --git a/include/lldb/Host/HostProcess.h b/include/lldb/Host/HostProcess.h
index 56c3ddd9a1c2..dfc997bd81f7 100644
--- a/include/lldb/Host/HostProcess.h
+++ b/include/lldb/Host/HostProcess.h
@@ -40,8 +40,8 @@ public:
HostProcess(lldb::process_t process);
~HostProcess();
- Error Terminate();
- Error GetMainModule(FileSpec &file_spec) const;
+ Status Terminate();
+ Status GetMainModule(FileSpec &file_spec) const;
lldb::pid_t GetProcessId() const;
bool IsRunning() const;
diff --git a/include/lldb/Host/HostThread.h b/include/lldb/Host/HostThread.h
index 96314813cf7c..0d2fbe6045af 100644
--- a/include/lldb/Host/HostThread.h
+++ b/include/lldb/Host/HostThread.h
@@ -11,7 +11,7 @@
#define lldb_Host_HostThread_h_
#include "lldb/Host/HostNativeThreadForward.h"
-#include "lldb/Utility/Error.h"
+#include "lldb/Utility/Status.h"
#include "lldb/lldb-types.h"
#include <memory>
@@ -34,8 +34,8 @@ public:
HostThread();
HostThread(lldb::thread_t thread);
- Error Join(lldb::thread_result_t *result);
- Error Cancel();
+ Status Join(lldb::thread_result_t *result);
+ Status Cancel();
void Reset();
lldb::thread_t Release();
diff --git a/include/lldb/Host/IOObject.h b/include/lldb/Host/IOObject.h
index 90e0bcdcd9df..98ad5056de74 100644
--- a/include/lldb/Host/IOObject.h
+++ b/include/lldb/Host/IOObject.h
@@ -34,10 +34,10 @@ public:
: m_fd_type(type), m_should_close_fd(should_close) {}
virtual ~IOObject() {}
- virtual Error Read(void *buf, size_t &num_bytes) = 0;
- virtual Error Write(const void *buf, size_t &num_bytes) = 0;
+ virtual Status Read(void *buf, size_t &num_bytes) = 0;
+ virtual Status Write(const void *buf, size_t &num_bytes) = 0;
virtual bool IsValid() const = 0;
- virtual Error Close() = 0;
+ virtual Status Close() = 0;
FDType GetFdType() const { return m_fd_type; }
diff --git a/include/lldb/Host/LockFileBase.h b/include/lldb/Host/LockFileBase.h
index 74eafb279324..4eda1916c72e 100644
--- a/include/lldb/Host/LockFileBase.h
+++ b/include/lldb/Host/LockFileBase.h
@@ -10,7 +10,7 @@
#ifndef liblldb_Host_LockFileBase_h_
#define liblldb_Host_LockFileBase_h_
-#include "lldb/Utility/Error.h"
+#include "lldb/Utility/Status.h"
#include <functional>
@@ -22,30 +22,30 @@ public:
bool IsLocked() const;
- Error WriteLock(const uint64_t start, const uint64_t len);
- Error TryWriteLock(const uint64_t start, const uint64_t len);
+ Status WriteLock(const uint64_t start, const uint64_t len);
+ Status TryWriteLock(const uint64_t start, const uint64_t len);
- Error ReadLock(const uint64_t start, const uint64_t len);
- Error TryReadLock(const uint64_t start, const uint64_t len);
+ Status ReadLock(const uint64_t start, const uint64_t len);
+ Status TryReadLock(const uint64_t start, const uint64_t len);
- Error Unlock();
+ Status Unlock();
protected:
- using Locker = std::function<Error(const uint64_t, const uint64_t)>;
+ using Locker = std::function<Status(const uint64_t, const uint64_t)>;
LockFileBase(int fd);
virtual bool IsValidFile() const;
- virtual Error DoWriteLock(const uint64_t start, const uint64_t len) = 0;
- virtual Error DoTryWriteLock(const uint64_t start, const uint64_t len) = 0;
+ virtual Status DoWriteLock(const uint64_t start, const uint64_t len) = 0;
+ virtual Status DoTryWriteLock(const uint64_t start, const uint64_t len) = 0;
- virtual Error DoReadLock(const uint64_t start, const uint64_t len) = 0;
- virtual Error DoTryReadLock(const uint64_t start, const uint64_t len) = 0;
+ virtual Status DoReadLock(const uint64_t start, const uint64_t len) = 0;
+ virtual Status DoTryReadLock(const uint64_t start, const uint64_t len) = 0;
- virtual Error DoUnlock() = 0;
+ virtual Status DoUnlock() = 0;
- Error DoLock(const Locker &locker, const uint64_t start, const uint64_t len);
+ Status DoLock(const Locker &locker, const uint64_t start, const uint64_t len);
int m_fd; // not owned.
bool m_locked;
diff --git a/include/lldb/Host/MainLoop.h b/include/lldb/Host/MainLoop.h
index f5d906e98a7b..a722348b8843 100644
--- a/include/lldb/Host/MainLoop.h
+++ b/include/lldb/Host/MainLoop.h
@@ -47,7 +47,7 @@ public:
ReadHandleUP RegisterReadObject(const lldb::IOObjectSP &object_sp,
const Callback &callback,
- Error &error) override;
+ Status &error) override;
// Listening for signals from multiple MainLoop instances is perfectly safe as
// long as they don't try to listen for the same signal. The callback function
@@ -57,9 +57,9 @@ public:
// However, since the callback is not invoked synchronously, you cannot use
// this mechanism to handle SIGSEGV and the like.
SignalHandleUP RegisterSignal(int signo, const Callback &callback,
- Error &error);
+ Status &error);
- Error Run() override;
+ Status Run() override;
// This should only be performed from a callback. Do not attempt to terminate
// the processing from another thread.
diff --git a/include/lldb/Host/MainLoopBase.h b/include/lldb/Host/MainLoopBase.h
index b746a9cb208c..39ca9a0f0c9e 100644
--- a/include/lldb/Host/MainLoopBase.h
+++ b/include/lldb/Host/MainLoopBase.h
@@ -15,7 +15,7 @@
#include "llvm/Support/ErrorHandling.h"
#include "lldb/Host/IOObject.h"
-#include "lldb/Utility/Error.h"
+#include "lldb/Utility/Status.h"
namespace lldb_private {
@@ -49,14 +49,14 @@ public:
virtual ReadHandleUP RegisterReadObject(const lldb::IOObjectSP &object_sp,
const Callback &callback,
- Error &error) {
+ Status &error) {
llvm_unreachable("Not implemented");
}
// Waits for registered events and invoke the proper callbacks. Returns when
// all callbacks
// deregister themselves or when someone requests termination.
- virtual Error Run() { llvm_unreachable("Not implemented"); }
+ virtual Status Run() { llvm_unreachable("Not implemented"); }
// Requests the exit of the Run() function.
virtual void RequestTermination() { llvm_unreachable("Not implemented"); }
diff --git a/include/lldb/Host/MonitoringProcessLauncher.h b/include/lldb/Host/MonitoringProcessLauncher.h
index 7aa819a16c7c..9ad36e90a779 100644
--- a/include/lldb/Host/MonitoringProcessLauncher.h
+++ b/include/lldb/Host/MonitoringProcessLauncher.h
@@ -25,7 +25,7 @@ public:
std::unique_ptr<ProcessLauncher> delegate_launcher);
HostProcess LaunchProcess(const ProcessLaunchInfo &launch_info,
- Error &error) override;
+ Status &error) override;
private:
std::unique_ptr<ProcessLauncher> m_delegate_launcher;
diff --git a/include/lldb/Host/PipeBase.h b/include/lldb/Host/PipeBase.h
index f141b5d413a0..ad62072c7ba5 100644
--- a/include/lldb/Host/PipeBase.h
+++ b/include/lldb/Host/PipeBase.h
@@ -14,7 +14,7 @@
#include <chrono>
#include <string>
-#include "lldb/Utility/Error.h"
+#include "lldb/Utility/Status.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringRef.h"
@@ -23,17 +23,18 @@ class PipeBase {
public:
virtual ~PipeBase();
- virtual Error CreateNew(bool child_process_inherit) = 0;
- virtual Error CreateNew(llvm::StringRef name, bool child_process_inherit) = 0;
- virtual Error CreateWithUniqueName(llvm::StringRef prefix,
- bool child_process_inherit,
- llvm::SmallVectorImpl<char> &name) = 0;
+ virtual Status CreateNew(bool child_process_inherit) = 0;
+ virtual Status CreateNew(llvm::StringRef name,
+ bool child_process_inherit) = 0;
+ virtual Status CreateWithUniqueName(llvm::StringRef prefix,
+ bool child_process_inherit,
+ llvm::SmallVectorImpl<char> &name) = 0;
- virtual Error OpenAsReader(llvm::StringRef name,
- bool child_process_inherit) = 0;
+ virtual Status OpenAsReader(llvm::StringRef name,
+ bool child_process_inherit) = 0;
- Error OpenAsWriter(llvm::StringRef name, bool child_process_inherit);
- virtual Error
+ Status OpenAsWriter(llvm::StringRef name, bool child_process_inherit);
+ virtual Status
OpenAsWriterWithTimeout(llvm::StringRef name, bool child_process_inherit,
const std::chrono::microseconds &timeout) = 0;
@@ -51,13 +52,13 @@ public:
virtual void Close() = 0;
// Delete named pipe.
- virtual Error Delete(llvm::StringRef name) = 0;
+ virtual Status Delete(llvm::StringRef name) = 0;
- virtual Error Write(const void *buf, size_t size, size_t &bytes_written) = 0;
- virtual Error ReadWithTimeout(void *buf, size_t size,
- const std::chrono::microseconds &timeout,
- size_t &bytes_read) = 0;
- Error Read(void *buf, size_t size, size_t &bytes_read);
+ virtual Status Write(const void *buf, size_t size, size_t &bytes_written) = 0;
+ virtual Status ReadWithTimeout(void *buf, size_t size,
+ const std::chrono::microseconds &timeout,
+ size_t &bytes_read) = 0;
+ Status Read(void *buf, size_t size, size_t &bytes_read);
};
}
diff --git a/include/lldb/Host/ProcessLauncher.h b/include/lldb/Host/ProcessLauncher.h
index 12049a69b3da..49fa84113f6c 100644
--- a/include/lldb/Host/ProcessLauncher.h
+++ b/include/lldb/Host/ProcessLauncher.h
@@ -13,14 +13,14 @@
namespace lldb_private {
class ProcessLaunchInfo;
-class Error;
+class Status;
class HostProcess;
class ProcessLauncher {
public:
virtual ~ProcessLauncher() {}
virtual HostProcess LaunchProcess(const ProcessLaunchInfo &launch_info,
- Error &error) = 0;
+ Status &error) = 0;
};
}
diff --git a/include/lldb/Host/Socket.h b/include/lldb/Host/Socket.h
index 36d506281cf8..c4233a233a89 100644
--- a/include/lldb/Host/Socket.h
+++ b/include/lldb/Host/Socket.h
@@ -18,7 +18,7 @@
#include "lldb/Host/IOObject.h"
#include "lldb/Host/Predicate.h"
#include "lldb/Host/SocketAddress.h"
-#include "lldb/Utility/Error.h"
+#include "lldb/Utility/Status.h"
#ifdef _WIN32
#include "lldb/Host/windows/windows.h"
@@ -53,34 +53,35 @@ public:
static std::unique_ptr<Socket> Create(const SocketProtocol protocol,
bool child_processes_inherit,
- Error &error);
+ Status &error);
- virtual Error Connect(llvm::StringRef name) = 0;
- virtual Error Listen(llvm::StringRef name, int backlog) = 0;
- virtual Error Accept(Socket *&socket) = 0;
+ virtual Status Connect(llvm::StringRef name) = 0;
+ virtual Status Listen(llvm::StringRef name, int backlog) = 0;
+ virtual Status Accept(Socket *&socket) = 0;
// Initialize a Tcp Socket object in listening mode. listen and accept are
// implemented
// separately because the caller may wish to manipulate or query the socket
// after it is
// initialized, but before entering a blocking accept.
- static Error TcpListen(llvm::StringRef host_and_port,
- bool child_processes_inherit, Socket *&socket,
- Predicate<uint16_t> *predicate, int backlog = 5);
- static Error TcpConnect(llvm::StringRef host_and_port,
- bool child_processes_inherit, Socket *&socket);
- static Error UdpConnect(llvm::StringRef host_and_port,
- bool child_processes_inherit, Socket *&socket);
- static Error UnixDomainConnect(llvm::StringRef host_and_port,
+ static Status TcpListen(llvm::StringRef host_and_port,
+ bool child_processes_inherit, Socket *&socket,
+ Predicate<uint16_t> *predicate, int backlog = 5);
+ static Status TcpConnect(llvm::StringRef host_and_port,
+ bool child_processes_inherit, Socket *&socket);
+ static Status UdpConnect(llvm::StringRef host_and_port,
+ bool child_processes_inherit, Socket *&socket);
+ static Status UnixDomainConnect(llvm::StringRef host_and_port,
+ bool child_processes_inherit,
+ Socket *&socket);
+ static Status UnixDomainAccept(llvm::StringRef host_and_port,
bool child_processes_inherit, Socket *&socket);
- static Error UnixDomainAccept(llvm::StringRef host_and_port,
- bool child_processes_inherit, Socket *&socket);
- static Error UnixAbstractConnect(llvm::StringRef host_and_port,
+ static Status UnixAbstractConnect(llvm::StringRef host_and_port,
+ bool child_processes_inherit,
+ Socket *&socket);
+ static Status UnixAbstractAccept(llvm::StringRef host_and_port,
bool child_processes_inherit,
Socket *&socket);
- static Error UnixAbstractAccept(llvm::StringRef host_and_port,
- bool child_processes_inherit,
- Socket *&socket);
int GetOption(int level, int option_name, int &option_value);
int SetOption(int level, int option_name, int option_value);
@@ -88,18 +89,18 @@ public:
NativeSocket GetNativeSocket() const { return m_socket; }
SocketProtocol GetSocketProtocol() const { return m_protocol; }
- Error Read(void *buf, size_t &num_bytes) override;
- Error Write(const void *buf, size_t &num_bytes) override;
+ Status Read(void *buf, size_t &num_bytes) override;
+ Status Write(const void *buf, size_t &num_bytes) override;
- virtual Error PreDisconnect();
- Error Close() override;
+ virtual Status PreDisconnect();
+ Status Close() override;
bool IsValid() const override { return m_socket != kInvalidSocketValue; }
WaitableHandle GetWaitableHandle() override;
static bool DecodeHostAndPort(llvm::StringRef host_and_port,
std::string &host_str, std::string &port_str,
- int32_t &port, Error *error_ptr);
+ int32_t &port, Status *error_ptr);
protected:
Socket(SocketProtocol protocol, bool should_close,
@@ -107,13 +108,13 @@ protected:
virtual size_t Send(const void *buf, const size_t num_bytes);
- static void SetLastError(Error &error);
+ static void SetLastError(Status &error);
static NativeSocket CreateSocket(const int domain, const int type,
const int protocol,
- bool child_processes_inherit, Error &error);
+ bool child_processes_inherit, Status &error);
static NativeSocket AcceptSocket(NativeSocket sockfd, struct sockaddr *addr,
socklen_t *addrlen,
- bool child_processes_inherit, Error &error);
+ bool child_processes_inherit, Status &error);
SocketProtocol m_protocol;
NativeSocket m_socket;
diff --git a/include/lldb/Host/ThreadLauncher.h b/include/lldb/Host/ThreadLauncher.h
index 4e388ca6bb9c..b50f0e2c2c43 100644
--- a/include/lldb/Host/ThreadLauncher.h
+++ b/include/lldb/Host/ThreadLauncher.h
@@ -12,7 +12,7 @@
#define lldb_Host_ThreadLauncher_h_
#include "lldb/Host/HostThread.h"
-#include "lldb/Utility/Error.h"
+#include "lldb/Utility/Status.h"
#include "lldb/lldb-types.h"
#include "llvm/ADT/StringRef.h"
@@ -23,7 +23,7 @@ class ThreadLauncher {
public:
static HostThread
LaunchThread(llvm::StringRef name, lldb::thread_func_t thread_function,
- lldb::thread_arg_t thread_arg, Error *error_ptr,
+ lldb::thread_arg_t thread_arg, Status *error_ptr,
size_t min_stack_byte_size = 0); // Minimum stack size in bytes,
// set stack size to zero for
// default platform thread stack
diff --git a/include/lldb/Host/common/NativeBreakpoint.h b/include/lldb/Host/common/NativeBreakpoint.h
index 2f872e1d5a52..73639d64c9e8 100644
--- a/include/lldb/Host/common/NativeBreakpoint.h
+++ b/include/lldb/Host/common/NativeBreakpoint.h
@@ -24,9 +24,9 @@ public:
virtual ~NativeBreakpoint();
- Error Enable();
+ Status Enable();
- Error Disable();
+ Status Disable();
lldb::addr_t GetAddress() const { return m_addr; }
@@ -38,9 +38,9 @@ protected:
const lldb::addr_t m_addr;
int32_t m_ref_count;
- virtual Error DoEnable() = 0;
+ virtual Status DoEnable() = 0;
- virtual Error DoDisable() = 0;
+ virtual Status DoDisable() = 0;
private:
bool m_enabled;
diff --git a/include/lldb/Host/common/NativeBreakpointList.h b/include/lldb/Host/common/NativeBreakpointList.h
index 1d314e02b1d5..ffa659fdd869 100644
--- a/include/lldb/Host/common/NativeBreakpointList.h
+++ b/include/lldb/Host/common/NativeBreakpointList.h
@@ -10,7 +10,7 @@
#ifndef liblldb_NativeBreakpointList_h_
#define liblldb_NativeBreakpointList_h_
-#include "lldb/Utility/Error.h"
+#include "lldb/Utility/Status.h"
#include "lldb/lldb-private-forward.h"
// #include "lldb/Host/NativeBreakpoint.h"
@@ -29,24 +29,25 @@ using HardwareBreakpointMap = std::map<lldb::addr_t, HardwareBreakpoint>;
class NativeBreakpointList {
public:
- typedef std::function<Error(lldb::addr_t addr, size_t size_hint,
- bool hardware, NativeBreakpointSP &breakpoint_sp)>
+ typedef std::function<Status(lldb::addr_t addr, size_t size_hint,
+ bool hardware,
+ NativeBreakpointSP &breakpoint_sp)>
CreateBreakpointFunc;
NativeBreakpointList();
- Error AddRef(lldb::addr_t addr, size_t size_hint, bool hardware,
- CreateBreakpointFunc create_func);
+ Status AddRef(lldb::addr_t addr, size_t size_hint, bool hardware,
+ CreateBreakpointFunc create_func);
- Error DecRef(lldb::addr_t addr);
+ Status DecRef(lldb::addr_t addr);
- Error EnableBreakpoint(lldb::addr_t addr);
+ Status EnableBreakpoint(lldb::addr_t addr);
- Error DisableBreakpoint(lldb::addr_t addr);
+ Status DisableBreakpoint(lldb::addr_t addr);
- Error GetBreakpoint(lldb::addr_t addr, NativeBreakpointSP &breakpoint_sp);
+ Status GetBreakpoint(lldb::addr_t addr, NativeBreakpointSP &breakpoint_sp);
- Error RemoveTrapsFromBuffer(lldb::addr_t addr, void *buf, size_t size) const;
+ Status RemoveTrapsFromBuffer(lldb::addr_t addr, void *buf, size_t size) const;
private:
typedef std::map<lldb::addr_t, NativeBreakpointSP> BreakpointMap;
diff --git a/include/lldb/Host/common/NativeProcessProtocol.h b/include/lldb/Host/common/NativeProcessProtocol.h
index 7ad09d41eacf..388edef0578d 100644
--- a/include/lldb/Host/common/NativeProcessProtocol.h
+++ b/include/lldb/Host/common/NativeProcessProtocol.h
@@ -11,7 +11,7 @@
#define liblldb_NativeProcessProtocol_h_
#include "lldb/Host/MainLoop.h"
-#include "lldb/Utility/Error.h"
+#include "lldb/Utility/Status.h"
#include "lldb/lldb-private-forward.h"
#include "lldb/lldb-types.h"
#include "llvm/ADT/ArrayRef.h"
@@ -37,11 +37,11 @@ class NativeProcessProtocol
public:
virtual ~NativeProcessProtocol() {}
- virtual Error Resume(const ResumeActionList &resume_actions) = 0;
+ virtual Status Resume(const ResumeActionList &resume_actions) = 0;
- virtual Error Halt() = 0;
+ virtual Status Halt() = 0;
- virtual Error Detach() = 0;
+ virtual Status Detach() = 0;
//------------------------------------------------------------------
/// Sends a process a UNIX signal \a signal.
@@ -49,7 +49,7 @@ public:
/// @return
/// Returns an error object.
//------------------------------------------------------------------
- virtual Error Signal(int signo) = 0;
+ virtual Status Signal(int signo) = 0;
//------------------------------------------------------------------
/// Tells a process to interrupt all operations as if by a Ctrl-C.
@@ -61,36 +61,36 @@ public:
/// @return
/// Returns an error object.
//------------------------------------------------------------------
- virtual Error Interrupt();
+ virtual Status Interrupt();
- virtual Error Kill() = 0;
+ virtual Status Kill() = 0;
//------------------------------------------------------------------
// Tells a process not to stop the inferior on given signals
// and just reinject them back.
//------------------------------------------------------------------
- virtual Error IgnoreSignals(llvm::ArrayRef<int> signals);
+ virtual Status IgnoreSignals(llvm::ArrayRef<int> signals);
//----------------------------------------------------------------------
// Memory and memory region functions
//----------------------------------------------------------------------
- virtual Error GetMemoryRegionInfo(lldb::addr_t load_addr,
- MemoryRegionInfo &range_info);
+ virtual Status GetMemoryRegionInfo(lldb::addr_t load_addr,
+ MemoryRegionInfo &range_info);
- virtual Error ReadMemory(lldb::addr_t addr, void *buf, size_t size,
- size_t &bytes_read) = 0;
+ virtual Status ReadMemory(lldb::addr_t addr, void *buf, size_t size,
+ size_t &bytes_read) = 0;
- virtual Error ReadMemoryWithoutTrap(lldb::addr_t addr, void *buf, size_t size,
- size_t &bytes_read) = 0;
+ virtual Status ReadMemoryWithoutTrap(lldb::addr_t addr, void *buf,
+ size_t size, size_t &bytes_read) = 0;
- virtual Error WriteMemory(lldb::addr_t addr, const void *buf, size_t size,
- size_t &bytes_written) = 0;
+ virtual Status WriteMemory(lldb::addr_t addr, const void *buf, size_t size,
+ size_t &bytes_written) = 0;
- virtual Error AllocateMemory(size_t size, uint32_t permissions,
- lldb::addr_t &addr) = 0;
+ virtual Status AllocateMemory(size_t size, uint32_t permissions,
+ lldb::addr_t &addr) = 0;
- virtual Error DeallocateMemory(lldb::addr_t addr) = 0;
+ virtual Status DeallocateMemory(lldb::addr_t addr) = 0;
virtual lldb::addr_t GetSharedLibraryInfoAddress() = 0;
@@ -103,23 +103,23 @@ public:
//----------------------------------------------------------------------
// Breakpoint functions
//----------------------------------------------------------------------
- virtual Error SetBreakpoint(lldb::addr_t addr, uint32_t size,
- bool hardware) = 0;
+ virtual Status SetBreakpoint(lldb::addr_t addr, uint32_t size,
+ bool hardware) = 0;
- virtual Error RemoveBreakpoint(lldb::addr_t addr, bool hardware = false);
+ virtual Status RemoveBreakpoint(lldb::addr_t addr, bool hardware = false);
- virtual Error EnableBreakpoint(lldb::addr_t addr);
+ virtual Status EnableBreakpoint(lldb::addr_t addr);
- virtual Error DisableBreakpoint(lldb::addr_t addr);
+ virtual Status DisableBreakpoint(lldb::addr_t addr);
//----------------------------------------------------------------------
// Hardware Breakpoint functions
//----------------------------------------------------------------------
virtual const HardwareBreakpointMap &GetHardwareBreakpointMap() const;
- virtual Error SetHardwareBreakpoint(lldb::addr_t addr, size_t size);
+ virtual Status SetHardwareBreakpoint(lldb::addr_t addr, size_t size);
- virtual Error RemoveHardwareBreakpoint(lldb::addr_t addr);
+ virtual Status RemoveHardwareBreakpoint(lldb::addr_t addr);
//----------------------------------------------------------------------
// Watchpoint functions
@@ -129,10 +129,10 @@ public:
virtual llvm::Optional<std::pair<uint32_t, uint32_t>>
GetHardwareDebugSupportInfo() const;
- virtual Error SetWatchpoint(lldb::addr_t addr, size_t size,
- uint32_t watch_flags, bool hardware);
+ virtual Status SetWatchpoint(lldb::addr_t addr, size_t size,
+ uint32_t watch_flags, bool hardware);
- virtual Error RemoveWatchpoint(lldb::addr_t addr);
+ virtual Status RemoveWatchpoint(lldb::addr_t addr);
//----------------------------------------------------------------------
// Accessors
@@ -239,11 +239,11 @@ public:
//------------------------------------------------------------------
bool UnregisterNativeDelegate(NativeDelegate &native_delegate);
- virtual Error GetLoadedModuleFileSpec(const char *module_path,
- FileSpec &file_spec) = 0;
+ virtual Status GetLoadedModuleFileSpec(const char *module_path,
+ FileSpec &file_spec) = 0;
- virtual Error GetFileLoadAddress(const llvm::StringRef &file_name,
- lldb::addr_t &load_addr) = 0;
+ virtual Status GetFileLoadAddress(const llvm::StringRef &file_name,
+ lldb::addr_t &load_addr) = 0;
//------------------------------------------------------------------
/// Launch a process for debugging. This method will create an concrete
@@ -273,9 +273,9 @@ public:
/// An error object indicating if the operation succeeded,
/// and if not, what error occurred.
//------------------------------------------------------------------
- static Error Launch(ProcessLaunchInfo &launch_info,
- NativeDelegate &native_delegate, MainLoop &mainloop,
- NativeProcessProtocolSP &process_sp);
+ static Status Launch(ProcessLaunchInfo &launch_info,
+ NativeDelegate &native_delegate, MainLoop &mainloop,
+ NativeProcessProtocolSP &process_sp);
//------------------------------------------------------------------
/// Attach to an existing process. This method will create an concrete
@@ -305,8 +305,8 @@ public:
/// An error object indicating if the operation succeeded,
/// and if not, what error occurred.
//------------------------------------------------------------------
- static Error Attach(lldb::pid_t pid, NativeDelegate &native_delegate,
- MainLoop &mainloop, NativeProcessProtocolSP &process_sp);
+ static Status Attach(lldb::pid_t pid, NativeDelegate &native_delegate,
+ MainLoop &mainloop, NativeProcessProtocolSP &process_sp);
protected:
lldb::pid_t m_pid;
@@ -356,9 +356,9 @@ protected:
// -----------------------------------------------------------
// Internal interface for software breakpoints
// -----------------------------------------------------------
- Error SetSoftwareBreakpoint(lldb::addr_t addr, uint32_t size_hint);
+ Status SetSoftwareBreakpoint(lldb::addr_t addr, uint32_t size_hint);
- virtual Error
+ virtual Status
GetSoftwareBreakpointTrapOpcode(size_t trap_opcode_size_hint,
size_t &actual_opcode_size,
const uint8_t *&trap_opcode_bytes) = 0;
@@ -376,7 +376,7 @@ protected:
// -----------------------------------------------------------
// Static helper methods for derived classes.
// -----------------------------------------------------------
- static Error ResolveProcessArchitecture(lldb::pid_t pid, ArchSpec &arch);
+ static Status ResolveProcessArchitecture(lldb::pid_t pid, ArchSpec &arch);
private:
void SynchronouslyNotifyProcessStateChanged(lldb::StateType state);
diff --git a/include/lldb/Host/common/NativeRegisterContext.h b/include/lldb/Host/common/NativeRegisterContext.h
index 1d8b51c60cc4..982d81b9ac4c 100644
--- a/include/lldb/Host/common/NativeRegisterContext.h
+++ b/include/lldb/Host/common/NativeRegisterContext.h
@@ -53,15 +53,15 @@ public:
virtual const RegisterSet *GetRegisterSet(uint32_t set_index) const = 0;
- virtual Error ReadRegister(const RegisterInfo *reg_info,
- RegisterValue &reg_value) = 0;
+ virtual Status ReadRegister(const RegisterInfo *reg_info,
+ RegisterValue &reg_value) = 0;
- virtual Error WriteRegister(const RegisterInfo *reg_info,
- const RegisterValue &reg_value) = 0;
+ virtual Status WriteRegister(const RegisterInfo *reg_info,
+ const RegisterValue &reg_value) = 0;
- virtual Error ReadAllRegisterValues(lldb::DataBufferSP &data_sp) = 0;
+ virtual Status ReadAllRegisterValues(lldb::DataBufferSP &data_sp) = 0;
- virtual Error WriteAllRegisterValues(const lldb::DataBufferSP &data_sp) = 0;
+ virtual Status WriteAllRegisterValues(const lldb::DataBufferSP &data_sp) = 0;
uint32_t ConvertRegisterKindToRegisterNumber(uint32_t kind,
uint32_t num) const;
@@ -75,10 +75,10 @@ public:
virtual bool ClearHardwareBreakpoint(uint32_t hw_idx);
- virtual Error ClearAllHardwareBreakpoints();
+ virtual Status ClearAllHardwareBreakpoints();
- virtual Error GetHardwareBreakHitIndex(uint32_t &bp_index,
- lldb::addr_t trap_addr);
+ virtual Status GetHardwareBreakHitIndex(uint32_t &bp_index,
+ lldb::addr_t trap_addr);
virtual uint32_t NumSupportedHardwareWatchpoints();
@@ -87,14 +87,14 @@ public:
virtual bool ClearHardwareWatchpoint(uint32_t hw_index);
- virtual Error ClearAllHardwareWatchpoints();
+ virtual Status ClearAllHardwareWatchpoints();
- virtual Error IsWatchpointHit(uint32_t wp_index, bool &is_hit);
+ virtual Status IsWatchpointHit(uint32_t wp_index, bool &is_hit);
- virtual Error GetWatchpointHitIndex(uint32_t &wp_index,
- lldb::addr_t trap_addr);
+ virtual Status GetWatchpointHitIndex(uint32_t &wp_index,
+ lldb::addr_t trap_addr);
- virtual Error IsWatchpointVacant(uint32_t wp_index, bool &is_vacant);
+ virtual Status IsWatchpointVacant(uint32_t wp_index, bool &is_vacant);
virtual lldb::addr_t GetWatchpointAddress(uint32_t wp_index);
@@ -114,12 +114,12 @@ public:
virtual bool HardwareSingleStep(bool enable);
- virtual Error
+ virtual Status
ReadRegisterValueFromMemory(const lldb_private::RegisterInfo *reg_info,
lldb::addr_t src_addr, size_t src_len,
RegisterValue &reg_value);
- virtual Error
+ virtual Status
WriteRegisterValueToMemory(const lldb_private::RegisterInfo *reg_info,
lldb::addr_t dst_addr, size_t dst_len,
const RegisterValue &reg_value);
@@ -141,15 +141,15 @@ public:
virtual lldb::addr_t
GetPCfromBreakpointLocation(lldb::addr_t fail_value = LLDB_INVALID_ADDRESS);
- Error SetPC(lldb::addr_t pc);
+ Status SetPC(lldb::addr_t pc);
lldb::addr_t GetSP(lldb::addr_t fail_value = LLDB_INVALID_ADDRESS);
- Error SetSP(lldb::addr_t sp);
+ Status SetSP(lldb::addr_t sp);
lldb::addr_t GetFP(lldb::addr_t fail_value = LLDB_INVALID_ADDRESS);
- Error SetFP(lldb::addr_t fp);
+ Status SetFP(lldb::addr_t fp);
const char *GetRegisterName(uint32_t reg);
@@ -162,9 +162,9 @@ public:
lldb::addr_t ReadRegisterAsUnsigned(const RegisterInfo *reg_info,
lldb::addr_t fail_value);
- Error WriteRegisterFromUnsigned(uint32_t reg, uint64_t uval);
+ Status WriteRegisterFromUnsigned(uint32_t reg, uint64_t uval);
- Error WriteRegisterFromUnsigned(const RegisterInfo *reg_info, uint64_t uval);
+ Status WriteRegisterFromUnsigned(const RegisterInfo *reg_info, uint64_t uval);
// uint32_t
// GetStopID () const
diff --git a/include/lldb/Host/common/NativeThreadProtocol.h b/include/lldb/Host/common/NativeThreadProtocol.h
index 8f26616a2b4a..2e6c96a34cf5 100644
--- a/include/lldb/Host/common/NativeThreadProtocol.h
+++ b/include/lldb/Host/common/NativeThreadProtocol.h
@@ -33,13 +33,13 @@ public:
virtual NativeRegisterContextSP GetRegisterContext() = 0;
- virtual Error ReadRegister(uint32_t reg, RegisterValue &reg_value);
+ virtual Status ReadRegister(uint32_t reg, RegisterValue &reg_value);
- virtual Error WriteRegister(uint32_t reg, const RegisterValue &reg_value);
+ virtual Status WriteRegister(uint32_t reg, const RegisterValue &reg_value);
- virtual Error SaveAllRegisters(lldb::DataBufferSP &data_sp);
+ virtual Status SaveAllRegisters(lldb::DataBufferSP &data_sp);
- virtual Error RestoreAllRegisters(lldb::DataBufferSP &data_sp);
+ virtual Status RestoreAllRegisters(lldb::DataBufferSP &data_sp);
virtual bool GetStopReason(ThreadStopInfo &stop_info,
std::string &description) = 0;
@@ -51,17 +51,17 @@ public:
// ---------------------------------------------------------------------
// Thread-specific watchpoints
// ---------------------------------------------------------------------
- virtual Error SetWatchpoint(lldb::addr_t addr, size_t size,
- uint32_t watch_flags, bool hardware) = 0;
+ virtual Status SetWatchpoint(lldb::addr_t addr, size_t size,
+ uint32_t watch_flags, bool hardware) = 0;
- virtual Error RemoveWatchpoint(lldb::addr_t addr) = 0;
+ virtual Status RemoveWatchpoint(lldb::addr_t addr) = 0;
// ---------------------------------------------------------------------
// Thread-specific Hardware Breakpoint routines
// ---------------------------------------------------------------------
- virtual Error SetHardwareBreakpoint(lldb::addr_t addr, size_t size) = 0;
+ virtual Status SetHardwareBreakpoint(lldb::addr_t addr, size_t size) = 0;
- virtual Error RemoveHardwareBreakpoint(lldb::addr_t addr) = 0;
+ virtual Status RemoveHardwareBreakpoint(lldb::addr_t addr) = 0;
protected:
NativeProcessProtocolWP m_process_wp;
diff --git a/include/lldb/Host/common/NativeWatchpointList.h b/include/lldb/Host/common/NativeWatchpointList.h
index ae3476f5f07e..02920e6faacb 100644
--- a/include/lldb/Host/common/NativeWatchpointList.h
+++ b/include/lldb/Host/common/NativeWatchpointList.h
@@ -10,7 +10,7 @@
#ifndef liblldb_NativeWatchpointList_h_
#define liblldb_NativeWatchpointList_h_
-#include "lldb/Utility/Error.h"
+#include "lldb/Utility/Status.h"
#include "lldb/lldb-private-forward.h"
#include <map>
@@ -25,10 +25,10 @@ struct NativeWatchpoint {
class NativeWatchpointList {
public:
- Error Add(lldb::addr_t addr, size_t size, uint32_t watch_flags,
- bool hardware);
+ Status Add(lldb::addr_t addr, size_t size, uint32_t watch_flags,
+ bool hardware);
- Error Remove(lldb::addr_t addr);
+ Status Remove(lldb::addr_t addr);
using WatchpointMap = std::map<lldb::addr_t, NativeWatchpoint>;
diff --git a/include/lldb/Host/common/SoftwareBreakpoint.h b/include/lldb/Host/common/SoftwareBreakpoint.h
index 703f6bb95d48..e0f235fecd93 100644
--- a/include/lldb/Host/common/SoftwareBreakpoint.h
+++ b/include/lldb/Host/common/SoftwareBreakpoint.h
@@ -18,18 +18,18 @@ class SoftwareBreakpoint : public NativeBreakpoint {
friend class NativeBreakpointList;
public:
- static Error CreateSoftwareBreakpoint(NativeProcessProtocol &process,
- lldb::addr_t addr, size_t size_hint,
- NativeBreakpointSP &breakpoint_spn);
+ static Status CreateSoftwareBreakpoint(NativeProcessProtocol &process,
+ lldb::addr_t addr, size_t size_hint,
+ NativeBreakpointSP &breakpoint_spn);
SoftwareBreakpoint(NativeProcessProtocol &process, lldb::addr_t addr,
const uint8_t *saved_opcodes, const uint8_t *trap_opcodes,
size_t opcode_size);
protected:
- Error DoEnable() override;
+ Status DoEnable() override;
- Error DoDisable() override;
+ Status DoDisable() override;
bool IsSoftwareBreakpoint() const override;
@@ -42,11 +42,11 @@ private:
uint8_t m_trap_opcodes[MAX_TRAP_OPCODE_SIZE];
const size_t m_opcode_size;
- static Error EnableSoftwareBreakpoint(NativeProcessProtocol &process,
- lldb::addr_t addr,
- size_t bp_opcode_size,
- const uint8_t *bp_opcode_bytes,
- uint8_t *saved_opcode_bytes);
+ static Status EnableSoftwareBreakpoint(NativeProcessProtocol &process,
+ lldb::addr_t addr,
+ size_t bp_opcode_size,
+ const uint8_t *bp_opcode_bytes,
+ uint8_t *saved_opcode_bytes);
};
}
diff --git a/include/lldb/Host/common/TCPSocket.h b/include/lldb/Host/common/TCPSocket.h
index 5b72f344019f..0d32a70fd381 100644
--- a/include/lldb/Host/common/TCPSocket.h
+++ b/include/lldb/Host/common/TCPSocket.h
@@ -39,11 +39,11 @@ public:
int SetOptionNoDelay();
int SetOptionReuseAddress();
- Error Connect(llvm::StringRef name) override;
- Error Listen(llvm::StringRef name, int backlog) override;
- Error Accept(Socket *&conn_socket) override;
+ Status Connect(llvm::StringRef name) override;
+ Status Listen(llvm::StringRef name, int backlog) override;
+ Status Accept(Socket *&conn_socket) override;
- Error CreateSocket(int domain);
+ Status CreateSocket(int domain);
bool IsValid() const override;
diff --git a/include/lldb/Host/common/UDPSocket.h b/include/lldb/Host/common/UDPSocket.h
index 977ce151e4ff..27b2d1dc9834 100644
--- a/include/lldb/Host/common/UDPSocket.h
+++ b/include/lldb/Host/common/UDPSocket.h
@@ -17,16 +17,16 @@ class UDPSocket : public Socket {
public:
UDPSocket(bool should_close, bool child_processes_inherit);
- static Error Connect(llvm::StringRef name, bool child_processes_inherit,
- Socket *&socket);
+ static Status Connect(llvm::StringRef name, bool child_processes_inherit,
+ Socket *&socket);
private:
UDPSocket(NativeSocket socket);
size_t Send(const void *buf, const size_t num_bytes) override;
- Error Connect(llvm::StringRef name) override;
- Error Listen(llvm::StringRef name, int backlog) override;
- Error Accept(Socket *&socket) override;
+ Status Connect(llvm::StringRef name) override;
+ Status Listen(llvm::StringRef name, int backlog) override;
+ Status Accept(Socket *&socket) override;
SocketAddress m_sockaddr;
};
diff --git a/include/lldb/Host/posix/ConnectionFileDescriptorPosix.h b/include/lldb/Host/posix/ConnectionFileDescriptorPosix.h
index f002dd167ce2..f57c93684002 100644
--- a/include/lldb/Host/posix/ConnectionFileDescriptorPosix.h
+++ b/include/lldb/Host/posix/ConnectionFileDescriptorPosix.h
@@ -26,7 +26,7 @@
namespace lldb_private {
-class Error;
+class Status;
class Socket;
class SocketAddress;
@@ -53,20 +53,20 @@ public:
bool IsConnected() const override;
- lldb::ConnectionStatus Connect(llvm::StringRef s, Error *error_ptr) override;
+ lldb::ConnectionStatus Connect(llvm::StringRef s, Status *error_ptr) override;
- lldb::ConnectionStatus Disconnect(Error *error_ptr) override;
+ lldb::ConnectionStatus Disconnect(Status *error_ptr) override;
size_t Read(void *dst, size_t dst_len, const Timeout<std::micro> &timeout,
- lldb::ConnectionStatus &status, Error *error_ptr) override;
+ lldb::ConnectionStatus &status, Status *error_ptr) override;
size_t Write(const void *src, size_t src_len, lldb::ConnectionStatus &status,
- Error *error_ptr) override;
+ Status *error_ptr) override;
std::string GetURI() override;
lldb::ConnectionStatus BytesAvailable(const Timeout<std::micro> &timeout,
- Error *error_ptr);
+ Status *error_ptr);
bool InterruptRead() override;
@@ -83,21 +83,21 @@ protected:
void CloseCommandPipe();
lldb::ConnectionStatus SocketListenAndAccept(llvm::StringRef host_and_port,
- Error *error_ptr);
+ Status *error_ptr);
lldb::ConnectionStatus ConnectTCP(llvm::StringRef host_and_port,
- Error *error_ptr);
+ Status *error_ptr);
- lldb::ConnectionStatus ConnectUDP(llvm::StringRef args, Error *error_ptr);
+ lldb::ConnectionStatus ConnectUDP(llvm::StringRef args, Status *error_ptr);
lldb::ConnectionStatus NamedSocketConnect(llvm::StringRef socket_name,
- Error *error_ptr);
+ Status *error_ptr);
lldb::ConnectionStatus NamedSocketAccept(llvm::StringRef socket_name,
- Error *error_ptr);
+ Status *error_ptr);
lldb::ConnectionStatus UnixAbstractSocketConnect(llvm::StringRef socket_name,
- Error *error_ptr);
+ Status *error_ptr);
lldb::IOObjectSP m_read_sp;
lldb::IOObjectSP m_write_sp;
diff --git a/include/lldb/Host/posix/DomainSocket.h b/include/lldb/Host/posix/DomainSocket.h
index 78a3dc89828a..e66b3f971faf 100644
--- a/include/lldb/Host/posix/DomainSocket.h
+++ b/include/lldb/Host/posix/DomainSocket.h
@@ -17,9 +17,9 @@ class DomainSocket : public Socket {
public:
DomainSocket(bool should_close, bool child_processes_inherit);
- Error Connect(llvm::StringRef name) override;
- Error Listen(llvm::StringRef name, int backlog) override;
- Error Accept(Socket *&socket) override;
+ Status Connect(llvm::StringRef name) override;
+ Status Listen(llvm::StringRef name, int backlog) override;
+ Status Accept(Socket *&socket) override;
protected:
DomainSocket(SocketProtocol protocol, bool child_processes_inherit);
diff --git a/include/lldb/Host/posix/HostProcessPosix.h b/include/lldb/Host/posix/HostProcessPosix.h
index aed3cccef2e2..0a6d8822d44f 100644
--- a/include/lldb/Host/posix/HostProcessPosix.h
+++ b/include/lldb/Host/posix/HostProcessPosix.h
@@ -15,7 +15,7 @@
// Other libraries and framework includes
// Project includes
#include "lldb/Host/HostNativeProcessBase.h"
-#include "lldb/Utility/Error.h"
+#include "lldb/Utility/Status.h"
#include "lldb/lldb-types.h"
namespace lldb_private {
@@ -28,11 +28,11 @@ public:
HostProcessPosix(lldb::process_t process);
~HostProcessPosix() override;
- virtual Error Signal(int signo) const;
- static Error Signal(lldb::process_t process, int signo);
+ virtual Status Signal(int signo) const;
+ static Status Signal(lldb::process_t process, int signo);
- Error Terminate() override;
- Error GetMainModule(FileSpec &file_spec) const override;
+ Status Terminate() override;
+ Status GetMainModule(FileSpec &file_spec) const override;
lldb::pid_t GetProcessId() const override;
bool IsRunning() const override;
diff --git a/include/lldb/Host/posix/HostThreadPosix.h b/include/lldb/Host/posix/HostThreadPosix.h
index 99b99d767b18..c230a61bc575 100644
--- a/include/lldb/Host/posix/HostThreadPosix.h
+++ b/include/lldb/Host/posix/HostThreadPosix.h
@@ -22,10 +22,10 @@ public:
HostThreadPosix(lldb::thread_t thread);
~HostThreadPosix() override;
- Error Join(lldb::thread_result_t *result) override;
- Error Cancel() override;
+ Status Join(lldb::thread_result_t *result) override;
+ Status Cancel() override;
- Error Detach();
+ Status Detach();
};
} // namespace lldb_private
diff --git a/include/lldb/Host/posix/LockFilePosix.h b/include/lldb/Host/posix/LockFilePosix.h
index dde9bd0eefe6..a59a7fe3e729 100644
--- a/include/lldb/Host/posix/LockFilePosix.h
+++ b/include/lldb/Host/posix/LockFilePosix.h
@@ -20,15 +20,15 @@ public:
~LockFilePosix() override;
protected:
- Error DoWriteLock(const uint64_t start, const uint64_t len) override;
+ Status DoWriteLock(const uint64_t start, const uint64_t len) override;
- Error DoTryWriteLock(const uint64_t start, const uint64_t len) override;
+ Status DoTryWriteLock(const uint64_t start, const uint64_t len) override;
- Error DoReadLock(const uint64_t start, const uint64_t len) override;
+ Status DoReadLock(const uint64_t start, const uint64_t len) override;
- Error DoTryReadLock(const uint64_t start, const uint64_t len) override;
+ Status DoTryReadLock(const uint64_t start, const uint64_t len) override;
- Error DoUnlock() override;
+ Status DoUnlock() override;
};
} // namespace lldb_private
diff --git a/include/lldb/Host/posix/PipePosix.h b/include/lldb/Host/posix/PipePosix.h
index 738f95ed0db8..8208b1b8bd6b 100644
--- a/include/lldb/Host/posix/PipePosix.h
+++ b/include/lldb/Host/posix/PipePosix.h
@@ -35,12 +35,14 @@ public:
~PipePosix() override;
- Error CreateNew(bool child_process_inherit) override;
- Error CreateNew(llvm::StringRef name, bool child_process_inherit) override;
- Error CreateWithUniqueName(llvm::StringRef prefix, bool child_process_inherit,
- llvm::SmallVectorImpl<char> &name) override;
- Error OpenAsReader(llvm::StringRef name, bool child_process_inherit) override;
- Error
+ Status CreateNew(bool child_process_inherit) override;
+ Status CreateNew(llvm::StringRef name, bool child_process_inherit) override;
+ Status CreateWithUniqueName(llvm::StringRef prefix,
+ bool child_process_inherit,
+ llvm::SmallVectorImpl<char> &name) override;
+ Status OpenAsReader(llvm::StringRef name,
+ bool child_process_inherit) override;
+ Status
OpenAsWriterWithTimeout(llvm::StringRef name, bool child_process_inherit,
const std::chrono::microseconds &timeout) override;
@@ -57,12 +59,12 @@ public:
// Close both descriptors
void Close() override;
- Error Delete(llvm::StringRef name) override;
+ Status Delete(llvm::StringRef name) override;
- Error Write(const void *buf, size_t size, size_t &bytes_written) override;
- Error ReadWithTimeout(void *buf, size_t size,
- const std::chrono::microseconds &timeout,
- size_t &bytes_read) override;
+ Status Write(const void *buf, size_t size, size_t &bytes_written) override;
+ Status ReadWithTimeout(void *buf, size_t size,
+ const std::chrono::microseconds &timeout,
+ size_t &bytes_read) override;
private:
int m_fds[2];
diff --git a/include/lldb/Host/posix/ProcessLauncherPosix.h b/include/lldb/Host/posix/ProcessLauncherPosix.h
index e481e3dc7ea9..4800c4066049 100644
--- a/include/lldb/Host/posix/ProcessLauncherPosix.h
+++ b/include/lldb/Host/posix/ProcessLauncherPosix.h
@@ -17,7 +17,7 @@ namespace lldb_private {
class ProcessLauncherPosix : public ProcessLauncher {
public:
HostProcess LaunchProcess(const ProcessLaunchInfo &launch_info,
- Error &error) override;
+ Status &error) override;
};
}
diff --git a/include/lldb/Host/posix/ProcessLauncherPosixFork.h b/include/lldb/Host/posix/ProcessLauncherPosixFork.h
index 77bdab535c1b..1193a20b4d36 100644
--- a/include/lldb/Host/posix/ProcessLauncherPosixFork.h
+++ b/include/lldb/Host/posix/ProcessLauncherPosixFork.h
@@ -17,7 +17,7 @@ namespace lldb_private {
class ProcessLauncherPosixFork : public ProcessLauncher {
public:
HostProcess LaunchProcess(const ProcessLaunchInfo &launch_info,
- Error &error) override;
+ Status &error) override;
};
} // end of namespace lldb_private
diff --git a/include/lldb/Host/windows/ConnectionGenericFileWindows.h b/include/lldb/Host/windows/ConnectionGenericFileWindows.h
index 4a5a3858a826..9309288b8c0a 100644
--- a/include/lldb/Host/windows/ConnectionGenericFileWindows.h
+++ b/include/lldb/Host/windows/ConnectionGenericFileWindows.h
@@ -16,7 +16,7 @@
namespace lldb_private {
-class Error;
+class Status;
class ConnectionGenericFile : public lldb_private::Connection {
public:
@@ -28,15 +28,15 @@ public:
bool IsConnected() const override;
- lldb::ConnectionStatus Connect(llvm::StringRef s, Error *error_ptr) override;
+ lldb::ConnectionStatus Connect(llvm::StringRef s, Status *error_ptr) override;
- lldb::ConnectionStatus Disconnect(Error *error_ptr) override;
+ lldb::ConnectionStatus Disconnect(Status *error_ptr) override;
size_t Read(void *dst, size_t dst_len, const Timeout<std::micro> &timeout,
- lldb::ConnectionStatus &status, Error *error_ptr) override;
+ lldb::ConnectionStatus &status, Status *error_ptr) override;
size_t Write(const void *src, size_t src_len, lldb::ConnectionStatus &status,
- Error *error_ptr) override;
+ Status *error_ptr) override;
std::string GetURI() override;
diff --git a/include/lldb/Host/windows/HostProcessWindows.h b/include/lldb/Host/windows/HostProcessWindows.h
index 2896c7be793f..4ef35337d70f 100644
--- a/include/lldb/Host/windows/HostProcessWindows.h
+++ b/include/lldb/Host/windows/HostProcessWindows.h
@@ -25,8 +25,8 @@ public:
void SetOwnsHandle(bool owns);
- Error Terminate() override;
- Error GetMainModule(FileSpec &file_spec) const override;
+ Status Terminate() override;
+ Status GetMainModule(FileSpec &file_spec) const override;
lldb::pid_t GetProcessId() const override;
bool IsRunning() const override;
diff --git a/include/lldb/Host/windows/HostThreadWindows.h b/include/lldb/Host/windows/HostThreadWindows.h
index 2acc28e29b5c..35d83c0ba2b2 100644
--- a/include/lldb/Host/windows/HostThreadWindows.h
+++ b/include/lldb/Host/windows/HostThreadWindows.h
@@ -26,8 +26,8 @@ public:
void SetOwnsHandle(bool owns);
- virtual Error Join(lldb::thread_result_t *result);
- virtual Error Cancel();
+ virtual Status Join(lldb::thread_result_t *result);
+ virtual Status Cancel();
virtual void Reset();
lldb::tid_t GetThreadId() const;
diff --git a/include/lldb/Host/windows/LockFileWindows.h b/include/lldb/Host/windows/LockFileWindows.h
index 9cd1faedc262..10456a1b8b25 100644
--- a/include/lldb/Host/windows/LockFileWindows.h
+++ b/include/lldb/Host/windows/LockFileWindows.h
@@ -21,15 +21,15 @@ public:
~LockFileWindows();
protected:
- Error DoWriteLock(const uint64_t start, const uint64_t len) override;
+ Status DoWriteLock(const uint64_t start, const uint64_t len) override;
- Error DoTryWriteLock(const uint64_t start, const uint64_t len) override;
+ Status DoTryWriteLock(const uint64_t start, const uint64_t len) override;
- Error DoReadLock(const uint64_t start, const uint64_t len) override;
+ Status DoReadLock(const uint64_t start, const uint64_t len) override;
- Error DoTryReadLock(const uint64_t start, const uint64_t len) override;
+ Status DoTryReadLock(const uint64_t start, const uint64_t len) override;
- Error DoUnlock() override;
+ Status DoUnlock() override;
bool IsValidFile() const override;
diff --git a/include/lldb/Host/windows/PipeWindows.h b/include/lldb/Host/windows/PipeWindows.h
index e9468ffc4153..86dec5a79d8e 100644
--- a/include/lldb/Host/windows/PipeWindows.h
+++ b/include/lldb/Host/windows/PipeWindows.h
@@ -27,12 +27,14 @@ public:
PipeWindows();
~PipeWindows() override;
- Error CreateNew(bool child_process_inherit) override;
- Error CreateNew(llvm::StringRef name, bool child_process_inherit) override;
- Error CreateWithUniqueName(llvm::StringRef prefix, bool child_process_inherit,
- llvm::SmallVectorImpl<char> &name) override;
- Error OpenAsReader(llvm::StringRef name, bool child_process_inherit) override;
- Error
+ Status CreateNew(bool child_process_inherit) override;
+ Status CreateNew(llvm::StringRef name, bool child_process_inherit) override;
+ Status CreateWithUniqueName(llvm::StringRef prefix,
+ bool child_process_inherit,
+ llvm::SmallVectorImpl<char> &name) override;
+ Status OpenAsReader(llvm::StringRef name,
+ bool child_process_inherit) override;
+ Status
OpenAsWriterWithTimeout(llvm::StringRef name, bool child_process_inherit,
const std::chrono::microseconds &timeout) override;
@@ -48,12 +50,12 @@ public:
void Close() override;
- Error Delete(llvm::StringRef name) override;
+ Status Delete(llvm::StringRef name) override;
- Error Write(const void *buf, size_t size, size_t &bytes_written) override;
- Error ReadWithTimeout(void *buf, size_t size,
- const std::chrono::microseconds &timeout,
- size_t &bytes_read) override;
+ Status Write(const void *buf, size_t size, size_t &bytes_written) override;
+ Status ReadWithTimeout(void *buf, size_t size,
+ const std::chrono::microseconds &timeout,
+ size_t &bytes_read) override;
// PipeWindows specific methods. These allow access to the underlying OS
// handle.
@@ -61,8 +63,8 @@ public:
HANDLE GetWriteNativeHandle();
private:
- Error OpenNamedPipe(llvm::StringRef name, bool child_process_inherit,
- bool is_read);
+ Status OpenNamedPipe(llvm::StringRef name, bool child_process_inherit,
+ bool is_read);
HANDLE m_read;
HANDLE m_write;
diff --git a/include/lldb/Host/windows/ProcessLauncherWindows.h b/include/lldb/Host/windows/ProcessLauncherWindows.h
index 9f9e39709375..1df377d5eb88 100644
--- a/include/lldb/Host/windows/ProcessLauncherWindows.h
+++ b/include/lldb/Host/windows/ProcessLauncherWindows.h
@@ -20,7 +20,7 @@ class ProcessLaunchInfo;
class ProcessLauncherWindows : public ProcessLauncher {
public:
virtual HostProcess LaunchProcess(const ProcessLaunchInfo &launch_info,
- Error &error);
+ Status &error);
protected:
HANDLE GetStdioHandle(const ProcessLaunchInfo &launch_info, int fd);
diff --git a/include/lldb/Interpreter/Args.h b/include/lldb/Interpreter/Args.h
index bdbf81e02d9d..98046cd59545 100644
--- a/include/lldb/Interpreter/Args.h
+++ b/include/lldb/Interpreter/Args.h
@@ -21,7 +21,7 @@
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/StringRef.h"
// Project includes
-#include "lldb/Utility/Error.h"
+#include "lldb/Utility/Status.h"
#include "lldb/lldb-private-types.h"
#include "lldb/lldb-types.h"
@@ -322,8 +322,8 @@ public:
///
/// @see class Options
//------------------------------------------------------------------
- Error ParseOptions(Options &options, ExecutionContext *execution_context,
- lldb::PlatformSP platform_sp, bool require_validation);
+ Status ParseOptions(Options &options, ExecutionContext *execution_context,
+ lldb::PlatformSP platform_sp, bool require_validation);
bool IsPositionalArgument(const char *arg);
@@ -377,7 +377,7 @@ public:
static lldb::addr_t StringToAddress(const ExecutionContext *exe_ctx,
llvm::StringRef s,
- lldb::addr_t fail_value, Error *error);
+ lldb::addr_t fail_value, Status *error);
static bool StringToBoolean(llvm::StringRef s, bool fail_value,
bool *success_ptr);
@@ -387,17 +387,17 @@ public:
static int64_t StringToOptionEnum(llvm::StringRef s,
OptionEnumValueElement *enum_values,
- int32_t fail_value, Error &error);
+ int32_t fail_value, Status &error);
static lldb::ScriptLanguage
StringToScriptLanguage(llvm::StringRef s, lldb::ScriptLanguage fail_value,
bool *success_ptr);
// TODO: Use StringRef
- static Error StringToFormat(const char *s, lldb::Format &format,
- size_t *byte_size_ptr); // If non-NULL, then a
- // byte size can precede
- // the format character
+ static Status StringToFormat(const char *s, lldb::Format &format,
+ size_t *byte_size_ptr); // If non-NULL, then a
+ // byte size can precede
+ // the format character
static lldb::Encoding
StringToEncoding(llvm::StringRef s,
diff --git a/include/lldb/Interpreter/CommandInterpreter.h b/include/lldb/Interpreter/CommandInterpreter.h
index 031ea10d6ad4..f47411079a3a 100644
--- a/include/lldb/Interpreter/CommandInterpreter.h
+++ b/include/lldb/Interpreter/CommandInterpreter.h
@@ -510,7 +510,7 @@ protected:
StringList *matches = nullptr) const;
private:
- Error PreprocessCommand(std::string &command);
+ Status PreprocessCommand(std::string &command);
// Completely resolves aliases and abbreviations, returning a pointer to the
// final command object and updating command_line to the fully substituted
diff --git a/include/lldb/Interpreter/CommandReturnObject.h b/include/lldb/Interpreter/CommandReturnObject.h
index 8e467e118477..7b04c391bc76 100644
--- a/include/lldb/Interpreter/CommandReturnObject.h
+++ b/include/lldb/Interpreter/CommandReturnObject.h
@@ -129,7 +129,7 @@ public:
AppendError(llvm::formatv(format, std::forward<Args>(args)...).str());
}
- void SetError(const Error &error, const char *fallback_error_cstr = nullptr);
+ void SetError(const Status &error, const char *fallback_error_cstr = nullptr);
void SetError(llvm::StringRef error_cstr);
diff --git a/include/lldb/Interpreter/OptionGroupArchitecture.h b/include/lldb/Interpreter/OptionGroupArchitecture.h
index 742cd6d1321d..e73a53421f28 100644
--- a/include/lldb/Interpreter/OptionGroupArchitecture.h
+++ b/include/lldb/Interpreter/OptionGroupArchitecture.h
@@ -31,8 +31,8 @@ public:
llvm::ArrayRef<OptionDefinition> GetDefinitions() override;
- Error SetOptionValue(uint32_t option_idx, llvm::StringRef option_value,
- ExecutionContext *execution_context) override;
+ Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_value,
+ ExecutionContext *execution_context) override;
void OptionParsingStarting(ExecutionContext *execution_context) override;
diff --git a/include/lldb/Interpreter/OptionGroupBoolean.h b/include/lldb/Interpreter/OptionGroupBoolean.h
index 931a6d73e728..53d08d79d67a 100644
--- a/include/lldb/Interpreter/OptionGroupBoolean.h
+++ b/include/lldb/Interpreter/OptionGroupBoolean.h
@@ -38,9 +38,9 @@ public:
return llvm::ArrayRef<OptionDefinition>(&m_option_definition, 1);
}
- Error SetOptionValue(uint32_t option_idx, llvm::StringRef option_value,
- ExecutionContext *execution_context) override;
- Error SetOptionValue(uint32_t, const char *, ExecutionContext *) = delete;
+ Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_value,
+ ExecutionContext *execution_context) override;
+ Status SetOptionValue(uint32_t, const char *, ExecutionContext *) = delete;
void OptionParsingStarting(ExecutionContext *execution_context) override;
diff --git a/include/lldb/Interpreter/OptionGroupFile.h b/include/lldb/Interpreter/OptionGroupFile.h
index 93e3ed75d342..d0c25b8bf8e6 100644
--- a/include/lldb/Interpreter/OptionGroupFile.h
+++ b/include/lldb/Interpreter/OptionGroupFile.h
@@ -37,9 +37,9 @@ public:
return llvm::ArrayRef<OptionDefinition>(&m_option_definition, 1);
}
- Error SetOptionValue(uint32_t option_idx, llvm::StringRef option_value,
- ExecutionContext *execution_context) override;
- Error SetOptionValue(uint32_t, const char *, ExecutionContext *) = delete;
+ Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_value,
+ ExecutionContext *execution_context) override;
+ Status SetOptionValue(uint32_t, const char *, ExecutionContext *) = delete;
void OptionParsingStarting(ExecutionContext *execution_context) override;
@@ -70,9 +70,9 @@ public:
return llvm::ArrayRef<OptionDefinition>(&m_option_definition, 1);
}
- Error SetOptionValue(uint32_t option_idx, llvm::StringRef option_value,
- ExecutionContext *execution_context) override;
- Error SetOptionValue(uint32_t, const char *, ExecutionContext *) = delete;
+ Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_value,
+ ExecutionContext *execution_context) override;
+ Status SetOptionValue(uint32_t, const char *, ExecutionContext *) = delete;
void OptionParsingStarting(ExecutionContext *execution_context) override;
diff --git a/include/lldb/Interpreter/OptionGroupFormat.h b/include/lldb/Interpreter/OptionGroupFormat.h
index f3a42037afc5..ddf2ccece3bd 100644
--- a/include/lldb/Interpreter/OptionGroupFormat.h
+++ b/include/lldb/Interpreter/OptionGroupFormat.h
@@ -43,9 +43,9 @@ public:
llvm::ArrayRef<OptionDefinition> GetDefinitions() override;
- Error SetOptionValue(uint32_t option_idx, llvm::StringRef option_value,
- ExecutionContext *execution_context) override;
- Error SetOptionValue(uint32_t, const char *, ExecutionContext *) = delete;
+ Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_value,
+ ExecutionContext *execution_context) override;
+ Status SetOptionValue(uint32_t, const char *, ExecutionContext *) = delete;
void OptionParsingStarting(ExecutionContext *execution_context) override;
diff --git a/include/lldb/Interpreter/OptionGroupOutputFile.h b/include/lldb/Interpreter/OptionGroupOutputFile.h
index cb891f0f7ecb..19453c6215ef 100644
--- a/include/lldb/Interpreter/OptionGroupOutputFile.h
+++ b/include/lldb/Interpreter/OptionGroupOutputFile.h
@@ -31,9 +31,9 @@ public:
llvm::ArrayRef<OptionDefinition> GetDefinitions() override;
- Error SetOptionValue(uint32_t option_idx, llvm::StringRef option_value,
- ExecutionContext *execution_context) override;
- Error SetOptionValue(uint32_t, const char *, ExecutionContext *) = delete;
+ Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_value,
+ ExecutionContext *execution_context) override;
+ Status SetOptionValue(uint32_t, const char *, ExecutionContext *) = delete;
void OptionParsingStarting(ExecutionContext *execution_context) override;
diff --git a/include/lldb/Interpreter/OptionGroupPlatform.h b/include/lldb/Interpreter/OptionGroupPlatform.h
index 8cee9a671869..e79662400279 100644
--- a/include/lldb/Interpreter/OptionGroupPlatform.h
+++ b/include/lldb/Interpreter/OptionGroupPlatform.h
@@ -36,15 +36,15 @@ public:
llvm::ArrayRef<OptionDefinition> GetDefinitions() override;
- Error SetOptionValue(uint32_t option_idx, llvm::StringRef option_value,
- ExecutionContext *execution_context) override;
- Error SetOptionValue(uint32_t, const char *, ExecutionContext *) = delete;
+ Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_value,
+ ExecutionContext *execution_context) override;
+ Status SetOptionValue(uint32_t, const char *, ExecutionContext *) = delete;
void OptionParsingStarting(ExecutionContext *execution_context) override;
lldb::PlatformSP CreatePlatformWithOptions(CommandInterpreter &interpreter,
const ArchSpec &arch,
- bool make_selected, Error &error,
+ bool make_selected, Status &error,
ArchSpec &platform_arch) const;
bool PlatformWasSpecified() const { return !m_platform_name.empty(); }
diff --git a/include/lldb/Interpreter/OptionGroupString.h b/include/lldb/Interpreter/OptionGroupString.h
index 21bfc08d130f..01e8aa9dc3b6 100644
--- a/include/lldb/Interpreter/OptionGroupString.h
+++ b/include/lldb/Interpreter/OptionGroupString.h
@@ -35,9 +35,9 @@ public:
return llvm::ArrayRef<OptionDefinition>(&m_option_definition, 1);
}
- Error SetOptionValue(uint32_t option_idx, llvm::StringRef option_value,
- ExecutionContext *execution_context) override;
- Error SetOptionValue(uint32_t, const char *, ExecutionContext *) = delete;
+ Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_value,
+ ExecutionContext *execution_context) override;
+ Status SetOptionValue(uint32_t, const char *, ExecutionContext *) = delete;
void OptionParsingStarting(ExecutionContext *execution_context) override;
diff --git a/include/lldb/Interpreter/OptionGroupUInt64.h b/include/lldb/Interpreter/OptionGroupUInt64.h
index 3f04eac72888..82eb0e26af9b 100644
--- a/include/lldb/Interpreter/OptionGroupUInt64.h
+++ b/include/lldb/Interpreter/OptionGroupUInt64.h
@@ -36,9 +36,9 @@ public:
return llvm::ArrayRef<OptionDefinition>(&m_option_definition, 1);
}
- Error SetOptionValue(uint32_t option_idx, llvm::StringRef option_value,
- ExecutionContext *execution_context) override;
- Error SetOptionValue(uint32_t, const char *, ExecutionContext *) = delete;
+ Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_value,
+ ExecutionContext *execution_context) override;
+ Status SetOptionValue(uint32_t, const char *, ExecutionContext *) = delete;
void OptionParsingStarting(ExecutionContext *execution_context) override;
diff --git a/include/lldb/Interpreter/OptionGroupUUID.h b/include/lldb/Interpreter/OptionGroupUUID.h
index 9a7c6cf9cffe..def97d5f2551 100644
--- a/include/lldb/Interpreter/OptionGroupUUID.h
+++ b/include/lldb/Interpreter/OptionGroupUUID.h
@@ -31,9 +31,9 @@ public:
llvm::ArrayRef<OptionDefinition> GetDefinitions() override;
- Error SetOptionValue(uint32_t option_idx, llvm::StringRef option_value,
- ExecutionContext *execution_context) override;
- Error SetOptionValue(uint32_t, const char *, ExecutionContext *) = delete;
+ Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_value,
+ ExecutionContext *execution_context) override;
+ Status SetOptionValue(uint32_t, const char *, ExecutionContext *) = delete;
void OptionParsingStarting(ExecutionContext *execution_context) override;
diff --git a/include/lldb/Interpreter/OptionGroupValueObjectDisplay.h b/include/lldb/Interpreter/OptionGroupValueObjectDisplay.h
index 694464b8b917..0e075773b3f7 100644
--- a/include/lldb/Interpreter/OptionGroupValueObjectDisplay.h
+++ b/include/lldb/Interpreter/OptionGroupValueObjectDisplay.h
@@ -31,9 +31,9 @@ public:
llvm::ArrayRef<OptionDefinition> GetDefinitions() override;
- Error SetOptionValue(uint32_t option_idx, llvm::StringRef option_value,
- ExecutionContext *execution_context) override;
- Error SetOptionValue(uint32_t, const char *, ExecutionContext *) = delete;
+ Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_value,
+ ExecutionContext *execution_context) override;
+ Status SetOptionValue(uint32_t, const char *, ExecutionContext *) = delete;
void OptionParsingStarting(ExecutionContext *execution_context) override;
diff --git a/include/lldb/Interpreter/OptionGroupVariable.h b/include/lldb/Interpreter/OptionGroupVariable.h
index 0735de45d1a6..c9e90320e141 100644
--- a/include/lldb/Interpreter/OptionGroupVariable.h
+++ b/include/lldb/Interpreter/OptionGroupVariable.h
@@ -31,9 +31,9 @@ public:
llvm::ArrayRef<OptionDefinition> GetDefinitions() override;
- Error SetOptionValue(uint32_t option_idx, llvm::StringRef option_value,
- ExecutionContext *execution_context) override;
- Error SetOptionValue(uint32_t, const char *, ExecutionContext *) = delete;
+ Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_value,
+ ExecutionContext *execution_context) override;
+ Status SetOptionValue(uint32_t, const char *, ExecutionContext *) = delete;
void OptionParsingStarting(ExecutionContext *execution_context) override;
diff --git a/include/lldb/Interpreter/OptionGroupWatchpoint.h b/include/lldb/Interpreter/OptionGroupWatchpoint.h
index c67c8f071b54..f2665638ba85 100644
--- a/include/lldb/Interpreter/OptionGroupWatchpoint.h
+++ b/include/lldb/Interpreter/OptionGroupWatchpoint.h
@@ -32,9 +32,9 @@ public:
llvm::ArrayRef<OptionDefinition> GetDefinitions() override;
- Error SetOptionValue(uint32_t option_idx, llvm::StringRef option_value,
- ExecutionContext *execution_context) override;
- Error SetOptionValue(uint32_t, const char *, ExecutionContext *) = delete;
+ Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_value,
+ ExecutionContext *execution_context) override;
+ Status SetOptionValue(uint32_t, const char *, ExecutionContext *) = delete;
void OptionParsingStarting(ExecutionContext *execution_context) override;
diff --git a/include/lldb/Interpreter/OptionValue.h b/include/lldb/Interpreter/OptionValue.h
index 648ad33e2fc8..6008e1ea4411 100644
--- a/include/lldb/Interpreter/OptionValue.h
+++ b/include/lldb/Interpreter/OptionValue.h
@@ -16,7 +16,7 @@
// Project includes
#include "lldb/Core/FormatEntity.h"
#include "lldb/Utility/ConstString.h"
-#include "lldb/Utility/Error.h"
+#include "lldb/Utility/Status.h"
#include "lldb/lldb-defines.h"
#include "lldb/lldb-private-enumerations.h"
#include "lldb/lldb-private-interfaces.h"
@@ -91,7 +91,7 @@ public:
virtual void DumpValue(const ExecutionContext *exe_ctx, Stream &strm,
uint32_t dump_mask) = 0;
- virtual Error
+ virtual Status
SetValueFromString(llvm::StringRef value,
VarSetOperationType op = eVarSetOperationAssign);
@@ -108,15 +108,16 @@ public:
// Subclasses can override these functions
//-----------------------------------------------------------------
virtual lldb::OptionValueSP GetSubValue(const ExecutionContext *exe_ctx,
- llvm::StringRef name, bool will_modify,
- Error &error) const {
+ llvm::StringRef name,
+ bool will_modify,
+ Status &error) const {
error.SetErrorStringWithFormat("'%s' is not a value subvalue", name.str().c_str());
return lldb::OptionValueSP();
}
- virtual Error SetSubValue(const ExecutionContext *exe_ctx,
- VarSetOperationType op, llvm::StringRef name,
- llvm::StringRef value);
+ virtual Status SetSubValue(const ExecutionContext *exe_ctx,
+ VarSetOperationType op, llvm::StringRef name,
+ llvm::StringRef value);
virtual bool IsAggregateValue() const { return false; }
@@ -180,7 +181,7 @@ public:
static lldb::OptionValueSP
CreateValueFromCStringForTypeMask(const char *value_cstr, uint32_t type_mask,
- Error &error);
+ Status &error);
// Get this value as a uint64_t value if it is encoded as a boolean,
// uint64_t or int64_t. Other types will cause "fail_value" to be
diff --git a/include/lldb/Interpreter/OptionValueArch.h b/include/lldb/Interpreter/OptionValueArch.h
index aa548124e2d6..e1a354d4ae21 100644
--- a/include/lldb/Interpreter/OptionValueArch.h
+++ b/include/lldb/Interpreter/OptionValueArch.h
@@ -46,10 +46,10 @@ public:
void DumpValue(const ExecutionContext *exe_ctx, Stream &strm,
uint32_t dump_mask) override;
- Error
+ Status
SetValueFromString(llvm::StringRef value,
VarSetOperationType op = eVarSetOperationAssign) override;
- Error
+ Status
SetValueFromString(const char *,
VarSetOperationType = eVarSetOperationAssign) = delete;
diff --git a/include/lldb/Interpreter/OptionValueArray.h b/include/lldb/Interpreter/OptionValueArray.h
index 1e568cac402d..bbf4e371a893 100644
--- a/include/lldb/Interpreter/OptionValueArray.h
+++ b/include/lldb/Interpreter/OptionValueArray.h
@@ -36,10 +36,10 @@ public:
void DumpValue(const ExecutionContext *exe_ctx, Stream &strm,
uint32_t dump_mask) override;
- Error
+ Status
SetValueFromString(llvm::StringRef value,
VarSetOperationType op = eVarSetOperationAssign) override;
- Error
+ Status
SetValueFromString(const char *,
VarSetOperationType = eVarSetOperationAssign) = delete;
@@ -55,7 +55,7 @@ public:
lldb::OptionValueSP GetSubValue(const ExecutionContext *exe_ctx,
llvm::StringRef name, bool will_modify,
- Error &error) const override;
+ Status &error) const override;
//---------------------------------------------------------------------
// Subclass specific functions
@@ -122,7 +122,7 @@ public:
size_t GetArgs(Args &args) const;
- Error SetArgs(const Args &args, VarSetOperationType op);
+ Status SetArgs(const Args &args, VarSetOperationType op);
protected:
typedef std::vector<lldb::OptionValueSP> collection;
diff --git a/include/lldb/Interpreter/OptionValueBoolean.h b/include/lldb/Interpreter/OptionValueBoolean.h
index d429c0577ecb..1ff84dd3367d 100644
--- a/include/lldb/Interpreter/OptionValueBoolean.h
+++ b/include/lldb/Interpreter/OptionValueBoolean.h
@@ -37,10 +37,10 @@ public:
void DumpValue(const ExecutionContext *exe_ctx, Stream &strm,
uint32_t dump_mask) override;
- Error
+ Status
SetValueFromString(llvm::StringRef value,
VarSetOperationType op = eVarSetOperationAssign) override;
- Error
+ Status
SetValueFromString(const char *,
VarSetOperationType = eVarSetOperationAssign) = delete;
diff --git a/include/lldb/Interpreter/OptionValueChar.h b/include/lldb/Interpreter/OptionValueChar.h
index d18644700573..0c5f602efe9b 100644
--- a/include/lldb/Interpreter/OptionValueChar.h
+++ b/include/lldb/Interpreter/OptionValueChar.h
@@ -38,10 +38,10 @@ public:
void DumpValue(const ExecutionContext *exe_ctx, Stream &strm,
uint32_t dump_mask) override;
- Error
+ Status
SetValueFromString(llvm::StringRef value,
VarSetOperationType op = eVarSetOperationAssign) override;
- Error
+ Status
SetValueFromString(const char *,
VarSetOperationType = eVarSetOperationAssign) = delete;
diff --git a/include/lldb/Interpreter/OptionValueDictionary.h b/include/lldb/Interpreter/OptionValueDictionary.h
index 5d015a55a8f9..4e8c86008ea4 100644
--- a/include/lldb/Interpreter/OptionValueDictionary.h
+++ b/include/lldb/Interpreter/OptionValueDictionary.h
@@ -38,7 +38,7 @@ public:
void DumpValue(const ExecutionContext *exe_ctx, Stream &strm,
uint32_t dump_mask) override;
- Error
+ Status
SetValueFromString(llvm::StringRef value,
VarSetOperationType op = eVarSetOperationAssign) override;
@@ -66,10 +66,10 @@ public:
lldb::OptionValueSP GetSubValue(const ExecutionContext *exe_ctx,
llvm::StringRef name, bool will_modify,
- Error &error) const override;
+ Status &error) const override;
- Error SetSubValue(const ExecutionContext *exe_ctx, VarSetOperationType op,
- llvm::StringRef name, llvm::StringRef value) override;
+ Status SetSubValue(const ExecutionContext *exe_ctx, VarSetOperationType op,
+ llvm::StringRef name, llvm::StringRef value) override;
bool SetValueForKey(const ConstString &key,
const lldb::OptionValueSP &value_sp,
@@ -79,7 +79,7 @@ public:
size_t GetArgs(Args &args) const;
- Error SetArgs(const Args &args, VarSetOperationType op);
+ Status SetArgs(const Args &args, VarSetOperationType op);
protected:
typedef std::map<ConstString, lldb::OptionValueSP> collection;
diff --git a/include/lldb/Interpreter/OptionValueEnumeration.h b/include/lldb/Interpreter/OptionValueEnumeration.h
index d47248b72c67..4aa8823e620f 100644
--- a/include/lldb/Interpreter/OptionValueEnumeration.h
+++ b/include/lldb/Interpreter/OptionValueEnumeration.h
@@ -13,7 +13,7 @@
#include "lldb/Core/UniqueCStringMap.h"
#include "lldb/Interpreter/OptionValue.h"
#include "lldb/Utility/ConstString.h"
-#include "lldb/Utility/Error.h"
+#include "lldb/Utility/Status.h"
#include "lldb/Utility/Stream.h"
#include "lldb/Utility/StreamString.h"
#include "lldb/lldb-private-types.h"
@@ -44,10 +44,10 @@ public:
void DumpValue(const ExecutionContext *exe_ctx, Stream &strm,
uint32_t dump_mask) override;
- Error
+ Status
SetValueFromString(llvm::StringRef value,
VarSetOperationType op = eVarSetOperationAssign) override;
- Error
+ Status
SetValueFromString(const char *,
VarSetOperationType = eVarSetOperationAssign) = delete;
diff --git a/include/lldb/Interpreter/OptionValueFileSpec.h b/include/lldb/Interpreter/OptionValueFileSpec.h
index 654c04d4d274..b53c03471e2b 100644
--- a/include/lldb/Interpreter/OptionValueFileSpec.h
+++ b/include/lldb/Interpreter/OptionValueFileSpec.h
@@ -37,10 +37,10 @@ public:
void DumpValue(const ExecutionContext *exe_ctx, Stream &strm,
uint32_t dump_mask) override;
- Error
+ Status
SetValueFromString(llvm::StringRef value,
VarSetOperationType op = eVarSetOperationAssign) override;
- Error
+ Status
SetValueFromString(const char *,
VarSetOperationType = eVarSetOperationAssign) = delete;
diff --git a/include/lldb/Interpreter/OptionValueFileSpecList.h b/include/lldb/Interpreter/OptionValueFileSpecList.h
index 1e42362c9163..9529fbcf38bc 100644
--- a/include/lldb/Interpreter/OptionValueFileSpecList.h
+++ b/include/lldb/Interpreter/OptionValueFileSpecList.h
@@ -37,10 +37,10 @@ public:
void DumpValue(const ExecutionContext *exe_ctx, Stream &strm,
uint32_t dump_mask) override;
- Error
+ Status
SetValueFromString(llvm::StringRef value,
VarSetOperationType op = eVarSetOperationAssign) override;
- Error
+ Status
SetValueFromString(const char *,
VarSetOperationType = eVarSetOperationAssign) = delete;
diff --git a/include/lldb/Interpreter/OptionValueFormat.h b/include/lldb/Interpreter/OptionValueFormat.h
index 5351aeca0627..ce7997024b09 100644
--- a/include/lldb/Interpreter/OptionValueFormat.h
+++ b/include/lldb/Interpreter/OptionValueFormat.h
@@ -38,10 +38,10 @@ public:
void DumpValue(const ExecutionContext *exe_ctx, Stream &strm,
uint32_t dump_mask) override;
- Error
+ Status
SetValueFromString(llvm::StringRef value,
VarSetOperationType op = eVarSetOperationAssign) override;
- Error
+ Status
SetValueFromString(const char *,
VarSetOperationType = eVarSetOperationAssign) = delete;
diff --git a/include/lldb/Interpreter/OptionValueFormatEntity.h b/include/lldb/Interpreter/OptionValueFormatEntity.h
index 472cd9ee4f92..e5a65b7e7eb6 100644
--- a/include/lldb/Interpreter/OptionValueFormatEntity.h
+++ b/include/lldb/Interpreter/OptionValueFormatEntity.h
@@ -34,10 +34,10 @@ public:
void DumpValue(const ExecutionContext *exe_ctx, Stream &strm,
uint32_t dump_mask) override;
- Error
+ Status
SetValueFromString(llvm::StringRef value,
VarSetOperationType op = eVarSetOperationAssign) override;
- Error
+ Status
SetValueFromString(const char *,
VarSetOperationType = eVarSetOperationAssign) = delete;
diff --git a/include/lldb/Interpreter/OptionValueLanguage.h b/include/lldb/Interpreter/OptionValueLanguage.h
index a388a6a92eaf..8f81c5df0739 100644
--- a/include/lldb/Interpreter/OptionValueLanguage.h
+++ b/include/lldb/Interpreter/OptionValueLanguage.h
@@ -41,10 +41,10 @@ public:
void DumpValue(const ExecutionContext *exe_ctx, Stream &strm,
uint32_t dump_mask) override;
- Error
+ Status
SetValueFromString(llvm::StringRef value,
VarSetOperationType op = eVarSetOperationAssign) override;
- Error
+ Status
SetValueFromString(const char *,
VarSetOperationType = eVarSetOperationAssign) = delete;
diff --git a/include/lldb/Interpreter/OptionValuePathMappings.h b/include/lldb/Interpreter/OptionValuePathMappings.h
index d5336aafc993..0e2e98d74b74 100644
--- a/include/lldb/Interpreter/OptionValuePathMappings.h
+++ b/include/lldb/Interpreter/OptionValuePathMappings.h
@@ -35,10 +35,10 @@ public:
void DumpValue(const ExecutionContext *exe_ctx, Stream &strm,
uint32_t dump_mask) override;
- Error
+ Status
SetValueFromString(llvm::StringRef value,
VarSetOperationType op = eVarSetOperationAssign) override;
- Error
+ Status
SetValueFromString(const char *,
VarSetOperationType = eVarSetOperationAssign) = delete;
diff --git a/include/lldb/Interpreter/OptionValueProperties.h b/include/lldb/Interpreter/OptionValueProperties.h
index 0b49e0b00672..16d31aa4ea90 100644
--- a/include/lldb/Interpreter/OptionValueProperties.h
+++ b/include/lldb/Interpreter/OptionValueProperties.h
@@ -43,7 +43,7 @@ public:
lldb::OptionValueSP DeepCopy() const override;
- Error
+ Status
SetValueFromString(llvm::StringRef value,
VarSetOperationType op = eVarSetOperationAssign) override;
@@ -52,9 +52,9 @@ public:
ConstString GetName() const override { return m_name; }
- virtual Error DumpPropertyValue(const ExecutionContext *exe_ctx, Stream &strm,
- llvm::StringRef property_path,
- uint32_t dump_mask);
+ virtual Status DumpPropertyValue(const ExecutionContext *exe_ctx,
+ Stream &strm, llvm::StringRef property_path,
+ uint32_t dump_mask);
virtual void DumpAllDescriptions(CommandInterpreter &interpreter,
Stream &strm) const;
@@ -110,11 +110,12 @@ public:
bool value_will_be_modified) const;
lldb::OptionValueSP GetSubValue(const ExecutionContext *exe_ctx,
- llvm::StringRef name, bool value_will_be_modified,
- Error &error) const override;
+ llvm::StringRef name,
+ bool value_will_be_modified,
+ Status &error) const override;
- Error SetSubValue(const ExecutionContext *exe_ctx, VarSetOperationType op,
- llvm::StringRef path, llvm::StringRef value) override;
+ Status SetSubValue(const ExecutionContext *exe_ctx, VarSetOperationType op,
+ llvm::StringRef path, llvm::StringRef value) override;
virtual bool PredicateMatches(const ExecutionContext *exe_ctx,
llvm::StringRef predicate) const {
diff --git a/include/lldb/Interpreter/OptionValueRegex.h b/include/lldb/Interpreter/OptionValueRegex.h
index 7bb8d419bde0..afe9318ae014 100644
--- a/include/lldb/Interpreter/OptionValueRegex.h
+++ b/include/lldb/Interpreter/OptionValueRegex.h
@@ -35,10 +35,10 @@ public:
void DumpValue(const ExecutionContext *exe_ctx, Stream &strm,
uint32_t dump_mask) override;
- Error
+ Status
SetValueFromString(llvm::StringRef value,
VarSetOperationType op = eVarSetOperationAssign) override;
- Error
+ Status
SetValueFromString(const char *,
VarSetOperationType = eVarSetOperationAssign) = delete;
diff --git a/include/lldb/Interpreter/OptionValueSInt64.h b/include/lldb/Interpreter/OptionValueSInt64.h
index 1e1647866873..a6893d23e692 100644
--- a/include/lldb/Interpreter/OptionValueSInt64.h
+++ b/include/lldb/Interpreter/OptionValueSInt64.h
@@ -50,10 +50,10 @@ public:
void DumpValue(const ExecutionContext *exe_ctx, Stream &strm,
uint32_t dump_mask) override;
- Error
+ Status
SetValueFromString(llvm::StringRef value,
VarSetOperationType op = eVarSetOperationAssign) override;
- Error
+ Status
SetValueFromString(const char *,
VarSetOperationType = eVarSetOperationAssign) = delete;
diff --git a/include/lldb/Interpreter/OptionValueString.h b/include/lldb/Interpreter/OptionValueString.h
index 18b8215fe3c7..4a9f2227680e 100644
--- a/include/lldb/Interpreter/OptionValueString.h
+++ b/include/lldb/Interpreter/OptionValueString.h
@@ -24,7 +24,7 @@ namespace lldb_private {
class OptionValueString : public OptionValue {
public:
- typedef Error (*ValidatorCallback)(const char *string, void *baton);
+ typedef Status (*ValidatorCallback)(const char *string, void *baton);
enum Options { eOptionEncodeCharacterEscapeSequences = (1u << 0) };
@@ -85,10 +85,10 @@ public:
void DumpValue(const ExecutionContext *exe_ctx, Stream &strm,
uint32_t dump_mask) override;
- Error
+ Status
SetValueFromString(llvm::StringRef value,
VarSetOperationType op = eVarSetOperationAssign) override;
- Error
+ Status
SetValueFromString(const char *,
VarSetOperationType = eVarSetOperationAssign) = delete;
@@ -119,10 +119,10 @@ public:
const char *GetDefaultValue() const { return m_default_value.c_str(); }
llvm::StringRef GetDefaultValueAsRef() const { return m_default_value; }
- Error SetCurrentValue(const char *) = delete;
- Error SetCurrentValue(llvm::StringRef value);
+ Status SetCurrentValue(const char *) = delete;
+ Status SetCurrentValue(llvm::StringRef value);
- Error AppendToCurrentValue(const char *value);
+ Status AppendToCurrentValue(const char *value);
void SetDefaultValue(const char *value) {
if (value && value[0])
diff --git a/include/lldb/Interpreter/OptionValueUInt64.h b/include/lldb/Interpreter/OptionValueUInt64.h
index cbf932b1bda4..be13ff073721 100644
--- a/include/lldb/Interpreter/OptionValueUInt64.h
+++ b/include/lldb/Interpreter/OptionValueUInt64.h
@@ -38,8 +38,8 @@ public:
// string isn't a uint64_t value or any other error occurs, return an
// empty lldb::OptionValueSP and fill error in with the correct stuff.
//---------------------------------------------------------------------
- static lldb::OptionValueSP Create(const char *, Error &) = delete;
- static lldb::OptionValueSP Create(llvm::StringRef value_str, Error &error);
+ static lldb::OptionValueSP Create(const char *, Status &) = delete;
+ static lldb::OptionValueSP Create(llvm::StringRef value_str, Status &error);
//---------------------------------------------------------------------
// Virtual subclass pure virtual overrides
//---------------------------------------------------------------------
@@ -49,10 +49,10 @@ public:
void DumpValue(const ExecutionContext *exe_ctx, Stream &strm,
uint32_t dump_mask) override;
- Error
+ Status
SetValueFromString(llvm::StringRef value,
VarSetOperationType op = eVarSetOperationAssign) override;
- Error
+ Status
SetValueFromString(const char *,
VarSetOperationType = eVarSetOperationAssign) = delete;
diff --git a/include/lldb/Interpreter/OptionValueUUID.h b/include/lldb/Interpreter/OptionValueUUID.h
index 62c25859580c..6e0aeebb0e99 100644
--- a/include/lldb/Interpreter/OptionValueUUID.h
+++ b/include/lldb/Interpreter/OptionValueUUID.h
@@ -36,10 +36,10 @@ public:
void DumpValue(const ExecutionContext *exe_ctx, Stream &strm,
uint32_t dump_mask) override;
- Error
+ Status
SetValueFromString(llvm::StringRef value,
VarSetOperationType op = eVarSetOperationAssign) override;
- Error
+ Status
SetValueFromString(const char *,
VarSetOperationType = eVarSetOperationAssign) = delete;
diff --git a/include/lldb/Interpreter/Options.h b/include/lldb/Interpreter/Options.h
index fc5ff972da46..87121005575a 100644
--- a/include/lldb/Interpreter/Options.h
+++ b/include/lldb/Interpreter/Options.h
@@ -38,7 +38,7 @@ static inline bool isprint8(int ch) {
/// Options is designed to be subclassed to contain all needed
/// options for a given command. The options can be parsed by calling:
/// \code
-/// Error Args::ParseOptions (Options &);
+/// Status Args::ParseOptions (Options &);
/// \endcode
///
/// The options are specified using the format defined for the libc
@@ -62,11 +62,11 @@ static inline bool isprint8(int ch) {
/// return g_options;
/// }
///
-/// virtual Error
+/// virtual Status
/// SetOptionValue (uint32_t option_idx, int option_val, const char
/// *option_arg)
/// {
-/// Error error;
+/// Status error;
/// switch (option_val)
/// {
/// case 'g': debug = true; break;
@@ -171,7 +171,7 @@ public:
// prone and subclasses shouldn't have to do it.
void NotifyOptionParsingStarting(ExecutionContext *execution_context);
- Error NotifyOptionParsingFinished(ExecutionContext *execution_context);
+ Status NotifyOptionParsingFinished(ExecutionContext *execution_context);
//------------------------------------------------------------------
/// Set the value of an option.
@@ -192,8 +192,8 @@ public:
/// @see Args::ParseOptions (Options&)
/// @see man getopt_long_only
//------------------------------------------------------------------
- virtual Error SetOptionValue(uint32_t option_idx, llvm::StringRef option_arg,
- ExecutionContext *execution_context) = 0;
+ virtual Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_arg,
+ ExecutionContext *execution_context) = 0;
//------------------------------------------------------------------
/// Handles the generic bits of figuring out whether we are in an
@@ -324,10 +324,10 @@ protected:
// all option settings to default values.
virtual void OptionParsingStarting(ExecutionContext *execution_context) = 0;
- virtual Error OptionParsingFinished(ExecutionContext *execution_context) {
+ virtual Status OptionParsingFinished(ExecutionContext *execution_context) {
// If subclasses need to know when the options are done being parsed
// they can implement this function to do extra checking
- Error error;
+ Status error;
return error;
}
};
@@ -340,16 +340,16 @@ public:
virtual llvm::ArrayRef<OptionDefinition> GetDefinitions() = 0;
- virtual Error SetOptionValue(uint32_t option_idx,
- llvm::StringRef option_value,
- ExecutionContext *execution_context) = 0;
+ virtual Status SetOptionValue(uint32_t option_idx,
+ llvm::StringRef option_value,
+ ExecutionContext *execution_context) = 0;
virtual void OptionParsingStarting(ExecutionContext *execution_context) = 0;
- virtual Error OptionParsingFinished(ExecutionContext *execution_context) {
+ virtual Status OptionParsingFinished(ExecutionContext *execution_context) {
// If subclasses need to know when the options are done being parsed
// they can implement this function to do extra checking
- Error error;
+ Status error;
return error;
}
};
@@ -401,12 +401,12 @@ public:
bool DidFinalize() { return m_did_finalize; }
- Error SetOptionValue(uint32_t option_idx, llvm::StringRef option_arg,
- ExecutionContext *execution_context) override;
+ Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_arg,
+ ExecutionContext *execution_context) override;
void OptionParsingStarting(ExecutionContext *execution_context) override;
- Error OptionParsingFinished(ExecutionContext *execution_context) override;
+ Status OptionParsingFinished(ExecutionContext *execution_context) override;
llvm::ArrayRef<OptionDefinition> GetDefinitions() override {
assert(m_did_finalize);
diff --git a/include/lldb/Interpreter/ScriptInterpreter.h b/include/lldb/Interpreter/ScriptInterpreter.h
index 271a5bba761e..01b342ae41ca 100644
--- a/include/lldb/Interpreter/ScriptInterpreter.h
+++ b/include/lldb/Interpreter/ScriptInterpreter.h
@@ -20,7 +20,7 @@
#include "lldb/Core/Broadcaster.h"
#include "lldb/Core/PluginInterface.h"
#include "lldb/Core/StructuredData.h"
-#include "lldb/Utility/Error.h"
+#include "lldb/Utility/Status.h"
#include "lldb/Host/PseudoTerminal.h"
@@ -107,24 +107,24 @@ public:
return true;
}
- virtual Error ExecuteMultipleLines(
+ virtual Status ExecuteMultipleLines(
const char *in_string,
const ExecuteScriptOptions &options = ExecuteScriptOptions()) {
- Error error;
+ Status error;
error.SetErrorString("not implemented");
return error;
}
- virtual Error
+ virtual Status
ExportFunctionDefinitionToInterpreter(StringList &function_def) {
- Error error;
+ Status error;
error.SetErrorString("not implemented");
return error;
}
- virtual Error GenerateBreakpointCommandCallbackData(StringList &input,
- std::string &output) {
- Error error;
+ virtual Status GenerateBreakpointCommandCallbackData(StringList &input,
+ std::string &output) {
+ Status error;
error.SetErrorString("not implemented");
return error;
}
@@ -235,19 +235,19 @@ public:
}
virtual StructuredData::ObjectSP
- LoadPluginModule(const FileSpec &file_spec, lldb_private::Error &error) {
+ LoadPluginModule(const FileSpec &file_spec, lldb_private::Status &error) {
return StructuredData::ObjectSP();
}
virtual StructuredData::DictionarySP
GetDynamicSettings(StructuredData::ObjectSP plugin_module_sp, Target *target,
- const char *setting_name, lldb_private::Error &error) {
+ const char *setting_name, lldb_private::Status &error) {
return StructuredData::DictionarySP();
}
- virtual Error GenerateFunction(const char *signature,
- const StringList &input) {
- Error error;
+ virtual Status GenerateFunction(const char *signature,
+ const StringList &input) {
+ Status error;
error.SetErrorString("unimplemented");
return error;
}
@@ -260,22 +260,22 @@ public:
CommandReturnObject &result);
/// Set the specified text as the callback for the breakpoint.
- Error
+ Status
SetBreakpointCommandCallback(std::vector<BreakpointOptions *> &bp_options_vec,
const char *callback_text);
- virtual Error SetBreakpointCommandCallback(BreakpointOptions *bp_options,
- const char *callback_text) {
- Error error;
+ virtual Status SetBreakpointCommandCallback(BreakpointOptions *bp_options,
+ const char *callback_text) {
+ Status error;
error.SetErrorString("unimplemented");
return error;
}
/// This one is for deserialization:
- virtual Error SetBreakpointCommandCallback(
+ virtual Status SetBreakpointCommandCallback(
BreakpointOptions *bp_options,
std::unique_ptr<BreakpointOptions::CommandData> &data_up) {
- Error error;
+ Status error;
error.SetErrorString("unimplemented");
return error;
}
@@ -346,7 +346,7 @@ public:
RunScriptBasedCommand(const char *impl_function, const char *args,
ScriptedCommandSynchronicity synchronicity,
lldb_private::CommandReturnObject &cmd_retobj,
- Error &error,
+ Status &error,
const lldb_private::ExecutionContext &exe_ctx) {
return false;
}
@@ -355,40 +355,40 @@ public:
RunScriptBasedCommand(StructuredData::GenericSP impl_obj_sp, const char *args,
ScriptedCommandSynchronicity synchronicity,
lldb_private::CommandReturnObject &cmd_retobj,
- Error &error,
+ Status &error,
const lldb_private::ExecutionContext &exe_ctx) {
return false;
}
virtual bool RunScriptFormatKeyword(const char *impl_function,
Process *process, std::string &output,
- Error &error) {
+ Status &error) {
error.SetErrorString("unimplemented");
return false;
}
virtual bool RunScriptFormatKeyword(const char *impl_function, Thread *thread,
- std::string &output, Error &error) {
+ std::string &output, Status &error) {
error.SetErrorString("unimplemented");
return false;
}
virtual bool RunScriptFormatKeyword(const char *impl_function, Target *target,
- std::string &output, Error &error) {
+ std::string &output, Status &error) {
error.SetErrorString("unimplemented");
return false;
}
virtual bool RunScriptFormatKeyword(const char *impl_function,
StackFrame *frame, std::string &output,
- Error &error) {
+ Status &error) {
error.SetErrorString("unimplemented");
return false;
}
virtual bool RunScriptFormatKeyword(const char *impl_function,
ValueObject *value, std::string &output,
- Error &error) {
+ Status &error) {
error.SetErrorString("unimplemented");
return false;
}
@@ -420,7 +420,7 @@ public:
virtual bool
LoadScriptingModule(const char *filename, bool can_reload, bool init_session,
- lldb_private::Error &error,
+ lldb_private::Status &error,
StructuredData::ObjectSP *module_sp = nullptr) {
error.SetErrorString("loading unimplemented");
return false;
diff --git a/include/lldb/Symbol/ClangASTContext.h b/include/lldb/Symbol/ClangASTContext.h
index ef1659159697..9d0a08414e93 100644
--- a/include/lldb/Symbol/ClangASTContext.h
+++ b/include/lldb/Symbol/ClangASTContext.h
@@ -275,17 +275,16 @@ public:
bool IsValid() const {
if (args.empty())
return false;
- return args.size() == names.size();
- }
-
- size_t GetSize() const {
- if (IsValid())
- return args.size();
- return 0;
+ return args.size() == names.size() &&
+ ((bool)pack_name == (bool)packed_args) &&
+ (!packed_args || !packed_args->packed_args);
}
llvm::SmallVector<const char *, 2> names;
llvm::SmallVector<clang::TemplateArgument, 2> args;
+
+ const char * pack_name = nullptr;
+ std::unique_ptr<TemplateParameterInfos> packed_args;
};
clang::FunctionTemplateDecl *
diff --git a/include/lldb/Symbol/ObjectFile.h b/include/lldb/Symbol/ObjectFile.h
index 296c9ff2129f..a4c7b01ece17 100644
--- a/include/lldb/Symbol/ObjectFile.h
+++ b/include/lldb/Symbol/ObjectFile.h
@@ -826,7 +826,7 @@ public:
///
/// @return
//------------------------------------------------------------------
- virtual Error LoadInMemory(Target &target, bool set_pc);
+ virtual Status LoadInMemory(Target &target, bool set_pc);
protected:
//------------------------------------------------------------------
diff --git a/include/lldb/Symbol/SymbolContext.h b/include/lldb/Symbol/SymbolContext.h
index 2ca3fdb71286..e4dcc73bb52b 100644
--- a/include/lldb/Symbol/SymbolContext.h
+++ b/include/lldb/Symbol/SymbolContext.h
@@ -234,7 +234,7 @@ public:
bool use_inline_block_range, AddressRange &range) const;
bool GetAddressRangeFromHereToEndLine(uint32_t end_line, AddressRange &range,
- Error &error);
+ Status &error);
void GetDescription(Stream *s, lldb::DescriptionLevel level,
Target *target) const;
diff --git a/include/lldb/Symbol/Variable.h b/include/lldb/Symbol/Variable.h
index f076a04434e1..507b41309042 100644
--- a/include/lldb/Symbol/Variable.h
+++ b/include/lldb/Symbol/Variable.h
@@ -97,7 +97,7 @@ public:
typedef size_t (*GetVariableCallback)(void *baton, const char *name,
VariableList &var_list);
- static Error GetValuesForVariableExpressionPath(
+ static Status GetValuesForVariableExpressionPath(
llvm::StringRef variable_expr_path, ExecutionContextScope *scope,
GetVariableCallback callback, void *baton, VariableList &variable_list,
ValueObjectList &valobj_list);
diff --git a/include/lldb/Target/ABI.h b/include/lldb/Target/ABI.h
index 4b611d244e21..a8e08e1a800a 100644
--- a/include/lldb/Target/ABI.h
+++ b/include/lldb/Target/ABI.h
@@ -16,7 +16,7 @@
// Project includes
#include "lldb/Core/PluginInterface.h"
#include "lldb/Symbol/UnwindPlan.h"
-#include "lldb/Utility/Error.h"
+#include "lldb/Utility/Status.h"
#include "lldb/lldb-private.h"
#include "llvm/ADT/ArrayRef.h"
@@ -77,8 +77,8 @@ public:
bool persistent = true) const;
// Set the Return value object in the current frame as though a function with
- virtual Error SetReturnValueObject(lldb::StackFrameSP &frame_sp,
- lldb::ValueObjectSP &new_value) = 0;
+ virtual Status SetReturnValueObject(lldb::StackFrameSP &frame_sp,
+ lldb::ValueObjectSP &new_value) = 0;
protected:
// This is the method the ABI will call to actually calculate the return
diff --git a/include/lldb/Target/DynamicLoader.h b/include/lldb/Target/DynamicLoader.h
index ced6ef44000a..b5890662d4e5 100644
--- a/include/lldb/Target/DynamicLoader.h
+++ b/include/lldb/Target/DynamicLoader.h
@@ -12,8 +12,8 @@
// Project includes
#include "lldb/Core/PluginInterface.h"
-#include "lldb/Utility/Error.h"
#include "lldb/Utility/FileSpec.h" // for FileSpec
+#include "lldb/Utility/Status.h"
#include "lldb/Utility/UUID.h"
#include "lldb/lldb-defines.h" // for LLDB_INVALID_ADDRESS
#include "lldb/lldb-forward.h" // for ModuleSP, ThreadPlanSP
@@ -213,7 +213,7 @@ public:
/// \b true if it is currently ok to try and load a shared
/// library into the process, \b false otherwise.
//------------------------------------------------------------------
- virtual Error CanLoadImage() = 0;
+ virtual Status CanLoadImage() = 0;
//------------------------------------------------------------------
/// Ask if the eh_frame information for the given SymbolContext should
diff --git a/include/lldb/Target/Language.h b/include/lldb/Target/Language.h
index bcf840f93edd..f81679f78129 100644
--- a/include/lldb/Target/Language.h
+++ b/include/lldb/Target/Language.h
@@ -199,7 +199,7 @@ public:
// it should return an appropriate closure here
virtual DumpValueObjectOptions::DeclPrintingHelper GetDeclPrintingHelper();
- virtual LazyBool IsLogicalTrue(ValueObject &valobj, Error &error);
+ virtual LazyBool IsLogicalTrue(ValueObject &valobj, Status &error);
// for a ValueObject of some "reference type", if the value points to the
// nil/null object, this method returns true
diff --git a/include/lldb/Target/LanguageRuntime.h b/include/lldb/Target/LanguageRuntime.h
index a57216e84794..98db941669c7 100644
--- a/include/lldb/Target/LanguageRuntime.h
+++ b/include/lldb/Target/LanguageRuntime.h
@@ -48,7 +48,7 @@ public:
static SearchFilter *
CreateFromStructuredData(Target &target,
const StructuredData::Dictionary &data_dict,
- Error &error);
+ Status &error);
StructuredData::ObjectSP SerializeToStructuredData() override;
diff --git a/include/lldb/Target/Memory.h b/include/lldb/Target/Memory.h
index f0a4bc5881f0..af6be15df9fb 100644
--- a/include/lldb/Target/Memory.h
+++ b/include/lldb/Target/Memory.h
@@ -40,7 +40,7 @@ public:
void Flush(lldb::addr_t addr, size_t size);
- size_t Read(lldb::addr_t addr, void *dst, size_t dst_len, Error &error);
+ size_t Read(lldb::addr_t addr, void *dst, size_t dst_len, Status &error);
uint32_t GetMemoryCacheLineSize() const { return m_L2_cache_line_byte_size; }
@@ -135,7 +135,7 @@ public:
void Clear();
lldb::addr_t AllocateMemory(size_t byte_size, uint32_t permissions,
- Error &error);
+ Status &error);
bool DeallocateMemory(lldb::addr_t ptr);
@@ -143,7 +143,7 @@ protected:
typedef std::shared_ptr<AllocatedBlock> AllocatedBlockSP;
AllocatedBlockSP AllocatePage(uint32_t byte_size, uint32_t permissions,
- uint32_t chunk_size, Error &error);
+ uint32_t chunk_size, Status &error);
//------------------------------------------------------------------
// Classes that inherit from MemoryCache can see and modify these
diff --git a/include/lldb/Target/ModuleCache.h b/include/lldb/Target/ModuleCache.h
index 49a7c97c60c3..4959ee8ea0a3 100644
--- a/include/lldb/Target/ModuleCache.h
+++ b/include/lldb/Target/ModuleCache.h
@@ -14,8 +14,8 @@
#include "lldb/lldb-types.h"
#include "lldb/Host/File.h"
-#include "lldb/Utility/Error.h"
#include "lldb/Utility/FileSpec.h"
+#include "lldb/Utility/Status.h"
#include <functional>
#include <string>
@@ -49,24 +49,24 @@ class UUID;
class ModuleCache {
public:
using ModuleDownloader =
- std::function<Error(const ModuleSpec &, const FileSpec &)>;
+ std::function<Status(const ModuleSpec &, const FileSpec &)>;
using SymfileDownloader =
- std::function<Error(const lldb::ModuleSP &, const FileSpec &)>;
+ std::function<Status(const lldb::ModuleSP &, const FileSpec &)>;
- Error GetAndPut(const FileSpec &root_dir_spec, const char *hostname,
- const ModuleSpec &module_spec,
- const ModuleDownloader &module_downloader,
- const SymfileDownloader &symfile_downloader,
- lldb::ModuleSP &cached_module_sp, bool *did_create_ptr);
+ Status GetAndPut(const FileSpec &root_dir_spec, const char *hostname,
+ const ModuleSpec &module_spec,
+ const ModuleDownloader &module_downloader,
+ const SymfileDownloader &symfile_downloader,
+ lldb::ModuleSP &cached_module_sp, bool *did_create_ptr);
private:
- Error Put(const FileSpec &root_dir_spec, const char *hostname,
- const ModuleSpec &module_spec, const FileSpec &tmp_file,
- const FileSpec &target_file);
+ Status Put(const FileSpec &root_dir_spec, const char *hostname,
+ const ModuleSpec &module_spec, const FileSpec &tmp_file,
+ const FileSpec &target_file);
- Error Get(const FileSpec &root_dir_spec, const char *hostname,
- const ModuleSpec &module_spec, lldb::ModuleSP &cached_module_sp,
- bool *did_create_ptr);
+ Status Get(const FileSpec &root_dir_spec, const char *hostname,
+ const ModuleSpec &module_spec, lldb::ModuleSP &cached_module_sp,
+ bool *did_create_ptr);
std::unordered_map<std::string, lldb::ModuleWP> m_loaded_modules;
};
diff --git a/include/lldb/Target/ObjCLanguageRuntime.h b/include/lldb/Target/ObjCLanguageRuntime.h
index 0a9ffa933bd1..97a2a731581a 100644
--- a/include/lldb/Target/ObjCLanguageRuntime.h
+++ b/include/lldb/Target/ObjCLanguageRuntime.h
@@ -168,7 +168,7 @@ public:
bool EvaluatePrecondition(StoppointCallbackContext &context) override;
void GetDescription(Stream &stream, lldb::DescriptionLevel level) override;
- Error ConfigurePrecondition(Args &args) override;
+ Status ConfigurePrecondition(Args &args) override;
protected:
void AddClassName(const char *class_name);
diff --git a/include/lldb/Target/PathMappingList.h b/include/lldb/Target/PathMappingList.h
index 2b844882e4ad..b1b551f2d24d 100644
--- a/include/lldb/Target/PathMappingList.h
+++ b/include/lldb/Target/PathMappingList.h
@@ -16,7 +16,7 @@
#include <vector>
// Other libraries and framework includes
#include "lldb/Utility/ConstString.h"
-#include "lldb/Utility/Error.h"
+#include "lldb/Utility/Status.h"
// Project includes
namespace lldb_private {
diff --git a/include/lldb/Target/Platform.h b/include/lldb/Target/Platform.h
index fb05d3e06dd5..cc007d959c65 100644
--- a/include/lldb/Target/Platform.h
+++ b/include/lldb/Target/Platform.h
@@ -111,10 +111,10 @@ public:
// Find an existing platform plug-in by name
static lldb::PlatformSP Find(const ConstString &name);
- static lldb::PlatformSP Create(const ConstString &name, Error &error);
+ static lldb::PlatformSP Create(const ConstString &name, Status &error);
static lldb::PlatformSP Create(const ArchSpec &arch,
- ArchSpec *platform_arch_ptr, Error &error);
+ ArchSpec *platform_arch_ptr, Status &error);
static uint32_t GetNumConnectedRemotePlatforms();
@@ -156,9 +156,9 @@ public:
/// Returns \b true if this Platform plug-in was able to find
/// a suitable executable, \b false otherwise.
//------------------------------------------------------------------
- virtual Error ResolveExecutable(const ModuleSpec &module_spec,
- lldb::ModuleSP &module_sp,
- const FileSpecList *module_search_paths_ptr);
+ virtual Status ResolveExecutable(const ModuleSpec &module_spec,
+ lldb::ModuleSP &module_sp,
+ const FileSpecList *module_search_paths_ptr);
//------------------------------------------------------------------
/// Find a symbol file given a symbol file module specification.
@@ -207,8 +207,8 @@ public:
/// @return
/// Returns an error that describes success or failure.
//------------------------------------------------------------------
- virtual Error ResolveSymbolFile(Target &target, const ModuleSpec &sym_spec,
- FileSpec &sym_file);
+ virtual Status ResolveSymbolFile(Target &target, const ModuleSpec &sym_spec,
+ FileSpec &sym_file);
//------------------------------------------------------------------
/// Resolves the FileSpec to a (possibly) remote path. Remote
@@ -316,8 +316,8 @@ public:
/// @return
/// An error object.
//------------------------------------------------------------------
- virtual Error GetFileWithUUID(const FileSpec &platform_file,
- const UUID *uuid_ptr, FileSpec &local_file);
+ virtual Status GetFileWithUUID(const FileSpec &platform_file,
+ const UUID *uuid_ptr, FileSpec &local_file);
//----------------------------------------------------------------------
// Locate the scripting resource given a module specification.
@@ -329,18 +329,18 @@ public:
LocateExecutableScriptingResources(Target *target, Module &module,
Stream *feedback_stream);
- virtual Error GetSharedModule(const ModuleSpec &module_spec, Process *process,
- lldb::ModuleSP &module_sp,
- const FileSpecList *module_search_paths_ptr,
- lldb::ModuleSP *old_module_sp_ptr,
- bool *did_create_ptr);
+ virtual Status GetSharedModule(const ModuleSpec &module_spec,
+ Process *process, lldb::ModuleSP &module_sp,
+ const FileSpecList *module_search_paths_ptr,
+ lldb::ModuleSP *old_module_sp_ptr,
+ bool *did_create_ptr);
virtual bool GetModuleSpec(const FileSpec &module_file_spec,
const ArchSpec &arch, ModuleSpec &module_spec);
- virtual Error ConnectRemote(Args &args);
+ virtual Status ConnectRemote(Args &args);
- virtual Error DisconnectRemote();
+ virtual Status DisconnectRemote();
//------------------------------------------------------------------
/// Get the platform's supported architectures in the order in which
@@ -367,7 +367,7 @@ public:
/// Launch a new process on a platform, not necessarily for
/// debugging, it could be just for running the process.
//------------------------------------------------------------------
- virtual Error LaunchProcess(ProcessLaunchInfo &launch_info);
+ virtual Status LaunchProcess(ProcessLaunchInfo &launch_info);
//------------------------------------------------------------------
/// Perform expansion of the command-line for this launch info
@@ -376,12 +376,12 @@ public:
// argument magic the platform defines as part of its typical
// user experience
//------------------------------------------------------------------
- virtual Error ShellExpandArguments(ProcessLaunchInfo &launch_info);
+ virtual Status ShellExpandArguments(ProcessLaunchInfo &launch_info);
//------------------------------------------------------------------
/// Kill process on a platform.
//------------------------------------------------------------------
- virtual Error KillProcess(const lldb::pid_t pid);
+ virtual Status KillProcess(const lldb::pid_t pid);
//------------------------------------------------------------------
/// Lets a platform answer if it is compatible with a given
@@ -411,13 +411,13 @@ public:
DebugProcess(ProcessLaunchInfo &launch_info, Debugger &debugger,
Target *target, // Can be nullptr, if nullptr create a new
// target, else use existing one
- Error &error);
+ Status &error);
virtual lldb::ProcessSP ConnectProcess(llvm::StringRef connect_url,
llvm::StringRef plugin_name,
lldb_private::Debugger &debugger,
lldb_private::Target *target,
- lldb_private::Error &error);
+ lldb_private::Status &error);
//------------------------------------------------------------------
/// Attach to an existing process using a process ID.
@@ -442,7 +442,7 @@ public:
Target *target, // Can be nullptr, if nullptr
// create a new target, else
// use existing one
- Error &error) = 0;
+ Status &error) = 0;
//------------------------------------------------------------------
/// Attach to an existing process by process name.
@@ -464,7 +464,7 @@ public:
// virtual lldb::ProcessSP
// Attach (const char *process_name,
// bool wait_for_launch,
- // Error &error) = 0;
+ // Status &error) = 0;
//------------------------------------------------------------------
// The base class Platform will take care of the host platform.
@@ -552,27 +552,27 @@ public:
return false;
}
- virtual Error MakeDirectory(const FileSpec &file_spec, uint32_t permissions);
+ virtual Status MakeDirectory(const FileSpec &file_spec, uint32_t permissions);
- virtual Error GetFilePermissions(const FileSpec &file_spec,
- uint32_t &file_permissions);
+ virtual Status GetFilePermissions(const FileSpec &file_spec,
+ uint32_t &file_permissions);
- virtual Error SetFilePermissions(const FileSpec &file_spec,
- uint32_t file_permissions);
+ virtual Status SetFilePermissions(const FileSpec &file_spec,
+ uint32_t file_permissions);
virtual lldb::user_id_t OpenFile(const FileSpec &file_spec, uint32_t flags,
- uint32_t mode, Error &error) {
+ uint32_t mode, Status &error) {
return UINT64_MAX;
}
- virtual bool CloseFile(lldb::user_id_t fd, Error &error) { return false; }
+ virtual bool CloseFile(lldb::user_id_t fd, Status &error) { return false; }
virtual lldb::user_id_t GetFileSize(const FileSpec &file_spec) {
return UINT64_MAX;
}
virtual uint64_t ReadFile(lldb::user_id_t fd, uint64_t offset, void *dst,
- uint64_t dst_len, Error &error) {
+ uint64_t dst_len, Status &error) {
error.SetErrorStringWithFormat(
"Platform::ReadFile() is not supported in the %s platform",
GetName().GetCString());
@@ -580,19 +580,19 @@ public:
}
virtual uint64_t WriteFile(lldb::user_id_t fd, uint64_t offset,
- const void *src, uint64_t src_len, Error &error) {
+ const void *src, uint64_t src_len, Status &error) {
error.SetErrorStringWithFormat(
"Platform::ReadFile() is not supported in the %s platform",
GetName().GetCString());
return -1;
}
- virtual Error GetFile(const FileSpec &source, const FileSpec &destination);
+ virtual Status GetFile(const FileSpec &source, const FileSpec &destination);
- virtual Error PutFile(const FileSpec &source, const FileSpec &destination,
- uint32_t uid = UINT32_MAX, uint32_t gid = UINT32_MAX);
+ virtual Status PutFile(const FileSpec &source, const FileSpec &destination,
+ uint32_t uid = UINT32_MAX, uint32_t gid = UINT32_MAX);
- virtual Error
+ virtual Status
CreateSymlink(const FileSpec &src, // The name of the link is in src
const FileSpec &dst); // The symlink points to dst
@@ -620,13 +620,13 @@ public:
/// @return
/// An error object that describes anything that went wrong.
//----------------------------------------------------------------------
- virtual Error Install(const FileSpec &src, const FileSpec &dst);
+ virtual Status Install(const FileSpec &src, const FileSpec &dst);
virtual size_t GetEnvironment(StringList &environment);
virtual bool GetFileExists(const lldb_private::FileSpec &file_spec);
- virtual Error Unlink(const FileSpec &file_spec);
+ virtual Status Unlink(const FileSpec &file_spec);
virtual uint64_t ConvertMmapFlagsToPlatform(const ArchSpec &arch,
unsigned flags);
@@ -664,7 +664,7 @@ public:
return nullptr;
}
- virtual lldb_private::Error RunShellCommand(
+ virtual lldb_private::Status RunShellCommand(
const char *command, // Shouldn't be nullptr
const FileSpec &working_dir, // Pass empty FileSpec to use the current
// working directory
@@ -830,14 +830,14 @@ public:
uint32_t LoadImage(lldb_private::Process *process,
const lldb_private::FileSpec &local_file,
const lldb_private::FileSpec &remote_file,
- lldb_private::Error &error);
+ lldb_private::Status &error);
virtual uint32_t DoLoadImage(lldb_private::Process *process,
const lldb_private::FileSpec &remote_file,
- lldb_private::Error &error);
+ lldb_private::Status &error);
- virtual Error UnloadImage(lldb_private::Process *process,
- uint32_t image_token);
+ virtual Status UnloadImage(lldb_private::Process *process,
+ uint32_t image_token);
//------------------------------------------------------------------
/// Connect to all processes waiting for a debugger to attach
@@ -856,7 +856,7 @@ public:
/// The number of processes we are successfully connected to.
//------------------------------------------------------------------
virtual size_t ConnectToWaitingProcesses(lldb_private::Debugger &debugger,
- lldb_private::Error &error);
+ lldb_private::Status &error);
protected:
bool m_is_host;
@@ -977,35 +977,35 @@ protected:
m_gid_map.clear();
}
- Error GetCachedExecutable(ModuleSpec &module_spec, lldb::ModuleSP &module_sp,
- const FileSpecList *module_search_paths_ptr,
- Platform &remote_platform);
+ Status GetCachedExecutable(ModuleSpec &module_spec, lldb::ModuleSP &module_sp,
+ const FileSpecList *module_search_paths_ptr,
+ Platform &remote_platform);
- virtual Error DownloadModuleSlice(const FileSpec &src_file_spec,
- const uint64_t src_offset,
- const uint64_t src_size,
- const FileSpec &dst_file_spec);
+ virtual Status DownloadModuleSlice(const FileSpec &src_file_spec,
+ const uint64_t src_offset,
+ const uint64_t src_size,
+ const FileSpec &dst_file_spec);
- virtual Error DownloadSymbolFile(const lldb::ModuleSP &module_sp,
- const FileSpec &dst_file_spec);
+ virtual Status DownloadSymbolFile(const lldb::ModuleSP &module_sp,
+ const FileSpec &dst_file_spec);
virtual const char *GetCacheHostname();
private:
- typedef std::function<Error(const ModuleSpec &)> ModuleResolver;
+ typedef std::function<Status(const ModuleSpec &)> ModuleResolver;
- Error GetRemoteSharedModule(const ModuleSpec &module_spec, Process *process,
- lldb::ModuleSP &module_sp,
- const ModuleResolver &module_resolver,
- bool *did_create_ptr);
+ Status GetRemoteSharedModule(const ModuleSpec &module_spec, Process *process,
+ lldb::ModuleSP &module_sp,
+ const ModuleResolver &module_resolver,
+ bool *did_create_ptr);
bool GetCachedSharedModule(const ModuleSpec &module_spec,
lldb::ModuleSP &module_sp, bool *did_create_ptr);
- Error LoadCachedExecutable(const ModuleSpec &module_spec,
- lldb::ModuleSP &module_sp,
- const FileSpecList *module_search_paths_ptr,
- Platform &remote_platform);
+ Status LoadCachedExecutable(const ModuleSpec &module_spec,
+ lldb::ModuleSP &module_sp,
+ const FileSpecList *module_search_paths_ptr,
+ Platform &remote_platform);
FileSpec GetModuleCacheRoot();
@@ -1088,7 +1088,7 @@ public:
~OptionGroupPlatformRSync() override = default;
- lldb_private::Error
+ lldb_private::Status
SetOptionValue(uint32_t option_idx, llvm::StringRef option_value,
ExecutionContext *execution_context) override;
@@ -1117,7 +1117,7 @@ public:
~OptionGroupPlatformSSH() override = default;
- lldb_private::Error
+ lldb_private::Status
SetOptionValue(uint32_t option_idx, llvm::StringRef option_value,
ExecutionContext *execution_context) override;
@@ -1144,7 +1144,7 @@ public:
~OptionGroupPlatformCaching() override = default;
- lldb_private::Error
+ lldb_private::Status
SetOptionValue(uint32_t option_idx, llvm::StringRef option_value,
ExecutionContext *execution_context) override;
diff --git a/include/lldb/Target/Process.h b/include/lldb/Target/Process.h
index 9a749efa7ae1..d2ab85d1652a 100644
--- a/include/lldb/Target/Process.h
+++ b/include/lldb/Target/Process.h
@@ -48,8 +48,8 @@
#include "lldb/Target/ProcessLaunchInfo.h"
#include "lldb/Target/QueueList.h"
#include "lldb/Target/ThreadList.h"
-#include "lldb/Utility/Error.h"
#include "lldb/Utility/NameMatches.h"
+#include "lldb/Utility/Status.h"
#include "lldb/lldb-private.h"
#include "llvm/ADT/ArrayRef.h"
@@ -282,8 +282,8 @@ public:
~ProcessLaunchCommandOptions() override = default;
- Error SetOptionValue(uint32_t option_idx, llvm::StringRef option_arg,
- ExecutionContext *execution_context) override;
+ Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_arg,
+ ExecutionContext *execution_context) override;
void OptionParsingStarting(ExecutionContext *execution_context) override {
launch_info.Clear();
@@ -792,12 +792,12 @@ public:
/// An error object. Call GetID() to get the process ID if
/// the error object is success.
//------------------------------------------------------------------
- virtual Error Launch(ProcessLaunchInfo &launch_info);
+ virtual Status Launch(ProcessLaunchInfo &launch_info);
- virtual Error LoadCore();
+ virtual Status LoadCore();
- virtual Error DoLoadCore() {
- Error error;
+ virtual Status DoLoadCore() {
+ Status error;
error.SetErrorStringWithFormat(
"error: %s does not support loading core files.",
GetPluginName().GetCString());
@@ -869,7 +869,7 @@ public:
/// Returns \a pid if attaching was successful, or
/// LLDB_INVALID_PROCESS_ID if attaching fails.
//------------------------------------------------------------------
- virtual Error Attach(ProcessAttachInfo &attach_info);
+ virtual Status Attach(ProcessAttachInfo &attach_info);
//------------------------------------------------------------------
/// Attach to a remote system via a URL
@@ -885,7 +885,7 @@ public:
/// @return
/// Returns an error object.
//------------------------------------------------------------------
- virtual Error ConnectRemote(Stream *strm, llvm::StringRef remote_url);
+ virtual Status ConnectRemote(Stream *strm, llvm::StringRef remote_url);
bool GetShouldDetach() const { return m_should_detach; }
@@ -992,9 +992,9 @@ public:
/// @see Thread:Step()
/// @see Thread:Suspend()
//------------------------------------------------------------------
- Error Resume();
+ Status Resume();
- Error ResumeSynchronous(Stream *stream);
+ Status ResumeSynchronous(Stream *stream);
//------------------------------------------------------------------
/// Halts a running process.
@@ -1016,7 +1016,7 @@ public:
/// halted.
/// otherwise the halt has failed.
//------------------------------------------------------------------
- Error Halt(bool clear_thread_plans = false, bool use_run_lock = true);
+ Status Halt(bool clear_thread_plans = false, bool use_run_lock = true);
//------------------------------------------------------------------
/// Detaches from a running or stopped process.
@@ -1030,7 +1030,7 @@ public:
/// @return
/// Returns an error object.
//------------------------------------------------------------------
- Error Detach(bool keep_stopped);
+ Status Detach(bool keep_stopped);
//------------------------------------------------------------------
/// Kills the process and shuts down all threads that were spawned
@@ -1050,7 +1050,7 @@ public:
/// @return
/// Returns an error object.
//------------------------------------------------------------------
- Error Destroy(bool force_kill);
+ Status Destroy(bool force_kill);
//------------------------------------------------------------------
/// Sends a process a UNIX signal \a signal.
@@ -1061,7 +1061,7 @@ public:
/// @return
/// Returns an error object.
//------------------------------------------------------------------
- Error Signal(int signal);
+ Status Signal(int signal);
void SetUnixSignals(lldb::UnixSignalsSP &&signals_sp);
@@ -1080,7 +1080,7 @@ public:
/// @return
/// Returns an error object.
//------------------------------------------------------------------
- virtual Error WillAttachToProcessWithID(lldb::pid_t pid) { return Error(); }
+ virtual Status WillAttachToProcessWithID(lldb::pid_t pid) { return Status(); }
//------------------------------------------------------------------
/// Called before attaching to a process.
@@ -1091,9 +1091,9 @@ public:
/// @return
/// Returns an error object.
//------------------------------------------------------------------
- virtual Error WillAttachToProcessWithName(const char *process_name,
- bool wait_for_launch) {
- return Error();
+ virtual Status WillAttachToProcessWithName(const char *process_name,
+ bool wait_for_launch) {
+ return Status();
}
//------------------------------------------------------------------
@@ -1110,8 +1110,8 @@ public:
/// @return
/// Returns an error object.
//------------------------------------------------------------------
- virtual Error DoConnectRemote(Stream *strm, llvm::StringRef remote_url) {
- Error error;
+ virtual Status DoConnectRemote(Stream *strm, llvm::StringRef remote_url) {
+ Status error;
error.SetErrorString("remote connections are not supported");
return error;
}
@@ -1127,14 +1127,14 @@ public:
/// will return the uid to attach as.
///
/// @return
- /// Returns a successful Error attaching was successful, or
+ /// Returns a successful Status attaching was successful, or
/// an appropriate (possibly platform-specific) error code if
/// attaching fails.
/// hanming : need flag
//------------------------------------------------------------------
- virtual Error DoAttachToProcessWithID(lldb::pid_t pid,
- const ProcessAttachInfo &attach_info) {
- Error error;
+ virtual Status DoAttachToProcessWithID(lldb::pid_t pid,
+ const ProcessAttachInfo &attach_info) {
+ Status error;
error.SetErrorStringWithFormat(
"error: %s does not support attaching to a process by pid",
GetPluginName().GetCString());
@@ -1152,14 +1152,14 @@ public:
/// will return the uid to attach as.
///
/// @return
- /// Returns a successful Error attaching was successful, or
+ /// Returns a successful Status attaching was successful, or
/// an appropriate (possibly platform-specific) error code if
/// attaching fails.
//------------------------------------------------------------------
- virtual Error
+ virtual Status
DoAttachToProcessWithName(const char *process_name,
const ProcessAttachInfo &attach_info) {
- Error error;
+ Status error;
error.SetErrorString("attach by name is not supported");
return error;
}
@@ -1202,7 +1202,7 @@ public:
/// @return
/// Returns an error object.
//------------------------------------------------------------------
- virtual Error WillLaunch(Module *module) { return Error(); }
+ virtual Status WillLaunch(Module *module) { return Status(); }
//------------------------------------------------------------------
/// Launch a new process.
@@ -1220,11 +1220,11 @@ public:
/// requested launch.
///
/// @return
- /// An Error instance indicating success or failure of the
+ /// An Status instance indicating success or failure of the
/// operation.
//------------------------------------------------------------------
- virtual Error DoLaunch(Module *exe_module, ProcessLaunchInfo &launch_info) {
- Error error;
+ virtual Status DoLaunch(Module *exe_module, ProcessLaunchInfo &launch_info) {
+ Status error;
error.SetErrorStringWithFormat(
"error: %s does not support launching processes",
GetPluginName().GetCString());
@@ -1248,7 +1248,7 @@ public:
/// @return
/// Returns an error object.
//------------------------------------------------------------------
- virtual Error WillResume() { return Error(); }
+ virtual Status WillResume() { return Status(); }
//------------------------------------------------------------------
/// Resumes all of a process's threads as configured using the
@@ -1267,8 +1267,8 @@ public:
/// @see Thread:Step()
/// @see Thread:Suspend()
//------------------------------------------------------------------
- virtual Error DoResume() {
- Error error;
+ virtual Status DoResume() {
+ Status error;
error.SetErrorStringWithFormat(
"error: %s does not support resuming processes",
GetPluginName().GetCString());
@@ -1292,7 +1292,7 @@ public:
/// @return
/// Returns an error object.
//------------------------------------------------------------------
- virtual Error WillHalt() { return Error(); }
+ virtual Status WillHalt() { return Status(); }
//------------------------------------------------------------------
/// Halts a running process.
@@ -1314,8 +1314,8 @@ public:
/// Returns \b true if the process successfully halts, \b false
/// otherwise.
//------------------------------------------------------------------
- virtual Error DoHalt(bool &caused_stop) {
- Error error;
+ virtual Status DoHalt(bool &caused_stop) {
+ Status error;
error.SetErrorStringWithFormat(
"error: %s does not support halting processes",
GetPluginName().GetCString());
@@ -1339,7 +1339,7 @@ public:
/// @return
/// Returns an error object.
//------------------------------------------------------------------
- virtual Error WillDetach() { return Error(); }
+ virtual Status WillDetach() { return Status(); }
//------------------------------------------------------------------
/// Detaches from a running or stopped process.
@@ -1348,8 +1348,8 @@ public:
/// Returns \b true if the process successfully detaches, \b
/// false otherwise.
//------------------------------------------------------------------
- virtual Error DoDetach(bool keep_stopped) {
- Error error;
+ virtual Status DoDetach(bool keep_stopped) {
+ Status error;
error.SetErrorStringWithFormat(
"error: %s does not support detaching from processes",
GetPluginName().GetCString());
@@ -1377,7 +1377,7 @@ public:
/// Process::DoSignal(int), otherwise an error describing what
/// prevents the signal from being sent.
//------------------------------------------------------------------
- virtual Error WillSignal() { return Error(); }
+ virtual Status WillSignal() { return Status(); }
//------------------------------------------------------------------
/// Sends a process a UNIX signal \a signal.
@@ -1385,17 +1385,17 @@ public:
/// @return
/// Returns an error object.
//------------------------------------------------------------------
- virtual Error DoSignal(int signal) {
- Error error;
+ virtual Status DoSignal(int signal) {
+ Status error;
error.SetErrorStringWithFormat(
"error: %s does not support sending signals to processes",
GetPluginName().GetCString());
return error;
}
- virtual Error WillDestroy() { return Error(); }
+ virtual Status WillDestroy() { return Status(); }
- virtual Error DoDestroy() = 0;
+ virtual Status DoDestroy() = 0;
virtual void DidDestroy() {}
@@ -1706,7 +1706,7 @@ public:
/// The number of bytes that were actually read into \a buf.
//------------------------------------------------------------------
virtual size_t DoReadMemory(lldb::addr_t vm_addr, void *buf, size_t size,
- Error &error) = 0;
+ Status &error) = 0;
//------------------------------------------------------------------
/// Read of memory from a process.
@@ -1738,7 +1738,7 @@ public:
/// returned to indicate an error.
//------------------------------------------------------------------
virtual size_t ReadMemory(lldb::addr_t vm_addr, void *buf, size_t size,
- Error &error);
+ Status &error);
//------------------------------------------------------------------
/// Read a NULL terminated string from memory
@@ -1770,7 +1770,7 @@ public:
/// The error status or the number of bytes prior to the null terminator.
//------------------------------------------------------------------
size_t ReadStringFromMemory(lldb::addr_t vm_addr, char *str, size_t max_bytes,
- Error &error, size_t type_width = 1);
+ Status &error, size_t type_width = 1);
//------------------------------------------------------------------
/// Read a NULL terminated C string from memory
@@ -1782,13 +1782,13 @@ public:
/// terminated (at most cstr_max_len - 1 bytes will be read).
//------------------------------------------------------------------
size_t ReadCStringFromMemory(lldb::addr_t vm_addr, char *cstr,
- size_t cstr_max_len, Error &error);
+ size_t cstr_max_len, Status &error);
size_t ReadCStringFromMemory(lldb::addr_t vm_addr, std::string &out_str,
- Error &error);
+ Status &error);
size_t ReadMemoryFromInferior(lldb::addr_t vm_addr, void *buf, size_t size,
- Error &error);
+ Status &error);
//------------------------------------------------------------------
/// Reads an unsigned integer of the specified byte size from
@@ -1819,15 +1819,15 @@ public:
//------------------------------------------------------------------
uint64_t ReadUnsignedIntegerFromMemory(lldb::addr_t load_addr,
size_t byte_size, uint64_t fail_value,
- Error &error);
+ Status &error);
int64_t ReadSignedIntegerFromMemory(lldb::addr_t load_addr, size_t byte_size,
- int64_t fail_value, Error &error);
+ int64_t fail_value, Status &error);
- lldb::addr_t ReadPointerFromMemory(lldb::addr_t vm_addr, Error &error);
+ lldb::addr_t ReadPointerFromMemory(lldb::addr_t vm_addr, Status &error);
bool WritePointerToMemory(lldb::addr_t vm_addr, lldb::addr_t ptr_value,
- Error &error);
+ Status &error);
//------------------------------------------------------------------
/// Actually do the writing of memory to a process.
@@ -1850,7 +1850,7 @@ public:
/// The number of bytes that were actually written.
//------------------------------------------------------------------
virtual size_t DoWriteMemory(lldb::addr_t vm_addr, const void *buf,
- size_t size, Error &error) {
+ size_t size, Status &error) {
error.SetErrorStringWithFormat(
"error: %s does not support writing to processes",
GetPluginName().GetCString());
@@ -1890,11 +1890,11 @@ public:
/// The number of bytes that were actually written.
//------------------------------------------------------------------
size_t WriteScalarToMemory(lldb::addr_t vm_addr, const Scalar &scalar,
- size_t size, Error &error);
+ size_t size, Status &error);
size_t ReadScalarIntegerFromMemory(lldb::addr_t addr, uint32_t byte_size,
bool is_signed, Scalar &scalar,
- Error &error);
+ Status &error);
//------------------------------------------------------------------
/// Write memory to a process.
@@ -1923,7 +1923,7 @@ public:
//------------------------------------------------------------------
// TODO: change this to take an ArrayRef<uint8_t>
size_t WriteMemory(lldb::addr_t vm_addr, const void *buf, size_t size,
- Error &error);
+ Status &error);
//------------------------------------------------------------------
/// Actually allocate memory in the process.
@@ -1941,7 +1941,7 @@ public:
//------------------------------------------------------------------
virtual lldb::addr_t DoAllocateMemory(size_t size, uint32_t permissions,
- Error &error) {
+ Status &error) {
error.SetErrorStringWithFormat(
"error: %s does not support allocating in the debug process",
GetPluginName().GetCString());
@@ -1971,7 +1971,7 @@ public:
/// The address of the allocated buffer in the process, or
/// LLDB_INVALID_ADDRESS if the allocation failed.
//------------------------------------------------------------------
- lldb::addr_t AllocateMemory(size_t size, uint32_t permissions, Error &error);
+ lldb::addr_t AllocateMemory(size_t size, uint32_t permissions, Status &error);
//------------------------------------------------------------------
/// The public interface to allocating memory in the process, this also
@@ -1998,7 +1998,8 @@ public:
/// LLDB_INVALID_ADDRESS if the allocation failed.
//------------------------------------------------------------------
- lldb::addr_t CallocateMemory(size_t size, uint32_t permissions, Error &error);
+ lldb::addr_t CallocateMemory(size_t size, uint32_t permissions,
+ Status &error);
//------------------------------------------------------------------
/// Resolve dynamically loaded indirect functions.
@@ -2014,7 +2015,7 @@ public:
/// LLDB_INVALID_ADDRESS if the resolution failed.
//------------------------------------------------------------------
virtual lldb::addr_t ResolveIndirectFunction(const Address *address,
- Error &error);
+ Status &error);
//------------------------------------------------------------------
/// Locate the memory region that contains load_addr.
@@ -2042,9 +2043,9 @@ public:
/// @return
/// An error value.
//------------------------------------------------------------------
- virtual Error GetMemoryRegionInfo(lldb::addr_t load_addr,
- MemoryRegionInfo &range_info) {
- Error error;
+ virtual Status GetMemoryRegionInfo(lldb::addr_t load_addr,
+ MemoryRegionInfo &range_info) {
+ Status error;
error.SetErrorString("Process::GetMemoryRegionInfo() not supported");
return error;
}
@@ -2059,18 +2060,18 @@ public:
/// @return
/// An error value.
//------------------------------------------------------------------
- virtual Error
+ virtual Status
GetMemoryRegions(std::vector<lldb::MemoryRegionInfoSP> &region_list);
- virtual Error GetWatchpointSupportInfo(uint32_t &num) {
- Error error;
+ virtual Status GetWatchpointSupportInfo(uint32_t &num) {
+ Status error;
num = 0;
error.SetErrorString("Process::GetWatchpointSupportInfo() not supported");
return error;
}
- virtual Error GetWatchpointSupportInfo(uint32_t &num, bool &after) {
- Error error;
+ virtual Status GetWatchpointSupportInfo(uint32_t &num, bool &after) {
+ Status error;
num = 0;
after = true;
error.SetErrorString("Process::GetWatchpointSupportInfo() not supported");
@@ -2165,8 +2166,8 @@ public:
/// @return
/// \btrue if the memory was deallocated, \bfalse otherwise.
//------------------------------------------------------------------
- virtual Error DoDeallocateMemory(lldb::addr_t ptr) {
- Error error;
+ virtual Status DoDeallocateMemory(lldb::addr_t ptr) {
+ Status error;
error.SetErrorStringWithFormat(
"error: %s does not support deallocating in the debug process",
GetPluginName().GetCString());
@@ -2186,7 +2187,7 @@ public:
/// @return
/// \btrue if the memory was deallocated, \bfalse otherwise.
//------------------------------------------------------------------
- Error DeallocateMemory(lldb::addr_t ptr);
+ Status DeallocateMemory(lldb::addr_t ptr);
//------------------------------------------------------------------
/// Get any available STDOUT.
@@ -2218,7 +2219,7 @@ public:
/// equal to \a buf_size, another call to this function should
/// be made to retrieve more STDOUT data.
//------------------------------------------------------------------
- virtual size_t GetSTDOUT(char *buf, size_t buf_size, Error &error);
+ virtual size_t GetSTDOUT(char *buf, size_t buf_size, Status &error);
//------------------------------------------------------------------
/// Get any available STDERR.
@@ -2250,7 +2251,7 @@ public:
/// equal to \a buf_size, another call to this function should
/// be made to retrieve more STDERR data.
//------------------------------------------------------------------
- virtual size_t GetSTDERR(char *buf, size_t buf_size, Error &error);
+ virtual size_t GetSTDERR(char *buf, size_t buf_size, Status &error);
//------------------------------------------------------------------
/// Puts data into this process's STDIN.
@@ -2273,7 +2274,7 @@ public:
/// less than \a buf_size, another call to this function should
/// be made to write the rest of the data.
//------------------------------------------------------------------
- virtual size_t PutSTDIN(const char *buf, size_t buf_size, Error &error) {
+ virtual size_t PutSTDIN(const char *buf, size_t buf_size, Status &error) {
error.SetErrorString("stdin unsupported");
return 0;
}
@@ -2293,23 +2294,23 @@ public:
/// equal to \a buf_size, another call to this function should
/// be made to retrieve more profile data.
//------------------------------------------------------------------
- virtual size_t GetAsyncProfileData(char *buf, size_t buf_size, Error &error);
+ virtual size_t GetAsyncProfileData(char *buf, size_t buf_size, Status &error);
//----------------------------------------------------------------------
// Process Breakpoints
//----------------------------------------------------------------------
size_t GetSoftwareBreakpointTrapOpcode(BreakpointSite *bp_site);
- virtual Error EnableBreakpointSite(BreakpointSite *bp_site) {
- Error error;
+ virtual Status EnableBreakpointSite(BreakpointSite *bp_site) {
+ Status error;
error.SetErrorStringWithFormat(
"error: %s does not support enabling breakpoints",
GetPluginName().GetCString());
return error;
}
- virtual Error DisableBreakpointSite(BreakpointSite *bp_site) {
- Error error;
+ virtual Status DisableBreakpointSite(BreakpointSite *bp_site) {
+ Status error;
error.SetErrorStringWithFormat(
"error: %s does not support disabling breakpoints",
GetPluginName().GetCString());
@@ -2320,13 +2321,13 @@ public:
// don't need to implement this function unless the standard flow of
// read existing opcode, write breakpoint opcode, verify breakpoint opcode
// doesn't work for a specific process plug-in.
- virtual Error EnableSoftwareBreakpoint(BreakpointSite *bp_site);
+ virtual Status EnableSoftwareBreakpoint(BreakpointSite *bp_site);
// This is implemented completely using the lldb::Process API. Subclasses
// don't need to implement this function unless the standard flow of
// restoring original opcode in memory and verifying the restored opcode
// doesn't work for a specific process plug-in.
- virtual Error DisableSoftwareBreakpoint(BreakpointSite *bp_site);
+ virtual Status DisableSoftwareBreakpoint(BreakpointSite *bp_site);
BreakpointSiteList &GetBreakpointSiteList();
@@ -2334,14 +2335,14 @@ public:
void DisableAllBreakpointSites();
- Error ClearBreakpointSiteByID(lldb::user_id_t break_id);
+ Status ClearBreakpointSiteByID(lldb::user_id_t break_id);
lldb::break_id_t CreateBreakpointSite(const lldb::BreakpointLocationSP &owner,
bool use_hardware);
- Error DisableBreakpointSiteByID(lldb::user_id_t break_id);
+ Status DisableBreakpointSiteByID(lldb::user_id_t break_id);
- Error EnableBreakpointSiteByID(lldb::user_id_t break_id);
+ Status EnableBreakpointSiteByID(lldb::user_id_t break_id);
// BreakpointLocations use RemoveOwnerFromBreakpointSite to remove
// themselves from the owner's list of this breakpoint sites.
@@ -2352,9 +2353,9 @@ public:
//----------------------------------------------------------------------
// Process Watchpoints (optional)
//----------------------------------------------------------------------
- virtual Error EnableWatchpoint(Watchpoint *wp, bool notify = true);
+ virtual Status EnableWatchpoint(Watchpoint *wp, bool notify = true);
- virtual Error DisableWatchpoint(Watchpoint *wp, bool notify = true);
+ virtual Status DisableWatchpoint(Watchpoint *wp, bool notify = true);
//------------------------------------------------------------------
// Thread Queries
@@ -2613,8 +2614,8 @@ public:
ProcessRunLock &GetRunLock();
- virtual Error SendEventData(const char *data) {
- Error return_error("Sending an event is not supported for this process.");
+ virtual Status SendEventData(const char *data) {
+ Status return_error("Sending an event is not supported for this process.");
return return_error;
}
@@ -2665,9 +2666,9 @@ public:
/// The load address of the file if it is loaded into the
/// processes address space, LLDB_INVALID_ADDRESS otherwise.
//------------------------------------------------------------------
- virtual Error GetFileLoadAddress(const FileSpec &file, bool &is_loaded,
- lldb::addr_t &load_addr) {
- return Error("Not supported");
+ virtual Status GetFileLoadAddress(const FileSpec &file, bool &is_loaded,
+ lldb::addr_t &load_addr) {
+ return Status("Not supported");
}
size_t AddImageToken(lldb::addr_t image_ptr);
@@ -2729,7 +2730,7 @@ public:
/// @return
/// Returns the result of attempting to configure the feature.
//------------------------------------------------------------------
- virtual Error
+ virtual Status
ConfigureStructuredData(const ConstString &type_name,
const StructuredData::ObjectSP &config_sp);
@@ -2781,7 +2782,7 @@ public:
/// configuration.
//------------------------------------------------------------------
virtual lldb::user_id_t StartTrace(lldb::TraceOptionsSP &options,
- Error &error) {
+ Status &error) {
error.SetErrorString("Not implemented");
return LLDB_INVALID_UID;
}
@@ -2796,7 +2797,7 @@ public:
/// to be stopped a thread_id can be supplied.
//------------------------------------------------------------------
virtual void StopTrace(lldb::user_id_t uid, lldb::tid_t thread_id,
- Error &error) {
+ Status &error) {
error.SetErrorString("Not implemented");
}
@@ -2809,7 +2810,7 @@ public:
/// thread for trace extraction.
//------------------------------------------------------------------
virtual size_t GetData(lldb::user_id_t uid, lldb::tid_t thread_id,
- Error &error, void *buf, size_t size,
+ Status &error, void *buf, size_t size,
size_t offset = 0) {
error.SetErrorString("Not implemented");
return 0;
@@ -2819,7 +2820,7 @@ public:
/// Similar API as above except for obtaining meta data
//------------------------------------------------------------------
virtual size_t GetMetaData(lldb::user_id_t uid, lldb::tid_t thread_id,
- Error &error, void *buf, size_t size,
+ Status &error, void *buf, size_t size,
size_t offset = 0) {
error.SetErrorString("Not implemented");
return 0;
@@ -2834,7 +2835,7 @@ public:
/// configuration used by a specific thread. The thread_id specified
/// should also match the uid otherwise an error will be returned.
//------------------------------------------------------------------
- virtual void GetTraceConfig(lldb::user_id_t uid, Error &error,
+ virtual void GetTraceConfig(lldb::user_id_t uid, Status &error,
lldb::TraceOptionsSP &options) {
error.SetErrorString("Not implemented");
return;
@@ -2850,9 +2851,9 @@ protected:
/// state of m_run_lock, but just causes the process to resume.
///
/// @return
- /// An Error object describing the success or failure of the resume.
+ /// An Status object describing the success or failure of the resume.
//------------------------------------------------------------------
- Error PrivateResume();
+ Status PrivateResume();
//------------------------------------------------------------------
// Called internally
@@ -3179,7 +3180,7 @@ private:
protected:
void HandlePrivateEvent(lldb::EventSP &event_sp);
- Error HaltPrivate();
+ Status HaltPrivate();
lldb::StateType WaitForProcessStopPrivate(lldb::EventSP &event_sp,
const Timeout<std::micro> &timeout);
@@ -3196,7 +3197,7 @@ protected:
const Timeout<std::micro> &timeout);
size_t WriteMemoryPrivate(lldb::addr_t addr, const void *buf, size_t size,
- Error &error);
+ Status &error);
void AppendSTDOUT(const char *s, size_t len);
@@ -3217,9 +3218,9 @@ protected:
return static_cast<bool>(m_process_input_reader);
}
- Error StopForDestroyOrDetach(lldb::EventSP &exit_event_sp);
+ Status StopForDestroyOrDetach(lldb::EventSP &exit_event_sp);
- virtual Error UpdateAutomaticSignalFiltering();
+ virtual Status UpdateAutomaticSignalFiltering();
bool StateChangedIsExternallyHijacked();
diff --git a/include/lldb/Target/ProcessLaunchInfo.h b/include/lldb/Target/ProcessLaunchInfo.h
index 083e0bbed8bd..93a1a9ebd239 100644
--- a/include/lldb/Target/ProcessLaunchInfo.h
+++ b/include/lldb/Target/ProcessLaunchInfo.h
@@ -94,7 +94,7 @@ public:
void Clear();
- bool ConvertArgumentsForLaunchingInShell(Error &error, bool localhost,
+ bool ConvertArgumentsForLaunchingInShell(Status &error, bool localhost,
bool will_debug,
bool first_arg_is_full_shell_command,
int32_t num_resumes);
diff --git a/include/lldb/Target/ProcessStructReader.h b/include/lldb/Target/ProcessStructReader.h
index acc5c1f32686..cfc8fe11a39a 100644
--- a/include/lldb/Target/ProcessStructReader.h
+++ b/include/lldb/Target/ProcessStructReader.h
@@ -17,7 +17,7 @@
#include "lldb/Target/Process.h"
#include "lldb/Utility/ConstString.h"
#include "lldb/Utility/DataExtractor.h"
-#include "lldb/Utility/Error.h"
+#include "lldb/Utility/Status.h"
#include <initializer_list>
#include <map>
@@ -68,7 +68,7 @@ public:
}
size_t total_size = struct_type.GetByteSize(nullptr);
lldb::DataBufferSP buffer_sp(new DataBufferHeap(total_size, 0));
- Error error;
+ Status error;
process->ReadMemoryFromInferior(base_addr, buffer_sp->GetBytes(),
total_size, error);
if (error.Fail())
diff --git a/include/lldb/Target/RegisterContext.h b/include/lldb/Target/RegisterContext.h
index 485645b2dc14..c438a0cd12cf 100644
--- a/include/lldb/Target/RegisterContext.h
+++ b/include/lldb/Target/RegisterContext.h
@@ -138,12 +138,12 @@ public:
virtual bool HardwareSingleStep(bool enable);
- virtual Error
+ virtual Status
ReadRegisterValueFromMemory(const lldb_private::RegisterInfo *reg_info,
lldb::addr_t src_addr, uint32_t src_len,
RegisterValue &reg_value);
- virtual Error
+ virtual Status
WriteRegisterValueToMemory(const lldb_private::RegisterInfo *reg_info,
lldb::addr_t dst_addr, uint32_t dst_len,
const RegisterValue &reg_value);
diff --git a/include/lldb/Target/StackFrame.h b/include/lldb/Target/StackFrame.h
index 1f25575e236a..cb503875a5c0 100644
--- a/include/lldb/Target/StackFrame.h
+++ b/include/lldb/Target/StackFrame.h
@@ -24,7 +24,7 @@
#include "lldb/Symbol/SymbolContext.h"
#include "lldb/Target/ExecutionContextScope.h"
#include "lldb/Target/StackID.h"
-#include "lldb/Utility/Error.h"
+#include "lldb/Utility/Status.h"
#include "lldb/Utility/StreamString.h"
#include "lldb/Utility/UserID.h"
@@ -201,7 +201,7 @@ public:
/// Returns true if the CFA value was successfully set in value. Some
/// frames may be unable to provide this value; they will return false.
//------------------------------------------------------------------
- bool GetFrameBaseValue(Scalar &value, Error *error_ptr);
+ bool GetFrameBaseValue(Scalar &value, Status *error_ptr);
//------------------------------------------------------------------
/// Get the DWARFExpression corresponding to the Canonical Frame Address.
@@ -215,7 +215,7 @@ public:
/// @return
/// Returns the corresponding DWARF expression, or NULL.
//------------------------------------------------------------------
- DWARFExpression *GetFrameBaseExpression(Error *error_ptr);
+ DWARFExpression *GetFrameBaseExpression(Status *error_ptr);
//------------------------------------------------------------------
/// Get the current lexical scope block for this StackFrame, if possible.
@@ -315,7 +315,7 @@ public:
//------------------------------------------------------------------
lldb::ValueObjectSP GetValueForVariableExpressionPath(
llvm::StringRef var_expr, lldb::DynamicValueType use_dynamic,
- uint32_t options, lldb::VariableSP &var_sp, Error &error);
+ uint32_t options, lldb::VariableSP &var_sp, Status &error);
//------------------------------------------------------------------
/// Determine whether this StackFrame has debug information available or not
@@ -535,7 +535,7 @@ private:
SymbolContext m_sc;
Flags m_flags;
Scalar m_frame_base;
- Error m_frame_base_error;
+ Status m_frame_base_error;
bool m_cfa_is_valid; // Does this frame have a CFA? Different from CFA ==
// LLDB_INVALID_ADDRESS
uint32_t m_stop_id;
diff --git a/include/lldb/Target/StructuredDataPlugin.h b/include/lldb/Target/StructuredDataPlugin.h
index aa4452a9c3f2..a4d2c0382628 100644
--- a/include/lldb/Target/StructuredDataPlugin.h
+++ b/include/lldb/Target/StructuredDataPlugin.h
@@ -123,8 +123,8 @@ public:
/// The error if formatting the object contents failed; otherwise,
/// success.
// -------------------------------------------------------------------------
- virtual Error GetDescription(const StructuredData::ObjectSP &object_sp,
- lldb_private::Stream &stream) = 0;
+ virtual Status GetDescription(const StructuredData::ObjectSP &object_sp,
+ lldb_private::Stream &stream) = 0;
// -------------------------------------------------------------------------
/// Returns whether the plugin's features are enabled.
diff --git a/include/lldb/Target/Target.h b/include/lldb/Target/Target.h
index 8aa263f59254..ff9451939909 100644
--- a/include/lldb/Target/Target.h
+++ b/include/lldb/Target/Target.h
@@ -490,7 +490,7 @@ public:
// UpdateInstanceName ();
lldb::ModuleSP GetSharedModule(const ModuleSpec &module_spec,
- Error *error_ptr = nullptr);
+ Status *error_ptr = nullptr);
//----------------------------------------------------------------------
// Settings accessors
@@ -528,11 +528,11 @@ public:
void Destroy();
- Error Launch(ProcessLaunchInfo &launch_info,
- Stream *stream); // Optional stream to receive first stop info
+ Status Launch(ProcessLaunchInfo &launch_info,
+ Stream *stream); // Optional stream to receive first stop info
- Error Attach(ProcessAttachInfo &attach_info,
- Stream *stream); // Optional stream to receive first stop info
+ Status Attach(ProcessAttachInfo &attach_info,
+ Stream *stream); // Optional stream to receive first stop info
//------------------------------------------------------------------
// This part handles the breakpoints.
@@ -611,7 +611,7 @@ public:
CreateExceptionBreakpoint(enum lldb::LanguageType language, bool catch_bp,
bool throw_bp, bool internal,
Args *additional_args = nullptr,
- Error *additional_args_error = nullptr);
+ Status *additional_args_error = nullptr);
// This is the same as the func_name breakpoint except that you can specify a
// vector of names. This is cheaper
@@ -644,7 +644,7 @@ public:
// Use this to create a watchpoint:
lldb::WatchpointSP CreateWatchpoint(lldb::addr_t addr, size_t size,
const CompilerType *type, uint32_t kind,
- Error &error);
+ Status &error);
lldb::WatchpointSP GetLastCreatedWatchpoint() {
return m_last_created_watchpoint;
@@ -687,15 +687,16 @@ public:
bool IgnoreWatchpointByID(lldb::watch_id_t watch_id, uint32_t ignore_count);
- Error SerializeBreakpointsToFile(const FileSpec &file,
- const BreakpointIDList &bp_ids, bool append);
+ Status SerializeBreakpointsToFile(const FileSpec &file,
+ const BreakpointIDList &bp_ids,
+ bool append);
- Error CreateBreakpointsFromFile(const FileSpec &file,
- BreakpointIDList &new_bps);
+ Status CreateBreakpointsFromFile(const FileSpec &file,
+ BreakpointIDList &new_bps);
- Error CreateBreakpointsFromFile(const FileSpec &file,
- std::vector<std::string> &names,
- BreakpointIDList &new_bps);
+ Status CreateBreakpointsFromFile(const FileSpec &file,
+ std::vector<std::string> &names,
+ BreakpointIDList &new_bps);
//------------------------------------------------------------------
/// Get \a load_addr as a callable code load address for this target
@@ -808,7 +809,7 @@ public:
//------------------------------------------------------------------
void SetExecutableModule(lldb::ModuleSP &module_sp, bool get_dependent_files);
- bool LoadScriptingResources(std::list<Error> &errors,
+ bool LoadScriptingResources(std::list<Status> &errors,
Stream *feedback_stream = nullptr,
bool continue_on_error = true) {
return m_images.LoadScriptingResourcesInTarget(
@@ -914,7 +915,7 @@ public:
Debugger &GetDebugger() { return m_debugger; }
size_t ReadMemoryFromFileCache(const Address &addr, void *dst, size_t dst_len,
- Error &error);
+ Status &error);
// Reading memory through the target allows us to skip going to the process
// for reading memory if possible and it allows us to try and read from
@@ -927,27 +928,27 @@ public:
// 2 - if there is a valid process, try and read from its memory
// 3 - if (prefer_file_cache == false) then read from object file cache
size_t ReadMemory(const Address &addr, bool prefer_file_cache, void *dst,
- size_t dst_len, Error &error,
+ size_t dst_len, Status &error,
lldb::addr_t *load_addr_ptr = nullptr);
size_t ReadCStringFromMemory(const Address &addr, std::string &out_str,
- Error &error);
+ Status &error);
size_t ReadCStringFromMemory(const Address &addr, char *dst,
- size_t dst_max_len, Error &result_error);
+ size_t dst_max_len, Status &result_error);
size_t ReadScalarIntegerFromMemory(const Address &addr,
bool prefer_file_cache, uint32_t byte_size,
bool is_signed, Scalar &scalar,
- Error &error);
+ Status &error);
uint64_t ReadUnsignedIntegerFromMemory(const Address &addr,
bool prefer_file_cache,
size_t integer_byte_size,
- uint64_t fail_value, Error &error);
+ uint64_t fail_value, Status &error);
bool ReadPointerFromMemory(const Address &addr, bool prefer_file_cache,
- Error &error, Address &pointer_addr);
+ Status &error, Address &pointer_addr);
SectionLoadList &GetSectionLoadList() {
return m_section_load_history.GetCurrentSectionLoadList();
@@ -978,7 +979,7 @@ public:
PathMappingList &GetImageSearchPathList();
- TypeSystem *GetScratchTypeSystemForLanguage(Error *error,
+ TypeSystem *GetScratchTypeSystemForLanguage(Status *error,
lldb::LanguageType language,
bool create_on_demand = true);
@@ -993,7 +994,7 @@ public:
UserExpression *GetUserExpressionForLanguage(
llvm::StringRef expr, llvm::StringRef prefix, lldb::LanguageType language,
Expression::ResultType desired_type,
- const EvaluateExpressionOptions &options, Error &error);
+ const EvaluateExpressionOptions &options, Status &error);
// Creates a FunctionCaller for the given language, the rest of the parameters
// have the
@@ -1008,7 +1009,7 @@ public:
const CompilerType &return_type,
const Address &function_address,
const ValueList &arg_value_list,
- const char *name, Error &error);
+ const char *name, Status &error);
// Creates a UtilityFunction for the given language, the rest of the
// parameters have the
@@ -1018,7 +1019,7 @@ public:
UtilityFunction *GetUtilityFunctionForLanguage(const char *expr,
lldb::LanguageType language,
const char *name,
- Error &error);
+ Status &error);
ClangASTContext *GetScratchClangASTContext(bool create_on_demand = true);
@@ -1028,7 +1029,7 @@ public:
// Install any files through the platform that need be to installed
// prior to launching or attaching.
//----------------------------------------------------------------------
- Error Install(ProcessLaunchInfo *launch_info);
+ Status Install(ProcessLaunchInfo *launch_info);
bool ResolveFileAddress(lldb::addr_t load_addr, Address &so_addr);
@@ -1183,7 +1184,7 @@ public:
GetSearchFilterForModuleAndCUList(const FileSpecList *containingModules,
const FileSpecList *containingSourceFiles);
- lldb::REPLSP GetREPL(Error &err, lldb::LanguageType language,
+ lldb::REPLSP GetREPL(Status &err, lldb::LanguageType language,
const char *repl_options, bool can_create);
void SetREPL(lldb::LanguageType language, lldb::REPLSP repl_sp);
diff --git a/include/lldb/Target/TargetList.h b/include/lldb/Target/TargetList.h
index 81b81dba7757..43f4520369b6 100644
--- a/include/lldb/Target/TargetList.h
+++ b/include/lldb/Target/TargetList.h
@@ -91,10 +91,10 @@ public:
/// @return
/// An error object that indicates success or failure
//------------------------------------------------------------------
- Error CreateTarget(Debugger &debugger, llvm::StringRef user_exe_path,
- llvm::StringRef triple_str, bool get_dependent_modules,
- const OptionGroupPlatform *platform_options,
- lldb::TargetSP &target_sp);
+ Status CreateTarget(Debugger &debugger, llvm::StringRef user_exe_path,
+ llvm::StringRef triple_str, bool get_dependent_modules,
+ const OptionGroupPlatform *platform_options,
+ lldb::TargetSP &target_sp);
//------------------------------------------------------------------
/// Create a new Target.
@@ -102,9 +102,9 @@ public:
/// Same as the function above, but used when you already know the
/// platform you will be using
//------------------------------------------------------------------
- Error CreateTarget(Debugger &debugger, llvm::StringRef user_exe_path,
- const ArchSpec &arch, bool get_dependent_modules,
- lldb::PlatformSP &platform_sp, lldb::TargetSP &target_sp);
+ Status CreateTarget(Debugger &debugger, llvm::StringRef user_exe_path,
+ const ArchSpec &arch, bool get_dependent_modules,
+ lldb::PlatformSP &platform_sp, lldb::TargetSP &target_sp);
//------------------------------------------------------------------
/// Delete a Target object from the list.
@@ -211,20 +211,20 @@ protected:
private:
lldb::TargetSP GetDummyTarget(lldb_private::Debugger &debugger);
- Error CreateDummyTarget(Debugger &debugger,
- llvm::StringRef specified_arch_name,
- lldb::TargetSP &target_sp);
+ Status CreateDummyTarget(Debugger &debugger,
+ llvm::StringRef specified_arch_name,
+ lldb::TargetSP &target_sp);
- Error CreateTargetInternal(Debugger &debugger, llvm::StringRef user_exe_path,
- llvm::StringRef triple_str,
- bool get_dependent_files,
- const OptionGroupPlatform *platform_options,
- lldb::TargetSP &target_sp, bool is_dummy_target);
+ Status CreateTargetInternal(Debugger &debugger, llvm::StringRef user_exe_path,
+ llvm::StringRef triple_str,
+ bool get_dependent_files,
+ const OptionGroupPlatform *platform_options,
+ lldb::TargetSP &target_sp, bool is_dummy_target);
- Error CreateTargetInternal(Debugger &debugger, llvm::StringRef user_exe_path,
- const ArchSpec &arch, bool get_dependent_modules,
- lldb::PlatformSP &platform_sp,
- lldb::TargetSP &target_sp, bool is_dummy_target);
+ Status CreateTargetInternal(Debugger &debugger, llvm::StringRef user_exe_path,
+ const ArchSpec &arch, bool get_dependent_modules,
+ lldb::PlatformSP &platform_sp,
+ lldb::TargetSP &target_sp, bool is_dummy_target);
DISALLOW_COPY_AND_ASSIGN(TargetList);
};
diff --git a/include/lldb/Target/Thread.h b/include/lldb/Target/Thread.h
index 47d0b7d767d6..cfab13069278 100644
--- a/include/lldb/Target/Thread.h
+++ b/include/lldb/Target/Thread.h
@@ -441,16 +441,16 @@ public:
return GetStackFrameList()->GetCurrentInlinedDepth();
}
- Error ReturnFromFrameWithIndex(uint32_t frame_idx,
- lldb::ValueObjectSP return_value_sp,
- bool broadcast = false);
+ Status ReturnFromFrameWithIndex(uint32_t frame_idx,
+ lldb::ValueObjectSP return_value_sp,
+ bool broadcast = false);
- Error ReturnFromFrame(lldb::StackFrameSP frame_sp,
- lldb::ValueObjectSP return_value_sp,
- bool broadcast = false);
+ Status ReturnFromFrame(lldb::StackFrameSP frame_sp,
+ lldb::ValueObjectSP return_value_sp,
+ bool broadcast = false);
- Error JumpToLine(const FileSpec &file, uint32_t line, bool can_leave_function,
- std::string *warnings = nullptr);
+ Status JumpToLine(const FileSpec &file, uint32_t line,
+ bool can_leave_function, std::string *warnings = nullptr);
virtual lldb::StackFrameSP GetFrameWithStackID(const StackID &stack_id) {
if (stack_id.IsValid())
@@ -530,7 +530,7 @@ public:
/// @return
/// An error that describes anything that went wrong
//------------------------------------------------------------------
- virtual Error
+ virtual Status
StepIn(bool source_step,
LazyBool step_in_avoids_code_without_debug_info = eLazyBoolCalculate,
LazyBool step_out_avoids_code_without_debug_info = eLazyBoolCalculate);
@@ -548,7 +548,7 @@ public:
/// @return
/// An error that describes anything that went wrong
//------------------------------------------------------------------
- virtual Error StepOver(
+ virtual Status StepOver(
bool source_step,
LazyBool step_out_avoids_code_without_debug_info = eLazyBoolCalculate);
@@ -561,7 +561,7 @@ public:
/// @return
/// An error that describes anything that went wrong
//------------------------------------------------------------------
- virtual Error StepOut();
+ virtual Status StepOut();
//------------------------------------------------------------------
/// Retrieves the per-thread data area.
@@ -973,7 +973,7 @@ public:
/// An error if the thread plan could not be unwound.
//------------------------------------------------------------------
- Error UnwindInnermostExpression();
+ Status UnwindInnermostExpression();
//------------------------------------------------------------------
/// Gets the outer-most plan that was popped off the plan stack in the
diff --git a/include/lldb/Target/ThreadSpec.h b/include/lldb/Target/ThreadSpec.h
index 204f1f9fbd70..d00172d1763b 100644
--- a/include/lldb/Target/ThreadSpec.h
+++ b/include/lldb/Target/ThreadSpec.h
@@ -45,7 +45,7 @@ public:
static std::unique_ptr<ThreadSpec>
CreateFromStructuredData(const StructuredData::Dictionary &data_dict,
- Error &error);
+ Status &error);
StructuredData::ObjectSP SerializeToStructuredData();
@@ -55,9 +55,9 @@ public:
void SetTID(lldb::tid_t tid) { m_tid = tid; }
- void SetName(const char *name) { m_name = name; }
+ void SetName(llvm::StringRef name) { m_name = name; }
- void SetQueueName(const char *queue_name) { m_queue_name = queue_name; }
+ void SetQueueName(llvm::StringRef queue_name) { m_queue_name = queue_name; }
uint32_t GetIndex() const { return m_index; }
diff --git a/include/lldb/Utility/JSON.h b/include/lldb/Utility/JSON.h
index 5c5d382048c1..bf8ed9afc008 100644
--- a/include/lldb/Utility/JSON.h
+++ b/include/lldb/Utility/JSON.h
@@ -253,7 +253,7 @@ class JSONParser : public StringExtractor {
public:
enum Token {
Invalid,
- Error,
+ Status,
ObjectStart,
ObjectEnd,
ArrayStart,
diff --git a/include/lldb/Utility/RegularExpression.h b/include/lldb/Utility/RegularExpression.h
index d97e35647583..dba7001ce0fa 100644
--- a/include/lldb/Utility/RegularExpression.h
+++ b/include/lldb/Utility/RegularExpression.h
@@ -210,7 +210,7 @@ private:
// Member variables
//------------------------------------------------------------------
std::string m_re; ///< A copy of the original regular expression text
- int m_comp_err; ///< Error code for the regular expression compilation
+ int m_comp_err; ///< Status code for the regular expression compilation
regex_t m_preg; ///< The compiled regular expression
};
diff --git a/include/lldb/Utility/SelectHelper.h b/include/lldb/Utility/SelectHelper.h
index 5fa856b15d9f..12950d032fb6 100644
--- a/include/lldb/Utility/SelectHelper.h
+++ b/include/lldb/Utility/SelectHelper.h
@@ -10,7 +10,7 @@
#ifndef liblldb_SelectHelper_h_
#define liblldb_SelectHelper_h_
-#include "lldb/Utility/Error.h" // for Error
+#include "lldb/Utility/Status.h" // for Status
#include "lldb/lldb-types.h" // for socket_t
#include "llvm/ADT/DenseMap.h"
@@ -49,7 +49,7 @@ public:
// Call the system's select() to wait for descriptors using
// timeout provided in a call the SelectHelper::SetTimeout(),
// or infinite wait if no timeout was set.
- lldb_private::Error Select();
+ lldb_private::Status Select();
protected:
struct FDInfo {
diff --git a/include/lldb/Utility/Error.h b/include/lldb/Utility/Status.h
index a236ab45a0bb..4ac191b1f613 100644
--- a/include/lldb/Utility/Error.h
+++ b/include/lldb/Utility/Status.h
@@ -1,4 +1,5 @@
-//===-- Error.h -------------------------------------------------*- C++ -*-===//
+//===-- Status.h -------------------------------------------------*- C++
+//-*-===//
//
// The LLVM Compiler Infrastructure
//
@@ -30,12 +31,12 @@ class raw_ostream;
namespace lldb_private {
//----------------------------------------------------------------------
-/// @class Error Error.h "lldb/Utility/Error.h"
+/// @class Status Status.h "lldb/Utility/Status.h"
/// @brief An error handling class.
///
/// This class is designed to be able to hold any error code that can be
/// encountered on a given platform. The errors are stored as a value
-/// of type Error::ValueType. This value should be large enough to hold
+/// of type Status::ValueType. This value should be large enough to hold
/// any and all errors that the class supports. Each error has an
/// associated type that is of type lldb::ErrorType. New types
/// can be added to support new error types, and architecture specific
@@ -49,7 +50,7 @@ namespace lldb_private {
/// be cached until the error is cleared of the value of the error
/// changes.
//----------------------------------------------------------------------
-class Error {
+class Status {
public:
//------------------------------------------------------------------
/// Every error value that this object can contain needs to be able
@@ -68,15 +69,17 @@ public:
/// @param[in] type
/// The type for \a err.
//------------------------------------------------------------------
- Error();
+ Status();
- explicit Error(ValueType err, lldb::ErrorType type = lldb::eErrorTypeGeneric);
+ explicit Status(ValueType err,
+ lldb::ErrorType type = lldb::eErrorTypeGeneric);
- /* implicit */ Error(std::error_code EC);
+ /* implicit */ Status(std::error_code EC);
- explicit Error(const char *format, ...) __attribute__((format(printf, 2, 3)));
+ explicit Status(const char *format, ...)
+ __attribute__((format(printf, 2, 3)));
- Error(const Error &rhs);
+ Status(const Status &rhs);
//------------------------------------------------------------------
/// Assignment operator.
///
@@ -86,7 +89,7 @@ public:
/// @return
/// A const reference to this object.
//------------------------------------------------------------------
- const Error &operator=(const Error &rhs);
+ const Status &operator=(const Status &rhs);
//------------------------------------------------------------------
/// Assignment operator from a kern_return_t.
@@ -99,9 +102,9 @@ public:
/// @return
/// A const reference to this object.
//------------------------------------------------------------------
- const Error &operator=(uint32_t err);
+ const Status &operator=(uint32_t err);
- ~Error();
+ ~Status();
//------------------------------------------------------------------
/// Get the error string associated with the current error.
@@ -186,7 +189,7 @@ public:
/// Set the current error to errno.
///
/// Update the error value to be \c errno and update the type to
- /// be \c Error::POSIX.
+ /// be \c Status::POSIX.
//------------------------------------------------------------------
void SetErrorToErrno();
@@ -194,7 +197,7 @@ public:
/// Set the current error to a generic error.
///
/// Update the error value to be \c LLDB_GENERIC_ERROR and update the
- /// type to be \c Error::Generic.
+ /// type to be \c Status::Generic.
//------------------------------------------------------------------
void SetErrorToGenericError();
@@ -257,7 +260,7 @@ protected:
//------------------------------------------------------------------
/// Member variables
//------------------------------------------------------------------
- ValueType m_code; ///< Error code as an integer value.
+ ValueType m_code; ///< Status code as an integer value.
lldb::ErrorType m_type; ///< The type of the above error code.
mutable std::string m_string; ///< A string representation of the error code.
};
@@ -265,8 +268,8 @@ protected:
} // namespace lldb_private
namespace llvm {
-template <> struct format_provider<lldb_private::Error> {
- static void format(const lldb_private::Error &error, llvm::raw_ostream &OS,
+template <> struct format_provider<lldb_private::Status> {
+ static void format(const lldb_private::Status &error, llvm::raw_ostream &OS,
llvm::StringRef Options);
};
}
diff --git a/include/lldb/Utility/UUID.h b/include/lldb/Utility/UUID.h
index 28069bbe4c73..6313025dec15 100644
--- a/include/lldb/Utility/UUID.h
+++ b/include/lldb/Utility/UUID.h
@@ -54,6 +54,7 @@ public:
std::string GetAsString(const char *separator = nullptr) const;
+ size_t SetFromStringRef(llvm::StringRef str, uint32_t num_uuid_bytes = 16);
size_t SetFromCString(const char *c_str, uint32_t num_uuid_bytes = 16);
// Decode as many UUID bytes (up to 16) as possible from the C string "cstr"
diff --git a/include/lldb/lldb-forward.h b/include/lldb/lldb-forward.h
index 2180b31527e0..392dc641558d 100644
--- a/include/lldb/lldb-forward.h
+++ b/include/lldb/lldb-forward.h
@@ -87,7 +87,7 @@ class DynamicCheckerFunctions;
class DynamicLoader;
class Editline;
class EmulateInstruction;
-class Error;
+class Status;
class EvaluateExpressionOptions;
class Event;
class EventData;
diff --git a/include/lldb/lldb-private-enumerations.h b/include/lldb/lldb-private-enumerations.h
index 9572bee81177..332265665237 100644
--- a/include/lldb/lldb-private-enumerations.h
+++ b/include/lldb/lldb-private-enumerations.h
@@ -205,9 +205,10 @@ typedef enum MemoryModuleLoadLevel {
enum class LineStatus {
Success, // The line that was just edited if good and should be added to the
// lines
- Error, // There is an error with the current line and it needs to be re-edited
- // before it can be accepted
- Done // Lines are complete
+ Status, // There is an error with the current line and it needs to be
+ // re-edited
+ // before it can be accepted
+ Done // Lines are complete
};
//----------------------------------------------------------------------
diff --git a/include/lldb/lldb-private-interfaces.h b/include/lldb/lldb-private-interfaces.h
index d3e80075625e..9f25eb1f9a29 100644
--- a/include/lldb/lldb-private-interfaces.h
+++ b/include/lldb/lldb-private-interfaces.h
@@ -46,7 +46,7 @@ typedef ObjectFile *(*ObjectFileCreateMemoryInstance)(
const lldb::ModuleSP &module_sp, lldb::DataBufferSP &data_sp,
const lldb::ProcessSP &process_sp, lldb::addr_t offset);
typedef bool (*ObjectFileSaveCore)(const lldb::ProcessSP &process_sp,
- const FileSpec &outfile, Error &error);
+ const FileSpec &outfile, Status &error);
typedef EmulateInstruction *(*EmulateInstructionCreateInstance)(
const ArchSpec &arch, InstructionType inst_type);
typedef OperatingSystem *(*OperatingSystemCreateInstance)(Process *process,
@@ -58,8 +58,8 @@ typedef lldb::CommandObjectSP (*LanguageRuntimeGetCommandObject)(
CommandInterpreter &interpreter);
typedef lldb::StructuredDataPluginSP (*StructuredDataPluginCreateInstance)(
Process &process);
-typedef Error (*StructuredDataFilterLaunchInfo)(ProcessLaunchInfo &launch_info,
- Target *target);
+typedef Status (*StructuredDataFilterLaunchInfo)(ProcessLaunchInfo &launch_info,
+ Target *target);
typedef SystemRuntime *(*SystemRuntimeCreateInstance)(Process *process);
typedef lldb::PlatformSP (*PlatformCreateInstance)(bool force,
const ArchSpec *arch);
@@ -96,7 +96,7 @@ typedef lldb::InstrumentationRuntimeSP (*InstrumentationRuntimeCreateInstance)(
const lldb::ProcessSP &process_sp);
typedef lldb::TypeSystemSP (*TypeSystemCreateInstance)(
lldb::LanguageType language, Module *module, Target *target);
-typedef lldb::REPLSP (*REPLCreateInstance)(Error &error,
+typedef lldb::REPLSP (*REPLCreateInstance)(Status &error,
lldb::LanguageType language,
Debugger *debugger, Target *target,
const char *repl_options);
diff --git a/include/lldb/lldb-private-types.h b/include/lldb/lldb-private-types.h
index 4f192b66369f..fd21641218fb 100644
--- a/include/lldb/lldb-private-types.h
+++ b/include/lldb/lldb-private-types.h
@@ -27,7 +27,7 @@ class Platform;
class ExecutionContext;
typedef llvm::sys::DynamicLibrary (*LoadPluginCallbackType)(
- const lldb::DebuggerSP &debugger_sp, const FileSpec &spec, Error &error);
+ const lldb::DebuggerSP &debugger_sp, const FileSpec &spec, Status &error);
//----------------------------------------------------------------------
// Every register is described in detail including its name, alternate