[Lldb-commits] [lldb] [Support] [lldb] Fix thread jump #45326 (PR #135778)

John Harrison via lldb-commits lldb-commits at lists.llvm.org
Tue May 20 17:17:30 PDT 2025


================
@@ -1649,11 +1649,14 @@ class CommandObjectThreadJump : public CommandObjectParsed {
           return Status::FromErrorStringWithFormat("invalid line number: '%s'.",
                                                    option_arg.str().c_str());
         break;
-      case 'b':
+      case 'b': {
+        option_arg.consume_front("+");
----------------
ashgti wrote:

I was just think that https://github.com/llvm/llvm-project/blob/88c4ef2f9fc0cda90c8452bc1c46844aaa722a3e/lldb/source/Commands/Options.td#L1139 doesn't mention that the leading `+` is supported or that the value can be negative. Also I can't tell, at least from the help text, if this includes whitespace or not. 

Like if I had:
```
  int a = 3;
  a = 1;

  a = 2; //<pc=here> thread jump -b -1 does this go to the blank line?
```

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


More information about the lldb-commits mailing list