LLDB mainline
CommandObjectDWIMPrint.h
Go to the documentation of this file.
1//===-- CommandObjectDWIMPrint.h --------------------------------*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
9#ifndef LLDB_SOURCE_COMMANDS_COMMANDOBJECTDWIMPRINT_H
10#define LLDB_SOURCE_COMMANDS_COMMANDOBJECTDWIMPRINT_H
11
17
18namespace lldb_private {
19
20/// Implements `dwim-print`, a printing command that chooses the most direct,
21/// efficient, and resilient means of printing a given expression.
22///
23/// DWIM is an acronym for Do What I Mean. From Wikipedia, DWIM is described as:
24///
25/// > attempt to anticipate what users intend to do, correcting trivial errors
26/// > automatically rather than blindly executing users' explicit but
27/// > potentially incorrect input
28///
29/// The `dwim-print` command serves as a single print command for users who
30/// don't yet know, or perfer not to know, the various lldb commands that can be
31/// used to print, and when to use them.
33public:
35
36 ~CommandObjectDWIMPrint() override = default;
37
38 Options *GetOptions() override;
39
40 bool WantsCompletion() override { return true; }
41
42private:
43 void DoExecute(llvm::StringRef command, CommandReturnObject &result) override;
44
49};
50
51} // namespace lldb_private
52
53#endif
Implements dwim-print, a printing command that chooses the most direct, efficient,...
CommandObjectExpression::CommandOptions m_expr_options
~CommandObjectDWIMPrint() override=default
OptionGroupValueObjectDisplay m_varobj_options
void DoExecute(llvm::StringRef command, CommandReturnObject &result) override
A command line option parsing protocol class.
Definition: Options.h:58
A class that represents a running process on the host machine.
Definition: SBAttachInfo.h:14