[all-commits] [llvm/llvm-project] a8ad2a: [lldb] Fix alias parsing with joined options (#190...
Dave Lee via All-commits
all-commits at lists.llvm.org
Sat Apr 4 07:38:49 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: a8ad2a7d7311e9ed3b238f533085b046f9f5f31d
https://github.com/llvm/llvm-project/commit/a8ad2a7d7311e9ed3b238f533085b046f9f5f31d
Author: Dave Lee <davelee.com at gmail.com>
Date: 2026-04-04 (Sat, 04 Apr 2026)
Changed paths:
M lldb/include/lldb/lldb-defines.h
M lldb/source/Interpreter/Options.cpp
A lldb/test/Shell/Commands/command-alias-joined-arg.test
Log Message:
-----------
[lldb] Fix alias parsing with joined options (#190301)
Fixes a crash with the following alias, which I use for printing the
contents of pointer variables:
```
command alias vp v -P1
```
At some point in the recent-ish past, parsing this alias has started
crashing lldb. The problem is code that assumes the option and its value
are separate. This assumption causes an index past the end of a vector.
This fix changes `FindArgumentIndexForOption`. The function now returns
a pair of indexes, the first index is the option, the second index is
the index of the value. In the case of joined options like `-P1`, the
two indexes are the same.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list