#include "lldb/lldb-types.h"
#include "lldb/lldb-versioning.h"
-#ifdef SWIG
-#define LLDB_API
-#endif
-
// Forward Declarations
namespace lldb {
bool SafeToCallFunctions();
-#ifndef SWIG
- lldb_private::Thread *operator->();
-
- lldb_private::Thread *get();
-
-#endif
-
-protected:
+private:
friend class SBBreakpoint;
friend class SBBreakpointLocation;
friend class SBBreakpointCallbackBaton;
friend class SBValue;
friend class lldb_private::QueueImpl;
friend class SBQueueItem;
+ friend class SBThreadPlan;
void SetThread(const lldb::ThreadSP &lldb_object_sp);
-#ifndef SWIG
SBError ResumeNewPlan(lldb_private::ExecutionContext &exe_ctx,
lldb_private::ThreadPlan *new_plan);
-#endif
-private:
lldb::ExecutionContextRefSP m_opaque_sp;
+
+ lldb_private::Thread *operator->();
+
+ lldb_private::Thread *get();
};
} // namespace lldb
SBThreadPlan QueueThreadPlanForStepScripted(const char *script_class_name,
SBError &error);
-#ifndef SWIG
- lldb_private::ThreadPlan *get();
-#endif
-
-protected:
+private:
friend class SBBreakpoint;
friend class SBBreakpointLocation;
friend class SBFrame;
friend class lldb_private::QueueImpl;
friend class SBQueueItem;
-#ifndef SWIG
+ lldb_private::ThreadPlan *get();
void SetThreadPlan(const lldb::ThreadPlanSP &lldb_object_sp);
-#endif
-private:
lldb::ThreadPlanSP m_opaque_sp;
};
/// \return
/// A const Address object reference to \a this.
//------------------------------------------------------------------
-#ifndef SWIG
const Address &operator=(const Address &rhs);
-#endif
//------------------------------------------------------------------
/// Clear the object's state.
class SourceManager {
public:
-#ifndef SWIG
class File {
friend bool operator==(const SourceManager::File &lhs,
const SourceManager::File &rhs);
private:
void CommonInitializer(const FileSpec &file_spec, Target *target);
};
-#endif // SWIG
typedef std::shared_ptr<File> FileSP;
-#ifndef SWIG
// The SourceFileCache class separates the source manager from the cache of
// source files, so the cache can be stored in the Debugger, but the source
// managers can be per target.
typedef std::map<FileSpec, FileSP> FileCache;
FileCache m_file_cache;
};
-#endif // SWIG
//------------------------------------------------------------------
// Constructors and Destructors
/// \see RegisterNotificationCallbacks (const Notifications&) @see
/// UnregisterNotificationCallbacks (const Notifications&)
//------------------------------------------------------------------
-#ifndef SWIG
typedef struct {
void *baton;
void (*initialize)(void *baton, Process *process);
DISALLOW_COPY_AND_ASSIGN(ProcessEventData);
};
-#endif // SWIG
//------------------------------------------------------------------
/// Construct with a shared pointer to a target, and the Process listener.
///
/// \see Process::Notifications
//------------------------------------------------------------------
-#ifndef SWIG
void RegisterNotificationCallbacks(const Process::Notifications &callbacks);
-#endif
//------------------------------------------------------------------
/// Unregister for process and thread notifications.
///
/// \see Process::Notifications
//------------------------------------------------------------------
-#ifndef SWIG
bool UnregisterNotificationCallbacks(const Process::Notifications &callbacks);
-#endif
//==================================================================
// Built in Process Control functions
void
Clear();
-#ifndef SWIG
bool
operator == (const lldb::SBFrame &rhs) const;
bool
operator != (const lldb::SBFrame &rhs) const;
-#endif
-
%feature("docstring", "
/// The version that doesn't supply a 'use_dynamic' value will use the
/// target's default.
}
lldb_private::Thread *SBThread::operator->() {
- LLDB_RECORD_METHOD_NO_ARGS(lldb_private::Thread *, SBThread, operator->);
-
- ThreadSP thread_sp(m_opaque_sp->GetThreadSP());
- if (thread_sp)
- return LLDB_RECORD_RESULT(thread_sp.get());
- return nullptr;
+ return get();
}
lldb_private::Thread *SBThread::get() {
- LLDB_RECORD_METHOD_NO_ARGS(lldb_private::Thread *, SBThread, get);
-
- ThreadSP thread_sp(m_opaque_sp->GetThreadSP());
- if (thread_sp)
- return LLDB_RECORD_RESULT(thread_sp.get());
- return nullptr;
+ return m_opaque_sp->GetThreadSP().get();
}
namespace lldb_private {
LLDB_REGISTER_METHOD(lldb::SBThread, SBThread, GetCurrentExceptionBacktrace,
());
LLDB_REGISTER_METHOD(bool, SBThread, SafeToCallFunctions, ());
- LLDB_REGISTER_METHOD(lldb_private::Thread *, SBThread, operator->,());
- LLDB_REGISTER_METHOD(lldb_private::Thread *, SBThread, get, ());
}
}
//----------------------------------------------------------------------
SBThreadPlan::~SBThreadPlan() {}
-lldb_private::ThreadPlan *SBThreadPlan::get() {
- LLDB_RECORD_METHOD_NO_ARGS(lldb_private::ThreadPlan *, SBThreadPlan, get);
-
- return LLDB_RECORD_RESULT(m_opaque_sp.get());
-}
+lldb_private::ThreadPlan *SBThreadPlan::get() { return m_opaque_sp.get(); }
bool SBThreadPlan::IsValid() const {
LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBThreadPlan, IsValid);
LLDB_REGISTER_CONSTRUCTOR(SBThreadPlan, (lldb::SBThread &, const char *));
LLDB_REGISTER_METHOD(const lldb::SBThreadPlan &,
SBThreadPlan, operator=,(const lldb::SBThreadPlan &));
- LLDB_REGISTER_METHOD(lldb_private::ThreadPlan *, SBThreadPlan, get, ());
LLDB_REGISTER_METHOD_CONST(bool, SBThreadPlan, IsValid, ());
LLDB_REGISTER_METHOD_CONST(bool, SBThreadPlan, operator bool, ());
LLDB_REGISTER_METHOD(void, SBThreadPlan, Clear, ());