[Lldb-commits] [lldb] [lldb] Add --provider option to thread backtrace (PR #181071)

Med Ismail Bennani via lldb-commits lldb-commits at lists.llvm.org
Tue Mar 31 21:40:28 PDT 2026


================
@@ -92,6 +92,76 @@ class CommandObjectThreadBacktrace : public CommandObjectIterateOverThreads {
       case 'u':
         m_filtered_backtrace = false;
         break;
+      case 'p': {
+        // Parse provider range using same format as breakpoint IDs.
+        // Supports: "N", "N-M", "N to M", "*", "all".
+        llvm::StringRef trimmed = option_arg.trim();
+        if (trimmed == "*" || trimmed.equals_insensitive("all")) {
+          m_show_all_providers = true;
+          m_use_provider_filter = true;
+          break;
+        }
+
+        std::string option_lower = option_arg.lower();
+        static constexpr llvm::StringLiteral range_specifiers[] = {"-", "to"};
----------------
medismailben wrote:

As @jimingham mentioned it in https://github.com/llvm/llvm-project/pull/181071#issuecomment-4158984590, we already an argument parser that supports both `-` and `to` as separators. I'll refactor both commands to use the same parser in a follow-up.

https://github.com/llvm/llvm-project/pull/181071


More information about the lldb-commits mailing list