llvm-project/lldb
Raphael Isemann 04a4c0910b [lldb] Unify target checking in CommandObject
Summary:
We currently have several CommandObjects that manually reimplement the checking for a selected target
or a target in the execution context (which is the selected target when they are invoked). This patch removes
all these checks and replaces them by setting the eCommandRequiresTarget flag that Pavel suggested. With
this flag we are doing the same check but without having to duplicate this code in all these CommandObjects.

I also added a `GetSelectedTarget()` variant of the `GetSelectedOrDummyTarget()` function to the
CommandObject that checks that the flag is set and then returns a reference to the target. I didn't rewrite
all the `target` variables from `Target *` to `Target &` in this patch as last time this change caused a lot of merge
conflicts in Swift and I would prefer having that in a separate NFC commit.

Reviewers: labath, clayborg

Reviewed By: labath, clayborg

Subscribers: clayborg, JDevlieghere, jingham, amccarth, abidh, lldb-commits

Tags: #lldb

Differential Revision: https://reviews.llvm.org/D66863

llvm-svn: 370571
2019-08-31 09:41:25 +00:00
..
cmake [cmake] Remove the test for libstdc++<4.9 2019-08-20 12:17:42 +00:00
docs use https for llvm.org in the doc 2019-08-29 07:20:08 +00:00
examples Revert [heap.py] Add missing declaration for malloc_get_all_zones 2019-08-22 21:01:45 +00:00
include/lldb [lldb] Unify target checking in CommandObject 2019-08-31 09:41:25 +00:00
lit [lit] Only set DYLD_LIBRARY_PATH for shared builds 2019-08-30 23:16:02 +00:00
packages/Python/lldbsuite [lldb][NFC] Remove unused prompt variable in TestMultilineCompletion.py 2019-08-31 09:40:26 +00:00
resources [CMake] Revised LLDB.framework builds 2019-01-04 12:46:50 +00:00
scripts [lldb] Remove Xcode project legacy 2019-07-24 09:20:14 +00:00
source [lldb] Unify target checking in CommandObject 2019-08-31 09:41:25 +00:00
test [test] Fix various module cache bugs and inconsistencies 2019-08-29 18:37:05 +00:00
third_party/Python/module Initial support for native debugging of x86/x64 Windows processes 2019-08-13 22:18:01 +00:00
tools Send error message on failed attach from debugerserver. 2019-08-27 00:08:27 +00:00
unittests Fix GetDIEForDeclContext so it only returns entries matching the provided context 2019-08-29 15:30:52 +00:00
utils [test] Fix various module cache bugs and inconsistencies 2019-08-29 18:37:05 +00:00
.arcconfig
.clang-format
.gitignore Add .noindex to the gitignore 2019-04-05 17:57:42 +00:00
CMakeLists.txt [test] Fix various module cache bugs and inconsistencies 2019-08-29 18:37:05 +00:00
CODE_OWNERS.txt [lldb][NFC] Cleanup mentions and code related to lldb-mi 2019-07-19 15:55:23 +00:00
LICENSE.TXT Fix typos throughout the license files that somehow I and my reviewers 2019-01-21 09:52:34 +00:00
use_lldb_suite_root.py