diff options
| author | Davide Italiano <davide@freebsd.org> | 2018-03-23 21:55:48 +0000 |
|---|---|---|
| committer | Davide Italiano <davide@freebsd.org> | 2018-03-23 21:55:48 +0000 |
| commit | 10166c74683ccc4680c5db8437cb43bc2b8bb065 (patch) | |
| tree | 4bf5355cb67ab8f47b9924555b97085ff0477949 /lldb/source/Commands | |
| parent | 6660fd0f959e2e07db47729fb6112b7a823a67c2 (diff) | |
| download | bcm5719-llvm-10166c74683ccc4680c5db8437cb43bc2b8bb065.tar.gz bcm5719-llvm-10166c74683ccc4680c5db8437cb43bc2b8bb065.zip | |
[Commands] Add a (currently empty) `stats` command.
This one will be used to print statistics about lldb sessions
(including, e.g. number of expression evaluation succeeded or
failed). I decided to commit the skeleton first so that we have
a clean reference on how a command should be implemented.
My future commits are going to populate this command and test
it.
<rdar://problem/36555975>
llvm-svn: 328378
Diffstat (limited to 'lldb/source/Commands')
| -rw-r--r-- | lldb/source/Commands/CMakeLists.txt | 1 | ||||
| -rw-r--r-- | lldb/source/Commands/CommandObjectStats.cpp | 28 | ||||
| -rw-r--r-- | lldb/source/Commands/CommandObjectStats.h | 27 |
3 files changed, 56 insertions, 0 deletions
diff --git a/lldb/source/Commands/CMakeLists.txt b/lldb/source/Commands/CMakeLists.txt index f0199eb4cf4..1dbaab5174e 100644 --- a/lldb/source/Commands/CMakeLists.txt +++ b/lldb/source/Commands/CMakeLists.txt @@ -20,6 +20,7 @@ add_lldb_library(lldbCommands CommandObjectRegister.cpp CommandObjectSettings.cpp CommandObjectSource.cpp + CommandObjectStats.cpp CommandObjectTarget.cpp CommandObjectThread.cpp CommandObjectType.cpp diff --git a/lldb/source/Commands/CommandObjectStats.cpp b/lldb/source/Commands/CommandObjectStats.cpp new file mode 100644 index 00000000000..84a8a6c376f --- /dev/null +++ b/lldb/source/Commands/CommandObjectStats.cpp @@ -0,0 +1,28 @@ +//===-- CommandObjectStats.cpp ----------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include "CommandObjectStats.h" +#include "lldb/Host/Host.h" +#include "lldb/Interpreter/CommandInterpreter.h" +#include "lldb/Interpreter/CommandReturnObject.h" + +using namespace lldb; +using namespace lldb_private; + +CommandObjectStats::CommandObjectStats(CommandInterpreter &interpreter) + : CommandObjectParsed( + interpreter, "stats", "Print statistics about a debugging session", + nullptr) { +} + +bool CommandObjectStats::DoExecute(Args &command, CommandReturnObject &result) { + return true; +} + +CommandObjectStats::~CommandObjectStats() {} diff --git a/lldb/source/Commands/CommandObjectStats.h b/lldb/source/Commands/CommandObjectStats.h new file mode 100644 index 00000000000..b71fac4613c --- /dev/null +++ b/lldb/source/Commands/CommandObjectStats.h @@ -0,0 +1,27 @@ +//===-- CommandObjectStats.h ------------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef liblldb_CommandObjectStats_h_ +#define liblldb_CommandObjectStats_h_ + +#include "lldb/Interpreter/CommandObject.h" + +namespace lldb_private { +class CommandObjectStats : public CommandObjectParsed { +public: + CommandObjectStats(CommandInterpreter &interpreter); + + ~CommandObjectStats() override; + +protected: + bool DoExecute(Args &command, CommandReturnObject &result) override; +}; +} // namespace lldb_private + +#endif // liblldb_CommandObjectLanguage_h_ |

