[Lldb-commits] [PATCH] D33426: Introduce new command: thread backtrace unique
Jim Ingham via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Tue May 23 09:24:22 PDT 2017
jingham requested changes to this revision.
jingham added a comment.
This revision now requires changes to proceed.
Pavel's right, it would be good to add a test case. You could modify the test case in packages/Python/lldbsuite/test/functionalities/thread/num_threads/ to this end. Note this Test Case used to be sitting mixed with the directories in the thread directory, but I just moved it into its own directory - so update before doing this. You could just make a few more thread 3's and break at the lock.unlock line. Then you should have a bunch of threads with the same stack, and your 'unique' listing would coalesce them. If you do this, please add it as a separate test (so make a new method 'test_unique' and redo the setup. That way the tests will remain independent.
There's a "functionalities/thread/backtrace_all" test that looks tempting to modify, but it doesn't actually look that amenable to modification for your purposes. The TestBacktraceAll.py there does show an example of running a command-line command, and looking for patterns in the result, which is what you'll need to add.
================
Comment at: source/Commands/CommandObjectThread.cpp:328
+ "Use the thread-index \"all\" to see all threads.\n"
+ "Use the thread-index \"unique\" to see threads with unique call stacks.",
nullptr,
----------------
Maybe "to see threads grouped by unique call stacks"? As written it sounds like you're going to show me the really cool call stacks.
https://reviews.llvm.org/D33426
More information about the lldb-commits
mailing list