blob: 2099310d32c3fb1768a9220db17e9b8342419006 [file] [log] [blame]
Chris Lattner30fdc8d2010-06-08 16:52:24 +00001//===-- CommandObjectLog.cpp ------------------------------------*- C++ -*-===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9
Chris Lattner30fdc8d2010-06-08 16:52:24 +000010// C Includes
11// C++ Includes
12// Other libraries and framework includes
13// Project includes
Eugene Zelenko26cac3a2016-02-20 00:58:29 +000014#include "CommandObjectLog.h"
Chris Lattner30fdc8d2010-06-08 16:52:24 +000015#include "lldb/Core/Debugger.h"
Chris Lattner30fdc8d2010-06-08 16:52:24 +000016#include "lldb/Core/Module.h"
Chris Lattner30fdc8d2010-06-08 16:52:24 +000017#include "lldb/Core/StreamFile.h"
18#include "lldb/Core/Timer.h"
Zachary Turner3eb2b442017-03-22 23:33:16 +000019#include "lldb/Host/OptionParser.h"
Kate Stoneb9c1b512016-09-06 20:57:50 +000020#include "lldb/Interpreter/Args.h"
Sean Callanan4be39902010-06-23 21:28:25 +000021#include "lldb/Interpreter/CommandInterpreter.h"
Chris Lattner30fdc8d2010-06-08 16:52:24 +000022#include "lldb/Interpreter/CommandReturnObject.h"
Kate Stoneb9c1b512016-09-06 20:57:50 +000023#include "lldb/Interpreter/Options.h"
Chris Lattner30fdc8d2010-06-08 16:52:24 +000024#include "lldb/Symbol/LineTable.h"
25#include "lldb/Symbol/ObjectFile.h"
26#include "lldb/Symbol/SymbolFile.h"
27#include "lldb/Symbol/SymbolVendor.h"
Chris Lattner30fdc8d2010-06-08 16:52:24 +000028#include "lldb/Target/Process.h"
29#include "lldb/Target/Target.h"
Zachary Turner5713a052017-03-22 18:40:07 +000030#include "lldb/Utility/FileSpec.h"
Zachary Turner6f9e6902017-03-03 20:56:28 +000031#include "lldb/Utility/Log.h"
Zachary Turnerbf9a7732017-02-02 21:39:50 +000032#include "lldb/Utility/RegularExpression.h"
33#include "lldb/Utility/Stream.h"
Chris Lattner30fdc8d2010-06-08 16:52:24 +000034
35using namespace lldb;
36using namespace lldb_private;
37
Zachary Turner1f0f5b52016-09-22 20:22:55 +000038static OptionDefinition g_log_options[] = {
39 // clang-format off
40 { LLDB_OPT_SET_1, false, "file", 'f', OptionParser::eRequiredArgument, nullptr, nullptr, 0, eArgTypeFilename, "Set the destination file to log to." },
41 { LLDB_OPT_SET_1, false, "threadsafe", 't', OptionParser::eNoArgument, nullptr, nullptr, 0, eArgTypeNone, "Enable thread safe logging to avoid interweaved log lines." },
42 { LLDB_OPT_SET_1, false, "verbose", 'v', OptionParser::eNoArgument, nullptr, nullptr, 0, eArgTypeNone, "Enable verbose logging." },
Zachary Turner1f0f5b52016-09-22 20:22:55 +000043 { LLDB_OPT_SET_1, false, "sequence", 's', OptionParser::eNoArgument, nullptr, nullptr, 0, eArgTypeNone, "Prepend all log lines with an increasing integer sequence id." },
44 { LLDB_OPT_SET_1, false, "timestamp", 'T', OptionParser::eNoArgument, nullptr, nullptr, 0, eArgTypeNone, "Prepend all log lines with a timestamp." },
45 { LLDB_OPT_SET_1, false, "pid-tid", 'p', OptionParser::eNoArgument, nullptr, nullptr, 0, eArgTypeNone, "Prepend all log lines with the process and thread ID that generates the log line." },
46 { LLDB_OPT_SET_1, false, "thread-name",'n', OptionParser::eNoArgument, nullptr, nullptr, 0, eArgTypeNone, "Prepend all log lines with the thread name for the thread that generates the log line." },
47 { LLDB_OPT_SET_1, false, "stack", 'S', OptionParser::eNoArgument, nullptr, nullptr, 0, eArgTypeNone, "Append a stack backtrace to each log line." },
48 { LLDB_OPT_SET_1, false, "append", 'a', OptionParser::eNoArgument, nullptr, nullptr, 0, eArgTypeNone, "Append to the log file instead of overwriting." },
Pavel Labath107d9bb2017-01-18 11:00:26 +000049 { LLDB_OPT_SET_1, false, "file-function",'F',OptionParser::eNoArgument, nullptr, nullptr, 0, eArgTypeNone, "Prepend the names of files and function that generate the logs." },
Zachary Turner1f0f5b52016-09-22 20:22:55 +000050 // clang-format on
51};
52
Kate Stoneb9c1b512016-09-06 20:57:50 +000053class CommandObjectLogEnable : public CommandObjectParsed {
Chris Lattner30fdc8d2010-06-08 16:52:24 +000054public:
Kate Stoneb9c1b512016-09-06 20:57:50 +000055 //------------------------------------------------------------------
56 // Constructors and Destructors
57 //------------------------------------------------------------------
58 CommandObjectLogEnable(CommandInterpreter &interpreter)
59 : CommandObjectParsed(interpreter, "log enable",
Eugene Zelenko26cac3a2016-02-20 00:58:29 +000060 "Enable logging for a single log channel.",
61 nullptr),
Kate Stoneb9c1b512016-09-06 20:57:50 +000062 m_options() {
63 CommandArgumentEntry arg1;
64 CommandArgumentEntry arg2;
65 CommandArgumentData channel_arg;
66 CommandArgumentData category_arg;
Caroline Ticeceb6b132010-10-26 03:11:13 +000067
Kate Stoneb9c1b512016-09-06 20:57:50 +000068 // Define the first (and only) variant of this arg.
69 channel_arg.arg_type = eArgTypeLogChannel;
70 channel_arg.arg_repetition = eArgRepeatPlain;
Caroline Ticeceb6b132010-10-26 03:11:13 +000071
Kate Stoneb9c1b512016-09-06 20:57:50 +000072 // There is only one variant this argument could be; put it into the
73 // argument entry.
74 arg1.push_back(channel_arg);
75
76 category_arg.arg_type = eArgTypeLogCategory;
77 category_arg.arg_repetition = eArgRepeatPlus;
78
79 arg2.push_back(category_arg);
80
81 // Push the data for the first argument into the m_arguments vector.
82 m_arguments.push_back(arg1);
83 m_arguments.push_back(arg2);
84 }
85
86 ~CommandObjectLogEnable() override = default;
87
88 Options *GetOptions() override { return &m_options; }
89
Kate Stoneb9c1b512016-09-06 20:57:50 +000090 class CommandOptions : public Options {
91 public:
92 CommandOptions() : Options(), log_file(), log_options(0) {}
93
94 ~CommandOptions() override = default;
95
Zachary Turnerfe114832016-11-12 16:56:47 +000096 Error SetOptionValue(uint32_t option_idx, llvm::StringRef option_arg,
Kate Stoneb9c1b512016-09-06 20:57:50 +000097 ExecutionContext *execution_context) override {
98 Error error;
99 const int short_option = m_getopt_table[option_idx].val;
100
101 switch (short_option) {
102 case 'f':
103 log_file.SetFile(option_arg, true);
104 break;
105 case 't':
106 log_options |= LLDB_LOG_OPTION_THREADSAFE;
107 break;
108 case 'v':
109 log_options |= LLDB_LOG_OPTION_VERBOSE;
110 break;
Kate Stoneb9c1b512016-09-06 20:57:50 +0000111 case 's':
112 log_options |= LLDB_LOG_OPTION_PREPEND_SEQUENCE;
113 break;
114 case 'T':
115 log_options |= LLDB_LOG_OPTION_PREPEND_TIMESTAMP;
116 break;
117 case 'p':
118 log_options |= LLDB_LOG_OPTION_PREPEND_PROC_AND_THREAD;
119 break;
120 case 'n':
121 log_options |= LLDB_LOG_OPTION_PREPEND_THREAD_NAME;
122 break;
123 case 'S':
124 log_options |= LLDB_LOG_OPTION_BACKTRACE;
125 break;
126 case 'a':
127 log_options |= LLDB_LOG_OPTION_APPEND;
128 break;
Pavel Labath107d9bb2017-01-18 11:00:26 +0000129 case 'F':
130 log_options |= LLDB_LOG_OPTION_PREPEND_FILE_FUNCTION;
Pavel Labath90505a02017-02-03 20:26:57 +0000131 break;
Kate Stoneb9c1b512016-09-06 20:57:50 +0000132 default:
133 error.SetErrorStringWithFormat("unrecognized option '%c'",
134 short_option);
135 break;
136 }
137
138 return error;
Chris Lattner30fdc8d2010-06-08 16:52:24 +0000139 }
140
Kate Stoneb9c1b512016-09-06 20:57:50 +0000141 void OptionParsingStarting(ExecutionContext *execution_context) override {
142 log_file.Clear();
143 log_options = 0;
Chris Lattner30fdc8d2010-06-08 16:52:24 +0000144 }
145
Zachary Turner1f0f5b52016-09-22 20:22:55 +0000146 llvm::ArrayRef<OptionDefinition> GetDefinitions() override {
Zachary Turner70602432016-09-22 21:06:13 +0000147 return llvm::makeArrayRef(g_log_options);
Zachary Turner1f0f5b52016-09-22 20:22:55 +0000148 }
Chris Lattner30fdc8d2010-06-08 16:52:24 +0000149
Kate Stoneb9c1b512016-09-06 20:57:50 +0000150 // Instance variables to hold the values for command options.
Chris Lattner30fdc8d2010-06-08 16:52:24 +0000151
Kate Stoneb9c1b512016-09-06 20:57:50 +0000152 FileSpec log_file;
153 uint32_t log_options;
154 };
Chris Lattner30fdc8d2010-06-08 16:52:24 +0000155
156protected:
Kate Stoneb9c1b512016-09-06 20:57:50 +0000157 bool DoExecute(Args &args, CommandReturnObject &result) override {
158 if (args.GetArgumentCount() < 2) {
159 result.AppendErrorWithFormat(
160 "%s takes a log channel and one or more log types.\n",
161 m_cmd_name.c_str());
Zachary Turner11eb9c62016-10-05 20:03:37 +0000162 return false;
Jim Ingham5a988412012-06-08 21:56:10 +0000163 }
Zachary Turner11eb9c62016-10-05 20:03:37 +0000164
165 // Store into a std::string since we're about to shift the channel off.
Zachary Turner14f6b2c2016-12-09 01:08:29 +0000166 const std::string channel = args[0].ref;
Zachary Turner11eb9c62016-10-05 20:03:37 +0000167 args.Shift(); // Shift off the channel
168 char log_file[PATH_MAX];
169 if (m_options.log_file)
170 m_options.log_file.GetPath(log_file, sizeof(log_file));
171 else
172 log_file[0] = '\0';
Pavel Labath775588c2017-03-15 09:06:58 +0000173
174 std::string error;
175 llvm::raw_string_ostream error_stream(error);
Zachary Turner11eb9c62016-10-05 20:03:37 +0000176 bool success = m_interpreter.GetDebugger().EnableLog(
Pavel Labath5e336902017-03-01 10:08:40 +0000177 channel, args.GetArgumentArrayRef(), log_file, m_options.log_options,
Pavel Labath775588c2017-03-15 09:06:58 +0000178 error_stream);
179 result.GetErrorStream() << error_stream.str();
180
Zachary Turner11eb9c62016-10-05 20:03:37 +0000181 if (success)
182 result.SetStatus(eReturnStatusSuccessFinishNoResult);
183 else
184 result.SetStatus(eReturnStatusFailed);
Kate Stoneb9c1b512016-09-06 20:57:50 +0000185 return result.Succeeded();
186 }
Jim Ingham5a988412012-06-08 21:56:10 +0000187
Kate Stoneb9c1b512016-09-06 20:57:50 +0000188 CommandOptions m_options;
Chris Lattner30fdc8d2010-06-08 16:52:24 +0000189};
190
Kate Stoneb9c1b512016-09-06 20:57:50 +0000191class CommandObjectLogDisable : public CommandObjectParsed {
Chris Lattner30fdc8d2010-06-08 16:52:24 +0000192public:
Kate Stoneb9c1b512016-09-06 20:57:50 +0000193 //------------------------------------------------------------------
194 // Constructors and Destructors
195 //------------------------------------------------------------------
196 CommandObjectLogDisable(CommandInterpreter &interpreter)
197 : CommandObjectParsed(interpreter, "log disable",
Eugene Zelenko26cac3a2016-02-20 00:58:29 +0000198 "Disable one or more log channel categories.",
Kate Stoneb9c1b512016-09-06 20:57:50 +0000199 nullptr) {
200 CommandArgumentEntry arg1;
201 CommandArgumentEntry arg2;
202 CommandArgumentData channel_arg;
203 CommandArgumentData category_arg;
Caroline Tice7149fab2010-10-29 21:56:41 +0000204
Kate Stoneb9c1b512016-09-06 20:57:50 +0000205 // Define the first (and only) variant of this arg.
206 channel_arg.arg_type = eArgTypeLogChannel;
207 channel_arg.arg_repetition = eArgRepeatPlain;
Caroline Tice7149fab2010-10-29 21:56:41 +0000208
Kate Stoneb9c1b512016-09-06 20:57:50 +0000209 // There is only one variant this argument could be; put it into the
210 // argument entry.
211 arg1.push_back(channel_arg);
Chris Lattner30fdc8d2010-06-08 16:52:24 +0000212
Kate Stoneb9c1b512016-09-06 20:57:50 +0000213 category_arg.arg_type = eArgTypeLogCategory;
214 category_arg.arg_repetition = eArgRepeatPlus;
215
216 arg2.push_back(category_arg);
217
218 // Push the data for the first argument into the m_arguments vector.
219 m_arguments.push_back(arg1);
220 m_arguments.push_back(arg2);
221 }
222
223 ~CommandObjectLogDisable() override = default;
Chris Lattner30fdc8d2010-06-08 16:52:24 +0000224
Jim Ingham5a988412012-06-08 21:56:10 +0000225protected:
Kate Stoneb9c1b512016-09-06 20:57:50 +0000226 bool DoExecute(Args &args, CommandReturnObject &result) override {
Zachary Turner11eb9c62016-10-05 20:03:37 +0000227 if (args.empty()) {
Kate Stoneb9c1b512016-09-06 20:57:50 +0000228 result.AppendErrorWithFormat(
229 "%s takes a log channel and one or more log types.\n",
230 m_cmd_name.c_str());
Zachary Turner11eb9c62016-10-05 20:03:37 +0000231 return false;
232 }
Chris Lattner30fdc8d2010-06-08 16:52:24 +0000233
Zachary Turner14f6b2c2016-12-09 01:08:29 +0000234 const std::string channel = args[0].ref;
Zachary Turner11eb9c62016-10-05 20:03:37 +0000235 args.Shift(); // Shift off the channel
Pavel Labathfb0d22d2017-02-17 13:27:42 +0000236 if (channel == "all") {
Pavel Labath775588c2017-03-15 09:06:58 +0000237 Log::DisableAllLogChannels();
Pavel Labathfb0d22d2017-02-17 13:27:42 +0000238 result.SetStatus(eReturnStatusSuccessFinishNoResult);
Zachary Turner11eb9c62016-10-05 20:03:37 +0000239 } else {
Pavel Labath775588c2017-03-15 09:06:58 +0000240 std::string error;
241 llvm::raw_string_ostream error_stream(error);
Pavel Labath5e336902017-03-01 10:08:40 +0000242 if (Log::DisableLogChannel(channel, args.GetArgumentArrayRef(),
Pavel Labath775588c2017-03-15 09:06:58 +0000243 error_stream))
Kate Stoneb9c1b512016-09-06 20:57:50 +0000244 result.SetStatus(eReturnStatusSuccessFinishNoResult);
Pavel Labath775588c2017-03-15 09:06:58 +0000245 result.GetErrorStream() << error_stream.str();
Chris Lattner30fdc8d2010-06-08 16:52:24 +0000246 }
Kate Stoneb9c1b512016-09-06 20:57:50 +0000247 return result.Succeeded();
248 }
Chris Lattner30fdc8d2010-06-08 16:52:24 +0000249};
250
Kate Stoneb9c1b512016-09-06 20:57:50 +0000251class CommandObjectLogList : public CommandObjectParsed {
Chris Lattner30fdc8d2010-06-08 16:52:24 +0000252public:
Kate Stoneb9c1b512016-09-06 20:57:50 +0000253 //------------------------------------------------------------------
254 // Constructors and Destructors
255 //------------------------------------------------------------------
256 CommandObjectLogList(CommandInterpreter &interpreter)
257 : CommandObjectParsed(interpreter, "log list",
258 "List the log categories for one or more log "
259 "channels. If none specified, lists them all.",
260 nullptr) {
261 CommandArgumentEntry arg;
262 CommandArgumentData channel_arg;
Chris Lattner30fdc8d2010-06-08 16:52:24 +0000263
Kate Stoneb9c1b512016-09-06 20:57:50 +0000264 // Define the first (and only) variant of this arg.
265 channel_arg.arg_type = eArgTypeLogChannel;
266 channel_arg.arg_repetition = eArgRepeatStar;
267
268 // There is only one variant this argument could be; put it into the
269 // argument entry.
270 arg.push_back(channel_arg);
271
272 // Push the data for the first argument into the m_arguments vector.
273 m_arguments.push_back(arg);
274 }
275
276 ~CommandObjectLogList() override = default;
Chris Lattner30fdc8d2010-06-08 16:52:24 +0000277
Jim Ingham5a988412012-06-08 21:56:10 +0000278protected:
Kate Stoneb9c1b512016-09-06 20:57:50 +0000279 bool DoExecute(Args &args, CommandReturnObject &result) override {
Pavel Labath775588c2017-03-15 09:06:58 +0000280 std::string output;
281 llvm::raw_string_ostream output_stream(output);
Zachary Turner11eb9c62016-10-05 20:03:37 +0000282 if (args.empty()) {
Pavel Labath775588c2017-03-15 09:06:58 +0000283 Log::ListAllLogChannels(output_stream);
Kate Stoneb9c1b512016-09-06 20:57:50 +0000284 result.SetStatus(eReturnStatusSuccessFinishResult);
285 } else {
Pavel Labathfb0d22d2017-02-17 13:27:42 +0000286 bool success = true;
287 for (const auto &entry : args.entries())
Pavel Labath775588c2017-03-15 09:06:58 +0000288 success =
289 success && Log::ListChannelCategories(entry.ref, output_stream);
Pavel Labathfb0d22d2017-02-17 13:27:42 +0000290 if (success)
291 result.SetStatus(eReturnStatusSuccessFinishResult);
Chris Lattner30fdc8d2010-06-08 16:52:24 +0000292 }
Pavel Labath775588c2017-03-15 09:06:58 +0000293 result.GetOutputStream() << output_stream.str();
Kate Stoneb9c1b512016-09-06 20:57:50 +0000294 return result.Succeeded();
295 }
Chris Lattner30fdc8d2010-06-08 16:52:24 +0000296};
297
Kate Stoneb9c1b512016-09-06 20:57:50 +0000298class CommandObjectLogTimer : public CommandObjectParsed {
Chris Lattner30fdc8d2010-06-08 16:52:24 +0000299public:
Kate Stoneb9c1b512016-09-06 20:57:50 +0000300 //------------------------------------------------------------------
301 // Constructors and Destructors
302 //------------------------------------------------------------------
303 CommandObjectLogTimer(CommandInterpreter &interpreter)
304 : CommandObjectParsed(interpreter, "log timers",
305 "Enable, disable, dump, and reset LLDB internal "
306 "performance timers.",
307 "log timers < enable <depth> | disable | dump | "
308 "increment <bool> | reset >") {}
Chris Lattner30fdc8d2010-06-08 16:52:24 +0000309
Kate Stoneb9c1b512016-09-06 20:57:50 +0000310 ~CommandObjectLogTimer() override = default;
Chris Lattner30fdc8d2010-06-08 16:52:24 +0000311
Jim Ingham5a988412012-06-08 21:56:10 +0000312protected:
Kate Stoneb9c1b512016-09-06 20:57:50 +0000313 bool DoExecute(Args &args, CommandReturnObject &result) override {
Kate Stoneb9c1b512016-09-06 20:57:50 +0000314 result.SetStatus(eReturnStatusFailed);
Chris Lattner30fdc8d2010-06-08 16:52:24 +0000315
Zachary Turner11eb9c62016-10-05 20:03:37 +0000316 if (args.GetArgumentCount() == 1) {
Zachary Turner14f6b2c2016-12-09 01:08:29 +0000317 auto sub_command = args[0].ref;
Chris Lattner30fdc8d2010-06-08 16:52:24 +0000318
Zachary Turner11eb9c62016-10-05 20:03:37 +0000319 if (sub_command.equals_lower("enable")) {
Kate Stoneb9c1b512016-09-06 20:57:50 +0000320 Timer::SetDisplayDepth(UINT32_MAX);
321 result.SetStatus(eReturnStatusSuccessFinishNoResult);
Zachary Turner11eb9c62016-10-05 20:03:37 +0000322 } else if (sub_command.equals_lower("disable")) {
Kate Stoneb9c1b512016-09-06 20:57:50 +0000323 Timer::DumpCategoryTimes(&result.GetOutputStream());
324 Timer::SetDisplayDepth(0);
325 result.SetStatus(eReturnStatusSuccessFinishResult);
Zachary Turner11eb9c62016-10-05 20:03:37 +0000326 } else if (sub_command.equals_lower("dump")) {
Kate Stoneb9c1b512016-09-06 20:57:50 +0000327 Timer::DumpCategoryTimes(&result.GetOutputStream());
328 result.SetStatus(eReturnStatusSuccessFinishResult);
Zachary Turner11eb9c62016-10-05 20:03:37 +0000329 } else if (sub_command.equals_lower("reset")) {
Kate Stoneb9c1b512016-09-06 20:57:50 +0000330 Timer::ResetCategoryTimes();
331 result.SetStatus(eReturnStatusSuccessFinishResult);
332 }
Zachary Turner11eb9c62016-10-05 20:03:37 +0000333 } else if (args.GetArgumentCount() == 2) {
Zachary Turner14f6b2c2016-12-09 01:08:29 +0000334 auto sub_command = args[0].ref;
335 auto param = args[1].ref;
Jim Ingham932725f2010-11-04 23:08:26 +0000336
Zachary Turner11eb9c62016-10-05 20:03:37 +0000337 if (sub_command.equals_lower("enable")) {
338 uint32_t depth;
339 if (param.consumeInteger(0, depth)) {
Kate Stoneb9c1b512016-09-06 20:57:50 +0000340 result.AppendError(
341 "Could not convert enable depth to an unsigned integer.");
Zachary Turner11eb9c62016-10-05 20:03:37 +0000342 } else {
343 Timer::SetDisplayDepth(depth);
344 result.SetStatus(eReturnStatusSuccessFinishNoResult);
345 }
346 } else if (sub_command.equals_lower("increment")) {
Kate Stoneb9c1b512016-09-06 20:57:50 +0000347 bool success;
Zachary Turner11eb9c62016-10-05 20:03:37 +0000348 bool increment = Args::StringToBoolean(param, false, &success);
Kate Stoneb9c1b512016-09-06 20:57:50 +0000349 if (success) {
350 Timer::SetQuiet(!increment);
351 result.SetStatus(eReturnStatusSuccessFinishNoResult);
352 } else
353 result.AppendError("Could not convert increment value to boolean.");
354 }
Chris Lattner30fdc8d2010-06-08 16:52:24 +0000355 }
Kate Stoneb9c1b512016-09-06 20:57:50 +0000356
357 if (!result.Succeeded()) {
358 result.AppendError("Missing subcommand");
359 result.AppendErrorWithFormat("Usage: %s\n", m_cmd_syntax.c_str());
360 }
361 return result.Succeeded();
362 }
Chris Lattner30fdc8d2010-06-08 16:52:24 +0000363};
364
Kate Stone7428a182016-07-14 22:03:10 +0000365CommandObjectLog::CommandObjectLog(CommandInterpreter &interpreter)
Kate Stoneb9c1b512016-09-06 20:57:50 +0000366 : CommandObjectMultiword(interpreter, "log",
367 "Commands controlling LLDB internal logging.",
368 "log <subcommand> [<command-options>]") {
369 LoadSubCommand("enable",
370 CommandObjectSP(new CommandObjectLogEnable(interpreter)));
371 LoadSubCommand("disable",
372 CommandObjectSP(new CommandObjectLogDisable(interpreter)));
373 LoadSubCommand("list",
374 CommandObjectSP(new CommandObjectLogList(interpreter)));
375 LoadSubCommand("timers",
376 CommandObjectSP(new CommandObjectLogTimer(interpreter)));
Chris Lattner30fdc8d2010-06-08 16:52:24 +0000377}
378
Eugene Zelenko26cac3a2016-02-20 00:58:29 +0000379CommandObjectLog::~CommandObjectLog() = default;