*** This commit represents a complete reformatting of the LLDB source code
*** to conform to clang-format’s LLVM style. This kind of mass change has
*** two obvious implications:
Firstly, merging this particular commit into a downstream fork may be a huge
effort. Alternatively, it may be worth merging all changes up to this commit,
performing the same reformatting operation locally, and then discarding the
merge for this particular commit. The commands used to accomplish this
reformatting were as follows (with current working directory as the root of
the repository):
find . \( -iname "*.c" -or -iname "*.cpp" -or -iname "*.h" -or -iname "*.mm" \) -exec clang-format -i {} +
find . -iname "*.py" -exec autopep8 --in-place --aggressive --aggressive {} + ;
The version of clang-format used was 3.9.0, and autopep8 was 1.2.4.
Secondly, “blame” style tools will generally point to this commit instead of
a meaningful prior commit. There are alternatives available that will attempt
to look through this change and find the appropriate prior commit. YMMV.
llvm-svn: 280751
diff --git a/lldb/source/Plugins/Process/Utility/ThreadMemory.h b/lldb/source/Plugins/Process/Utility/ThreadMemory.h
index 1e7cbfa..095544d 100644
--- a/lldb/source/Plugins/Process/Utility/ThreadMemory.h
+++ b/lldb/source/Plugins/Process/Utility/ThreadMemory.h
@@ -18,129 +18,94 @@
// Project includes
#include "lldb/Target/Thread.h"
-class ThreadMemory :
- public lldb_private::Thread
-{
+class ThreadMemory : public lldb_private::Thread {
public:
- ThreadMemory (lldb_private::Process &process,
- lldb::tid_t tid,
- const lldb::ValueObjectSP &thread_info_valobj_sp);
+ ThreadMemory(lldb_private::Process &process, lldb::tid_t tid,
+ const lldb::ValueObjectSP &thread_info_valobj_sp);
- ThreadMemory (lldb_private::Process &process,
- lldb::tid_t tid,
- const char *name,
- const char *queue,
- lldb::addr_t register_data_addr);
+ ThreadMemory(lldb_private::Process &process, lldb::tid_t tid,
+ const char *name, const char *queue,
+ lldb::addr_t register_data_addr);
- ~ThreadMemory() override;
+ ~ThreadMemory() override;
- lldb::RegisterContextSP
- GetRegisterContext() override;
+ lldb::RegisterContextSP GetRegisterContext() override;
- lldb::RegisterContextSP
- CreateRegisterContextForFrame(lldb_private::StackFrame *frame) override;
+ lldb::RegisterContextSP
+ CreateRegisterContextForFrame(lldb_private::StackFrame *frame) override;
- bool
- CalculateStopInfo() override;
+ bool CalculateStopInfo() override;
- const char *
- GetInfo() override
- {
- if (m_backing_thread_sp)
- m_backing_thread_sp->GetInfo();
- return nullptr;
- }
+ const char *GetInfo() override {
+ if (m_backing_thread_sp)
+ m_backing_thread_sp->GetInfo();
+ return nullptr;
+ }
- const char *
- GetName() override
- {
- if (!m_name.empty())
- return m_name.c_str();
- if (m_backing_thread_sp)
- m_backing_thread_sp->GetName();
- return nullptr;
- }
-
- const char *
- GetQueueName() override
- {
- if (!m_queue.empty())
- return m_queue.c_str();
- if (m_backing_thread_sp)
- m_backing_thread_sp->GetQueueName();
- return nullptr;
- }
+ const char *GetName() override {
+ if (!m_name.empty())
+ return m_name.c_str();
+ if (m_backing_thread_sp)
+ m_backing_thread_sp->GetName();
+ return nullptr;
+ }
- void
- WillResume(lldb::StateType resume_state) override;
+ const char *GetQueueName() override {
+ if (!m_queue.empty())
+ return m_queue.c_str();
+ if (m_backing_thread_sp)
+ m_backing_thread_sp->GetQueueName();
+ return nullptr;
+ }
- void
- DidResume() override
- {
- if (m_backing_thread_sp)
- m_backing_thread_sp->DidResume();
- }
-
- lldb::user_id_t
- GetProtocolID() const override
- {
- if (m_backing_thread_sp)
- return m_backing_thread_sp->GetProtocolID();
- return Thread::GetProtocolID();
- }
+ void WillResume(lldb::StateType resume_state) override;
- void
- RefreshStateAfterStop() override;
-
- lldb::ValueObjectSP &
- GetValueObject ()
- {
- return m_thread_info_valobj_sp;
- }
-
- void
- ClearStackFrames() override;
+ void DidResume() override {
+ if (m_backing_thread_sp)
+ m_backing_thread_sp->DidResume();
+ }
- void
- ClearBackingThread() override
- {
- m_backing_thread_sp.reset();
- }
+ lldb::user_id_t GetProtocolID() const override {
+ if (m_backing_thread_sp)
+ return m_backing_thread_sp->GetProtocolID();
+ return Thread::GetProtocolID();
+ }
- bool
- SetBackingThread(const lldb::ThreadSP &thread_sp) override
- {
- //printf ("Thread 0x%llx is being backed by thread 0x%llx\n", GetID(), thread_sp->GetID());
- m_backing_thread_sp = thread_sp;
- return (bool)thread_sp;
- }
-
- lldb::ThreadSP
- GetBackingThread() const override
- {
- return m_backing_thread_sp;
- }
+ void RefreshStateAfterStop() override;
+
+ lldb::ValueObjectSP &GetValueObject() { return m_thread_info_valobj_sp; }
+
+ void ClearStackFrames() override;
+
+ void ClearBackingThread() override { m_backing_thread_sp.reset(); }
+
+ bool SetBackingThread(const lldb::ThreadSP &thread_sp) override {
+ // printf ("Thread 0x%llx is being backed by thread 0x%llx\n", GetID(),
+ // thread_sp->GetID());
+ m_backing_thread_sp = thread_sp;
+ return (bool)thread_sp;
+ }
+
+ lldb::ThreadSP GetBackingThread() const override {
+ return m_backing_thread_sp;
+ }
protected:
- bool
- IsOperatingSystemPluginThread() const override
- {
- return true;
- }
-
- // If this memory thread is actually represented by a thread from the
- // lldb_private::Process subclass, then fill in the thread here and
- // all APIs will be routed through this thread object. If m_backing_thread_sp
- // is empty, then this thread is simply in memory with no representation
- // through the process plug-in.
- lldb::ThreadSP m_backing_thread_sp;
- lldb::ValueObjectSP m_thread_info_valobj_sp;
- std::string m_name;
- std::string m_queue;
- lldb::addr_t m_register_data_addr;
+ bool IsOperatingSystemPluginThread() const override { return true; }
+
+ // If this memory thread is actually represented by a thread from the
+ // lldb_private::Process subclass, then fill in the thread here and
+ // all APIs will be routed through this thread object. If m_backing_thread_sp
+ // is empty, then this thread is simply in memory with no representation
+ // through the process plug-in.
+ lldb::ThreadSP m_backing_thread_sp;
+ lldb::ValueObjectSP m_thread_info_valobj_sp;
+ std::string m_name;
+ std::string m_queue;
+ lldb::addr_t m_register_data_addr;
private:
- DISALLOW_COPY_AND_ASSIGN (ThreadMemory);
+ DISALLOW_COPY_AND_ASSIGN(ThreadMemory);
};
#endif // liblldb_ThreadMemory_h_