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 
13 
14 namespace lldb_private {
15 
16 /// Implements `dwim-print`, a printing command that chooses the most direct,
17 /// efficient, and resilient means of printing a given expression.
18 ///
19 /// DWIM is an acronym for Do What I Mean. From Wikipedia, DWIM is described as:
20 ///
21 /// > attempt to anticipate what users intend to do, correcting trivial errors
22 /// > automatically rather than blindly executing users' explicit but
23 /// > potentially incorrect input
24 ///
25 /// The `dwim-print` command serves as a single print command for users who
26 /// don't yet know, or perfer not to know, the various lldb commands that can be
27 /// used to print, and when to use them.
29 public:
31 
32  ~CommandObjectDWIMPrint() override = default;
33 
34 private:
35  bool DoExecute(llvm::StringRef command, CommandReturnObject &result) override;
36 };
37 
38 } // namespace lldb_private
39 
40 #endif
lldb_private::CommandObjectDWIMPrint::DoExecute
bool DoExecute(llvm::StringRef command, CommandReturnObject &result) override
Definition: CommandObjectDWIMPrint.cpp:31
lldb_private::CommandObjectDWIMPrint
Implements dwim-print, a printing command that chooses the most direct, efficient,...
Definition: CommandObjectDWIMPrint.h:28
lldb_private::CommandObjectDWIMPrint::CommandObjectDWIMPrint
CommandObjectDWIMPrint(CommandInterpreter &interpreter)
Definition: CommandObjectDWIMPrint.cpp:24
lldb_private::CommandInterpreter
Definition: CommandInterpreter.h:215
lldb_private::CommandObjectRaw
Definition: CommandObject.h:408
lldb_private::CommandReturnObject
Definition: CommandReturnObject.h:26
CommandObject.h
lldb_private
A class that represents a running process on the host machine.
Definition: SBCommandInterpreterRunOptions.h:16
lldb_private::CommandObjectDWIMPrint::~CommandObjectDWIMPrint
~CommandObjectDWIMPrint() override=default