diff options
author | Jaroslav Sevcik <jarin@google.com> | 2020-05-06 10:59:32 +0200 |
---|---|---|
committer | Pavel Labath <pavel@labath.sk> | 2020-05-06 11:03:46 +0200 |
commit | cf5ed6dc59ec8e416cca91c8145b1f09d891f130 (patch) | |
tree | 85a4adaf28b276963e1a57f11d4f921b734de5f2 /lldb/source/Commands/CommandObjectBreakpoint.cpp | |
parent | 0054c46095eea7a10b9af8f5006160023b95046d (diff) | |
download | llvm-cf5ed6dc59ec8e416cca91c8145b1f09d891f130.zip llvm-cf5ed6dc59ec8e416cca91c8145b1f09d891f130.tar.gz llvm-cf5ed6dc59ec8e416cca91c8145b1f09d891f130.tar.bz2 |
Fix error handling after [<index>] in 'frame variable'
Summary:
This fixes a bug where
frame var a[0]+5
returns the value a[0] without any warning because the current logic simply ignores everything after ']' as long as there is no '.', '-' or '[' in the rest of the string.
The fix simplifies the termination condition of the expression path parsing loop to check if have a non-empty remaining string to parse. Previously, the condition checked if a separator was found. That condition coincided with the remaining string-to-parse condition except for the buggy indexed case where non-empty string was left ("+5" in the example above), but the separator index was 'npos'.
Reviewed By: teemperor, labath
Differential Revision: https://reviews.llvm.org/D79404
Diffstat (limited to 'lldb/source/Commands/CommandObjectBreakpoint.cpp')
0 files changed, 0 insertions, 0 deletions