[Lldb-commits] [lldb] r205912 - Use the default TID format in curses UI
Ed Maste
emaste at freebsd.org
Wed Apr 9 09:39:31 PDT 2014
Author: emaste
Date: Wed Apr 9 11:39:30 2014
New Revision: 205912
URL: http://llvm.org/viewvc/llvm-project?rev=205912&view=rev
Log:
Use the default TID format in curses UI
TIDs are conventionally shown as decimal values on FreeBSD and Linux.
Thus, use the ${thread.id%tid} format string to display the thread ID,
instead of a fixed hex format.
llvm.org/pr19380
Modified:
lldb/trunk/source/Core/IOHandler.cpp
Modified: lldb/trunk/source/Core/IOHandler.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/IOHandler.cpp?rev=205912&r1=205911&r2=205912&view=diff
==============================================================================
--- lldb/trunk/source/Core/IOHandler.cpp (original)
+++ lldb/trunk/source/Core/IOHandler.cpp Wed Apr 9 11:39:30 2014
@@ -4495,9 +4495,13 @@ public:
if (StateIsStoppedState(state, true))
{
- window.MoveCursor (40, 0);
- if (thread)
- window.Printf ("Thread: 0x%4.4" PRIx64, thread->GetID());
+ StreamString strm;
+ const char *format = "Thread: ${thread.id%tid}";
+ if (thread && Debugger::FormatPrompt (format, NULL, &exe_ctx, NULL, strm))
+ {
+ window.MoveCursor (40, 0);
+ window.PutCStringTruncated(strm.GetString().c_str(), 1);
+ }
window.MoveCursor (60, 0);
if (frame)
More information about the lldb-commits
mailing list