summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Process/Utility/HistoryThread.cpp
diff options
context:
space:
mode:
authorKate Stone <katherine.stone@apple.com>2016-09-06 20:57:50 +0000
committerKate Stone <katherine.stone@apple.com>2016-09-06 20:57:50 +0000
commitb9c1b51e45b845debb76d8658edabca70ca56079 (patch)
treedfcb5a13ef2b014202340f47036da383eaee74aa /lldb/source/Plugins/Process/Utility/HistoryThread.cpp
parentd5aa73376966339caad04013510626ec2e42c760 (diff)
downloadbcm5719-llvm-b9c1b51e45b845debb76d8658edabca70ca56079.tar.gz
bcm5719-llvm-b9c1b51e45b845debb76d8658edabca70ca56079.zip
*** 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
Diffstat (limited to 'lldb/source/Plugins/Process/Utility/HistoryThread.cpp')
-rw-r--r--lldb/source/Plugins/Process/Utility/HistoryThread.cpp106
1 files changed, 45 insertions, 61 deletions
diff --git a/lldb/source/Plugins/Process/Utility/HistoryThread.cpp b/lldb/source/Plugins/Process/Utility/HistoryThread.cpp
index 956539da219..d27a7b0da94 100644
--- a/lldb/source/Plugins/Process/Utility/HistoryThread.cpp
+++ b/lldb/source/Plugins/Process/Utility/HistoryThread.cpp
@@ -9,91 +9,75 @@
#include "lldb/lldb-private.h"
-#include "Plugins/Process/Utility/HistoryUnwind.h"
#include "Plugins/Process/Utility/HistoryThread.h"
+#include "Plugins/Process/Utility/HistoryUnwind.h"
#include "Plugins/Process/Utility/RegisterContextHistory.h"
#include "lldb/Core/Log.h"
-#include "lldb/Target/StackFrameList.h"
#include "lldb/Target/Process.h"
+#include "lldb/Target/StackFrameList.h"
using namespace lldb;
using namespace lldb_private;
// Constructor
-HistoryThread::HistoryThread(lldb_private::Process &process, lldb::tid_t tid, std::vector<lldb::addr_t> pcs,
- uint32_t stop_id, bool stop_id_is_valid)
- : Thread(process, tid, true),
- m_framelist_mutex(),
- m_framelist(),
- m_pcs(pcs),
- m_stop_id(stop_id),
- m_stop_id_is_valid(stop_id_is_valid),
- m_extended_unwind_token(LLDB_INVALID_ADDRESS),
- m_queue_name(),
- m_thread_name(),
- m_originating_unique_thread_id(tid),
- m_queue_id(LLDB_INVALID_QUEUE_ID)
-{
- m_unwinder_ap.reset(new HistoryUnwind(*this, pcs, stop_id_is_valid));
- Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_OBJECT));
- if (log)
- log->Printf("%p HistoryThread::HistoryThread", static_cast<void *>(this));
+HistoryThread::HistoryThread(lldb_private::Process &process, lldb::tid_t tid,
+ std::vector<lldb::addr_t> pcs, uint32_t stop_id,
+ bool stop_id_is_valid)
+ : Thread(process, tid, true), m_framelist_mutex(), m_framelist(),
+ m_pcs(pcs), m_stop_id(stop_id), m_stop_id_is_valid(stop_id_is_valid),
+ m_extended_unwind_token(LLDB_INVALID_ADDRESS), m_queue_name(),
+ m_thread_name(), m_originating_unique_thread_id(tid),
+ m_queue_id(LLDB_INVALID_QUEUE_ID) {
+ m_unwinder_ap.reset(new HistoryUnwind(*this, pcs, stop_id_is_valid));
+ Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_OBJECT));
+ if (log)
+ log->Printf("%p HistoryThread::HistoryThread", static_cast<void *>(this));
}
// Destructor
-HistoryThread::~HistoryThread ()
-{
- Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_OBJECT));
- if (log)
- log->Printf ("%p HistoryThread::~HistoryThread (tid=0x%" PRIx64 ")",
- static_cast<void*>(this), GetID());
- DestroyThread();
+HistoryThread::~HistoryThread() {
+ Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_OBJECT));
+ if (log)
+ log->Printf("%p HistoryThread::~HistoryThread (tid=0x%" PRIx64 ")",
+ static_cast<void *>(this), GetID());
+ DestroyThread();
}
-lldb::RegisterContextSP
-HistoryThread::GetRegisterContext ()
-{
- RegisterContextSP rctx ;
- if (m_pcs.size() > 0)
- {
- rctx.reset (new RegisterContextHistory (*this, 0, GetProcess()->GetAddressByteSize(), m_pcs[0]));
- }
- return rctx;
-
+lldb::RegisterContextSP HistoryThread::GetRegisterContext() {
+ RegisterContextSP rctx;
+ if (m_pcs.size() > 0) {
+ rctx.reset(new RegisterContextHistory(
+ *this, 0, GetProcess()->GetAddressByteSize(), m_pcs[0]));
+ }
+ return rctx;
}
lldb::RegisterContextSP
-HistoryThread::CreateRegisterContextForFrame (StackFrame *frame)
-{
- return m_unwinder_ap->CreateRegisterContextForFrame (frame);
+HistoryThread::CreateRegisterContextForFrame(StackFrame *frame) {
+ return m_unwinder_ap->CreateRegisterContextForFrame(frame);
}
-lldb::StackFrameListSP
-HistoryThread::GetStackFrameList ()
-{
- // FIXME do not throw away the lock after we acquire it..
- std::unique_lock<std::mutex> lock(m_framelist_mutex);
- lock.unlock();
- if (m_framelist.get() == NULL)
- {
- m_framelist.reset (new StackFrameList (*this, StackFrameListSP(), true));
- }
+lldb::StackFrameListSP HistoryThread::GetStackFrameList() {
+ // FIXME do not throw away the lock after we acquire it..
+ std::unique_lock<std::mutex> lock(m_framelist_mutex);
+ lock.unlock();
+ if (m_framelist.get() == NULL) {
+ m_framelist.reset(new StackFrameList(*this, StackFrameListSP(), true));
+ }
- return m_framelist;
+ return m_framelist;
}
-uint32_t
-HistoryThread::GetExtendedBacktraceOriginatingIndexID ()
-{
- if (m_originating_unique_thread_id != LLDB_INVALID_THREAD_ID)
- {
- if (GetProcess()->HasAssignedIndexIDToThread (m_originating_unique_thread_id))
- {
- return GetProcess()->AssignIndexIDToThread (m_originating_unique_thread_id);
- }
+uint32_t HistoryThread::GetExtendedBacktraceOriginatingIndexID() {
+ if (m_originating_unique_thread_id != LLDB_INVALID_THREAD_ID) {
+ if (GetProcess()->HasAssignedIndexIDToThread(
+ m_originating_unique_thread_id)) {
+ return GetProcess()->AssignIndexIDToThread(
+ m_originating_unique_thread_id);
}
- return LLDB_INVALID_THREAD_ID;
+ }
+ return LLDB_INVALID_THREAD_ID;
}
OpenPOWER on IntegriCloud