llvm-project/lldb/source
Venkata Ramanaiah Nalamothu a57b62deef [lldb] Fix thread step until to not set breakpoint(s) on incorrect line numbers
The requirements for "thread until <line number>" are:

a) If any code contributed by <line number> or the nearest subsequent of <line number> is executed before leaving the function, stop
b) If you end up leaving the function w/o triggering (a), then stop

In case of (a), since the <line number> may have multiple entries in the line table and the compiler might have scheduled/moved the relevant code across, and the lldb does not know the control flow, set breakpoints on all the line table entries of best match of <line number> i.e. exact or the nearest subsequent line.

Along with the above, currently, CommandObjectThreadUntil is also setting the breakpoints on all the subsequent line numbers after the best match and this latter part is wrong.

This issue is discussed at http://lists.llvm.org/pipermail/lldb-dev/2018-August/013979.html.

In fact, currently `TestStepUntil.py` is not actually testing step until scenarios and `test_missing_one` test fails without this patch if tests are made to run. Fixed the test as well.

Reviewed By: jingham

Differential Revision: https://reviews.llvm.org/D50304
2022-06-25 00:01:04 +05:30
..
API [lldb] Support a buffered logging mode 2022-06-23 09:12:01 -07:00
Breakpoint Don't use Optional::hasValue (NFC) 2022-06-20 20:05:16 -07:00
Commands [lldb] Fix thread step until to not set breakpoint(s) on incorrect line numbers 2022-06-25 00:01:04 +05:30
Core [lldb] Replace Host::SystemLog with Debugger::Report{Error,Warning} 2022-06-24 09:46:26 -07:00
DataFormatters [lldb] Add setting for max depth of value object printing (NFC) 2022-05-03 10:39:42 -07:00
Expression Support expressions in the context of a reference 2022-06-21 14:30:07 +02:00
Host [lldb] Move Host::SystemLog out of !defined(_WIN32) 2022-06-24 11:18:31 -07:00
Initialization [lldb] Remove FileSystem::Initialize from FileCollector 2022-03-03 13:22:38 -08:00
Interpreter [lldb] Replace Host::SystemLog with Debugger::Report{Error,Warning} 2022-06-24 09:46:26 -07:00
Plugins [lldb] Replace Host::SystemLog with Debugger::Report{Error,Warning} 2022-06-24 09:46:26 -07:00
Symbol [lldb] Replace Host::SystemLog with Debugger::Report{Error,Warning} 2022-06-24 09:46:26 -07:00
Target [NFC][lldb][trace] Rename trace session to trace bundle 2022-06-24 08:41:33 -07:00
Utility [lldb] [llgs] Support resuming one process with PID!=current via vCont 2022-06-24 17:20:23 +02:00
Version [lldb] Fix LLDB_FULL_VERSION_STRING 2022-01-19 14:20:22 -08:00
CMakeLists.txt [lldb] Make lldbVersion a full fledged library 2021-12-08 15:14:34 -08:00