[all-commits] [llvm/llvm-project] 8398ad: [lldb] Unify the way we get the Target in CommandO...
Jonas Devlieghere via All-commits
all-commits at lists.llvm.org
Wed Jul 31 09:57:32 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 8398ad9cb21736dc57ee4dd766bd0859ef9bd000
https://github.com/llvm/llvm-project/commit/8398ad9cb21736dc57ee4dd766bd0859ef9bd000
Author: Jonas Devlieghere <jonas at devlieghere.com>
Date: 2024-07-31 (Wed, 31 Jul 2024)
Changed paths:
M lldb/include/lldb/Interpreter/CommandObject.h
M lldb/source/Commands/CommandObjectBreakpoint.cpp
M lldb/source/Commands/CommandObjectBreakpointCommand.cpp
M lldb/source/Commands/CommandObjectDisassemble.cpp
M lldb/source/Commands/CommandObjectExpression.cpp
M lldb/source/Commands/CommandObjectFrame.cpp
M lldb/source/Commands/CommandObjectProcess.cpp
M lldb/source/Commands/CommandObjectTarget.cpp
M lldb/source/Commands/CommandObjectThread.cpp
M lldb/source/Commands/CommandObjectWatchpoint.cpp
M lldb/source/Commands/CommandObjectWatchpointCommand.cpp
M lldb/source/Interpreter/CommandObject.cpp
M lldb/source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.cpp
Log Message:
-----------
[lldb] Unify the way we get the Target in CommandObject (#101208)
Currently, CommandObjects are obtaining a target in a variety of ways.
Often the command incorrectly operates on the selected target. As an
example, when a breakpoint command is running, the current target is
passed into the command but the target that hit the breakpoint is not
the selected target. In other places we use the CommandObject's
execution context, which is frozen during the execution of the command,
and comes with its own limitations. Finally, we often want to fall back
to the dummy target if no real target is available.
Instead of having to guess how to get the target, this patch introduces
one helper function in CommandObject to get the most relevant target. In
order of priority, that's the target from the command object's execution
context, from the interpreter's execution context, the selected target
or the dummy target.
rdar://110846511
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