diff options
author | Jim Ingham <jingham@apple.com> | 2011-09-08 22:13:49 +0000 |
---|---|---|
committer | Jim Ingham <jingham@apple.com> | 2011-09-08 22:13:49 +0000 |
commit | b7f6b2fa3c4a5162223850b28e63b5193159ae6d (patch) | |
tree | f51b13eb1e25bdab179c6b60e4caaf5b104b6136 /lldb/source/Target/ThreadList.cpp | |
parent | 7db8d697cf094ac586531d5500892e94a49ec537 (diff) | |
download | bcm5719-llvm-b7f6b2fa3c4a5162223850b28e63b5193159ae6d.tar.gz bcm5719-llvm-b7f6b2fa3c4a5162223850b28e63b5193159ae6d.zip |
Move the SourceManager from the Debugger to the Target. That way it can store the per-Target default Source File & Line.
Set the default Source File & line to main (if it can be found.) at startup. Selecting the current thread & or frame resets
the current source file & line, and "source list" as well as the breakpoint command "break set -l <NUM>" will use the
current source file.
llvm-svn: 139323
Diffstat (limited to 'lldb/source/Target/ThreadList.cpp')
-rw-r--r-- | lldb/source/Target/ThreadList.cpp | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/lldb/source/Target/ThreadList.cpp b/lldb/source/Target/ThreadList.cpp index 79df0f2184e..12d78b53b4a 100644 --- a/lldb/source/Target/ThreadList.cpp +++ b/lldb/source/Target/ThreadList.cpp @@ -558,8 +558,12 @@ bool ThreadList::SetSelectedThreadByID (lldb::tid_t tid) { Mutex::Locker locker(m_threads_mutex); - if (FindThreadByID(tid).get()) + ThreadSP selected_thread_sp(FindThreadByID(tid)); + if (selected_thread_sp) + { m_selected_tid = tid; + selected_thread_sp->SetDefaultFileAndLineToSelectedFrame(); + } else m_selected_tid = LLDB_INVALID_THREAD_ID; @@ -570,9 +574,12 @@ bool ThreadList::SetSelectedThreadByIndexID (uint32_t index_id) { Mutex::Locker locker(m_threads_mutex); - ThreadSP thread_sp (FindThreadByIndexID(index_id)); - if (thread_sp.get()) - m_selected_tid = thread_sp->GetID(); + ThreadSP selected_thread_sp (FindThreadByIndexID(index_id)); + if (selected_thread_sp.get()) + { + m_selected_tid = selected_thread_sp->GetID(); + selected_thread_sp->SetDefaultFileAndLineToSelectedFrame(); + } else m_selected_tid = LLDB_INVALID_THREAD_ID; |