LLDB  mainline
CommandObjectLog.cpp
Go to the documentation of this file.
1 //===-- CommandObjectLog.cpp ----------------------------------------------===//
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 #include "CommandObjectLog.h"
10 #include "lldb/Core/Debugger.h"
11 #include "lldb/Host/OptionParser.h"
15 #include "lldb/Utility/Args.h"
16 #include "lldb/Utility/FileSpec.h"
17 #include "lldb/Utility/Log.h"
18 #include "lldb/Utility/Stream.h"
19 #include "lldb/Utility/Timer.h"
20 
21 using namespace lldb;
22 using namespace lldb_private;
23 
24 #define LLDB_OPTIONS_log
25 #include "CommandOptions.inc"
26 
27 /// Common completion logic for log enable/disable.
29  size_t arg_index = request.GetCursorIndex();
30  if (arg_index == 0) { // We got: log enable/disable x[tab]
31  for (llvm::StringRef channel : Log::ListChannels())
32  request.TryCompleteCurrentArg(channel);
33  } else if (arg_index >= 1) { // We got: log enable/disable channel x[tab]
34  llvm::StringRef channel = request.GetParsedLine().GetArgumentAtIndex(0);
35  Log::ForEachChannelCategory(
36  channel, [&request](llvm::StringRef name, llvm::StringRef desc) {
37  request.TryCompleteCurrentArg(name, desc);
38  });
39  }
40 }
41 
43 public:
44  // Constructors and Destructors
46  : CommandObjectParsed(interpreter, "log enable",
47  "Enable logging for a single log channel.",
48  nullptr) {
51  CommandArgumentData channel_arg;
52  CommandArgumentData category_arg;
53 
54  // Define the first (and only) variant of this arg.
55  channel_arg.arg_type = eArgTypeLogChannel;
56  channel_arg.arg_repetition = eArgRepeatPlain;
57 
58  // There is only one variant this argument could be; put it into the
59  // argument entry.
60  arg1.push_back(channel_arg);
61 
62  category_arg.arg_type = eArgTypeLogCategory;
63  category_arg.arg_repetition = eArgRepeatPlus;
64 
65  arg2.push_back(category_arg);
66 
67  // Push the data for the first argument into the m_arguments vector.
68  m_arguments.push_back(arg1);
69  m_arguments.push_back(arg2);
70  }
71 
72  ~CommandObjectLogEnable() override = default;
73 
74  Options *GetOptions() override { return &m_options; }
75 
76  class CommandOptions : public Options {
77  public:
78  CommandOptions() = default;
79 
80  ~CommandOptions() override = default;
81 
82  Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_arg,
83  ExecutionContext *execution_context) override {
84  Status error;
85  const int short_option = m_getopt_table[option_idx].val;
86 
87  switch (short_option) {
88  case 'f':
89  log_file.SetFile(option_arg, FileSpec::Style::native);
90  FileSystem::Instance().Resolve(log_file);
91  break;
92  case 't':
93  log_options |= LLDB_LOG_OPTION_THREADSAFE;
94  break;
95  case 'v':
96  log_options |= LLDB_LOG_OPTION_VERBOSE;
97  break;
98  case 's':
99  log_options |= LLDB_LOG_OPTION_PREPEND_SEQUENCE;
100  break;
101  case 'T':
102  log_options |= LLDB_LOG_OPTION_PREPEND_TIMESTAMP;
103  break;
104  case 'p':
106  break;
107  case 'n':
109  break;
110  case 'S':
111  log_options |= LLDB_LOG_OPTION_BACKTRACE;
112  break;
113  case 'a':
114  log_options |= LLDB_LOG_OPTION_APPEND;
115  break;
116  case 'F':
118  break;
119  default:
120  llvm_unreachable("Unimplemented option");
121  }
122 
123  return error;
124  }
125 
126  void OptionParsingStarting(ExecutionContext *execution_context) override {
127  log_file.Clear();
128  log_options = 0;
129  }
130 
131  llvm::ArrayRef<OptionDefinition> GetDefinitions() override {
132  return llvm::makeArrayRef(g_log_options);
133  }
134 
135  // Instance variables to hold the values for command options.
136 
138  uint32_t log_options = 0;
139  };
140 
141  void
143  OptionElementVector &opt_element_vector) override {
144  CompleteEnableDisable(request);
145  }
146 
147 protected:
148  bool DoExecute(Args &args, CommandReturnObject &result) override {
149  if (args.GetArgumentCount() < 2) {
150  result.AppendErrorWithFormat(
151  "%s takes a log channel and one or more log types.\n",
152  m_cmd_name.c_str());
153  return false;
154  }
155 
156  // Store into a std::string since we're about to shift the channel off.
157  const std::string channel = std::string(args[0].ref());
158  args.Shift(); // Shift off the channel
159  char log_file[PATH_MAX];
160  if (m_options.log_file)
161  m_options.log_file.GetPath(log_file, sizeof(log_file));
162  else
163  log_file[0] = '\0';
164 
166  llvm::raw_string_ostream error_stream(error);
167  bool success =
168  GetDebugger().EnableLog(channel, args.GetArgumentArrayRef(), log_file,
169  m_options.log_options, error_stream);
170  result.GetErrorStream() << error_stream.str();
171 
172  if (success)
174  else
176  return result.Succeeded();
177  }
178 
180 };
181 
183 public:
184  // Constructors and Destructors
186  : CommandObjectParsed(interpreter, "log disable",
187  "Disable one or more log channel categories.",
188  nullptr) {
191  CommandArgumentData channel_arg;
192  CommandArgumentData category_arg;
193 
194  // Define the first (and only) variant of this arg.
195  channel_arg.arg_type = eArgTypeLogChannel;
196  channel_arg.arg_repetition = eArgRepeatPlain;
197 
198  // There is only one variant this argument could be; put it into the
199  // argument entry.
200  arg1.push_back(channel_arg);
201 
202  category_arg.arg_type = eArgTypeLogCategory;
203  category_arg.arg_repetition = eArgRepeatPlus;
204 
205  arg2.push_back(category_arg);
206 
207  // Push the data for the first argument into the m_arguments vector.
208  m_arguments.push_back(arg1);
209  m_arguments.push_back(arg2);
210  }
211 
212  ~CommandObjectLogDisable() override = default;
213 
214  void
216  OptionElementVector &opt_element_vector) override {
217  CompleteEnableDisable(request);
218  }
219 
220 protected:
221  bool DoExecute(Args &args, CommandReturnObject &result) override {
222  if (args.empty()) {
223  result.AppendErrorWithFormat(
224  "%s takes a log channel and one or more log types.\n",
225  m_cmd_name.c_str());
226  return false;
227  }
228 
229  const std::string channel = std::string(args[0].ref());
230  args.Shift(); // Shift off the channel
231  if (channel == "all") {
232  Log::DisableAllLogChannels();
234  } else {
236  llvm::raw_string_ostream error_stream(error);
237  if (Log::DisableLogChannel(channel, args.GetArgumentArrayRef(),
238  error_stream))
240  result.GetErrorStream() << error_stream.str();
241  }
242  return result.Succeeded();
243  }
244 };
245 
247 public:
248  // Constructors and Destructors
250  : CommandObjectParsed(interpreter, "log list",
251  "List the log categories for one or more log "
252  "channels. If none specified, lists them all.",
253  nullptr) {
255  CommandArgumentData channel_arg;
256 
257  // Define the first (and only) variant of this arg.
258  channel_arg.arg_type = eArgTypeLogChannel;
259  channel_arg.arg_repetition = eArgRepeatStar;
260 
261  // There is only one variant this argument could be; put it into the
262  // argument entry.
263  arg.push_back(channel_arg);
264 
265  // Push the data for the first argument into the m_arguments vector.
266  m_arguments.push_back(arg);
267  }
268 
269  ~CommandObjectLogList() override = default;
270 
271  void
273  OptionElementVector &opt_element_vector) override {
274  for (llvm::StringRef channel : Log::ListChannels())
275  request.TryCompleteCurrentArg(channel);
276  }
277 
278 protected:
279  bool DoExecute(Args &args, CommandReturnObject &result) override {
280  std::string output;
281  llvm::raw_string_ostream output_stream(output);
282  if (args.empty()) {
283  Log::ListAllLogChannels(output_stream);
285  } else {
286  bool success = true;
287  for (const auto &entry : args.entries())
288  success =
289  success && Log::ListChannelCategories(entry.ref(), output_stream);
290  if (success)
292  }
293  result.GetOutputStream() << output_stream.str();
294  return result.Succeeded();
295  }
296 };
297 
299 public:
300  // Constructors and Destructors
302  : CommandObjectParsed(interpreter, "log timers enable",
303  "enable LLDB internal performance timers",
304  "log timers enable <depth>") {
306  CommandArgumentData depth_arg;
307 
308  // Define the first (and only) variant of this arg.
309  depth_arg.arg_type = eArgTypeCount;
311 
312  // There is only one variant this argument could be; put it into the
313  // argument entry.
314  arg.push_back(depth_arg);
315 
316  // Push the data for the first argument into the m_arguments vector.
317  m_arguments.push_back(arg);
318  }
319 
320  ~CommandObjectLogTimerEnable() override = default;
321 
322 protected:
323  bool DoExecute(Args &args, CommandReturnObject &result) override {
325 
326  if (args.GetArgumentCount() == 0) {
327  Timer::SetDisplayDepth(UINT32_MAX);
329  } else if (args.GetArgumentCount() == 1) {
330  uint32_t depth;
331  if (args[0].ref().consumeInteger(0, depth)) {
332  result.AppendError(
333  "Could not convert enable depth to an unsigned integer.");
334  } else {
335  Timer::SetDisplayDepth(depth);
337  }
338  }
339 
340  if (!result.Succeeded()) {
341  result.AppendError("Missing subcommand");
342  result.AppendErrorWithFormat("Usage: %s\n", m_cmd_syntax.c_str());
343  }
344  return result.Succeeded();
345  }
346 };
347 
349 public:
350  // Constructors and Destructors
352  : CommandObjectParsed(interpreter, "log timers disable",
353  "disable LLDB internal performance timers",
354  nullptr) {}
355 
356  ~CommandObjectLogTimerDisable() override = default;
357 
358 protected:
359  bool DoExecute(Args &args, CommandReturnObject &result) override {
360  Timer::DumpCategoryTimes(&result.GetOutputStream());
361  Timer::SetDisplayDepth(0);
363 
364  if (!result.Succeeded()) {
365  result.AppendError("Missing subcommand");
366  result.AppendErrorWithFormat("Usage: %s\n", m_cmd_syntax.c_str());
367  }
368  return result.Succeeded();
369  }
370 };
371 
373 public:
374  // Constructors and Destructors
376  : CommandObjectParsed(interpreter, "log timers dump",
377  "dump LLDB internal performance timers", nullptr) {}
378 
379  ~CommandObjectLogTimerDump() override = default;
380 
381 protected:
382  bool DoExecute(Args &args, CommandReturnObject &result) override {
383  Timer::DumpCategoryTimes(&result.GetOutputStream());
385 
386  if (!result.Succeeded()) {
387  result.AppendError("Missing subcommand");
388  result.AppendErrorWithFormat("Usage: %s\n", m_cmd_syntax.c_str());
389  }
390  return result.Succeeded();
391  }
392 };
393 
395 public:
396  // Constructors and Destructors
398  : CommandObjectParsed(interpreter, "log timers reset",
399  "reset LLDB internal performance timers", nullptr) {
400  }
401 
402  ~CommandObjectLogTimerReset() override = default;
403 
404 protected:
405  bool DoExecute(Args &args, CommandReturnObject &result) override {
406  Timer::ResetCategoryTimes();
408 
409  if (!result.Succeeded()) {
410  result.AppendError("Missing subcommand");
411  result.AppendErrorWithFormat("Usage: %s\n", m_cmd_syntax.c_str());
412  }
413  return result.Succeeded();
414  }
415 };
416 
418 public:
419  // Constructors and Destructors
421  : CommandObjectParsed(interpreter, "log timers increment",
422  "increment LLDB internal performance timers",
423  "log timers increment <bool>") {
425  CommandArgumentData bool_arg;
426 
427  // Define the first (and only) variant of this arg.
428  bool_arg.arg_type = eArgTypeBoolean;
429  bool_arg.arg_repetition = eArgRepeatPlain;
430 
431  // There is only one variant this argument could be; put it into the
432  // argument entry.
433  arg.push_back(bool_arg);
434 
435  // Push the data for the first argument into the m_arguments vector.
436  m_arguments.push_back(arg);
437  }
438 
439  ~CommandObjectLogTimerIncrement() override = default;
440 
441  void
443  OptionElementVector &opt_element_vector) override {
444  request.TryCompleteCurrentArg("true");
445  request.TryCompleteCurrentArg("false");
446  }
447 
448 protected:
449  bool DoExecute(Args &args, CommandReturnObject &result) override {
451 
452  if (args.GetArgumentCount() == 1) {
453  bool success;
454  bool increment =
455  OptionArgParser::ToBoolean(args[0].ref(), false, &success);
456 
457  if (success) {
458  Timer::SetQuiet(!increment);
460  } else
461  result.AppendError("Could not convert increment value to boolean.");
462  }
463 
464  if (!result.Succeeded()) {
465  result.AppendError("Missing subcommand");
466  result.AppendErrorWithFormat("Usage: %s\n", m_cmd_syntax.c_str());
467  }
468  return result.Succeeded();
469  }
470 };
471 
473 public:
475  : CommandObjectMultiword(interpreter, "log timers",
476  "Enable, disable, dump, and reset LLDB internal "
477  "performance timers.",
478  "log timers < enable <depth> | disable | dump | "
479  "increment <bool> | reset >") {
480  LoadSubCommand("enable", CommandObjectSP(
481  new CommandObjectLogTimerEnable(interpreter)));
482  LoadSubCommand("disable", CommandObjectSP(new CommandObjectLogTimerDisable(
483  interpreter)));
484  LoadSubCommand("dump",
485  CommandObjectSP(new CommandObjectLogTimerDump(interpreter)));
486  LoadSubCommand(
487  "reset", CommandObjectSP(new CommandObjectLogTimerReset(interpreter)));
488  LoadSubCommand(
489  "increment",
490  CommandObjectSP(new CommandObjectLogTimerIncrement(interpreter)));
491  }
492 
493  ~CommandObjectLogTimer() override = default;
494 };
495 
496 CommandObjectLog::CommandObjectLog(CommandInterpreter &interpreter)
497  : CommandObjectMultiword(interpreter, "log",
498  "Commands controlling LLDB internal logging.",
499  "log <subcommand> [<command-options>]") {
500  LoadSubCommand("enable",
501  CommandObjectSP(new CommandObjectLogEnable(interpreter)));
502  LoadSubCommand("disable",
503  CommandObjectSP(new CommandObjectLogDisable(interpreter)));
504  LoadSubCommand("list",
505  CommandObjectSP(new CommandObjectLogList(interpreter)));
506  LoadSubCommand("timers",
507  CommandObjectSP(new CommandObjectLogTimer(interpreter)));
508 }
509 
CommandObjectLogTimerDump::CommandObjectLogTimerDump
CommandObjectLogTimerDump(CommandInterpreter &interpreter)
Definition: CommandObjectLog.cpp:375
lldb_private::eArgRepeatOptional
@ eArgRepeatOptional
Definition: lldb-private-enumerations.h:96
CommandObjectLogTimerReset::CommandObjectLogTimerReset
CommandObjectLogTimerReset(CommandInterpreter &interpreter)
Definition: CommandObjectLog.cpp:397
CommandObjectLogDisable
Definition: CommandObjectLog.cpp:182
LLDB_LOG_OPTION_PREPEND_THREAD_NAME
#define LLDB_LOG_OPTION_PREPEND_THREAD_NAME
Definition: Log.h:40
lldb_private::CommandObjectParsed
Definition: CommandObject.h:393
lldb_private::ExecutionContext
Definition: ExecutionContext.h:292
CommandObjectLogEnable::CommandOptions
Definition: CommandObjectLog.cpp:76
CommandObjectLogTimerReset::DoExecute
bool DoExecute(Args &args, CommandReturnObject &result) override
Definition: CommandObjectLog.cpp:405
CommandObjectLogTimerDisable
Definition: CommandObjectLog.cpp:348
CommandObjectLogEnable::CommandOptions::GetDefinitions
llvm::ArrayRef< OptionDefinition > GetDefinitions() override
Definition: CommandObjectLog.cpp:131
CommandObjectLogEnable::HandleArgumentCompletion
void HandleArgumentCompletion(CompletionRequest &request, OptionElementVector &opt_element_vector) override
The input array contains a parsed version of the line.
Definition: CommandObjectLog.cpp:142
lldb_private::eArgRepeatPlain
@ eArgRepeatPlain
Definition: lldb-private-enumerations.h:95
CompleteEnableDisable
static void CompleteEnableDisable(CompletionRequest &request)
Common completion logic for log enable/disable.
Definition: CommandObjectLog.cpp:28
CommandObjectLogTimerIncrement::HandleArgumentCompletion
void HandleArgumentCompletion(CompletionRequest &request, OptionElementVector &opt_element_vector) override
The input array contains a parsed version of the line.
Definition: CommandObjectLog.cpp:442
lldb_private::CompletionRequest::GetParsedLine
const Args & GetParsedLine() const
Definition: CompletionRequest.h:134
lldb_private::CompletionRequest::TryCompleteCurrentArg
void TryCompleteCurrentArg(llvm::StringRef completion, llvm::StringRef description="")
Adds a possible completion string if the completion would complete the current argument.
Definition: CompletionRequest.h:180
CommandObjectLogDisable::HandleArgumentCompletion
void HandleArgumentCompletion(CompletionRequest &request, OptionElementVector &opt_element_vector) override
The input array contains a parsed version of the line.
Definition: CommandObjectLog.cpp:215
lldb_private::Args::Shift
void Shift()
Shifts the first argument C string value of the array off the argument array.
Definition: Args.cpp:281
lldb_private::CommandObject::CommandArgumentData
Definition: CommandObject.h:89
lldb::eArgTypeLogChannel
@ eArgTypeLogChannel
Definition: lldb-enumerations.h:549
CommandObjectLogTimerDump::DoExecute
bool DoExecute(Args &args, CommandReturnObject &result) override
Definition: CommandObjectLog.cpp:382
OptionArgParser.h
CommandObjectLogTimerEnable::CommandObjectLogTimerEnable
CommandObjectLogTimerEnable(CommandInterpreter &interpreter)
Definition: CommandObjectLog.cpp:301
lldb_private::CommandObject::CommandArgumentData::arg_repetition
ArgumentRepetitionType arg_repetition
Definition: CommandObject.h:92
lldb_private::Args
Definition: Args.h:33
lldb_private::CommandReturnObject::Succeeded
bool Succeeded() const
Definition: CommandReturnObject.cpp:131
LLDB_LOG_OPTION_APPEND
#define LLDB_LOG_OPTION_APPEND
Definition: Log.h:42
lldb_private::eArgRepeatPlus
@ eArgRepeatPlus
Definition: lldb-private-enumerations.h:97
CommandReturnObject.h
CommandObjectLogTimerEnable::DoExecute
bool DoExecute(Args &args, CommandReturnObject &result) override
Definition: CommandObjectLog.cpp:323
Debugger.h
CommandObjectLogTimer::CommandObjectLogTimer
CommandObjectLogTimer(CommandInterpreter &interpreter)
Definition: CommandObjectLog.cpp:474
CommandObjectLogEnable::DoExecute
bool DoExecute(Args &args, CommandReturnObject &result) override
Definition: CommandObjectLog.cpp:148
LLDB_LOG_OPTION_VERBOSE
#define LLDB_LOG_OPTION_VERBOSE
Definition: Log.h:36
lldb::eReturnStatusSuccessFinishNoResult
@ eReturnStatusSuccessFinishNoResult
Definition: lldb-enumerations.h:260
LLDB_LOG_OPTION_PREPEND_PROC_AND_THREAD
#define LLDB_LOG_OPTION_PREPEND_PROC_AND_THREAD
Definition: Log.h:39
lldb_private::FileSpec
Definition: FileSpec.h:56
lldb_private::CommandObjectMultiword
Definition: CommandObjectMultiword.h:19
error
static llvm::raw_ostream & error(Stream &strm)
Definition: CommandReturnObject.cpp:17
Options.h
lldb_private::Options
Definition: Options.h:57
CommandObjectLogTimerIncrement
Definition: CommandObjectLog.cpp:417
lldb::eArgTypeCount
@ eArgTypeCount
Definition: lldb-enumerations.h:528
Log.h
Args.h
CommandObjectLogTimerIncrement::DoExecute
bool DoExecute(Args &args, CommandReturnObject &result) override
Definition: CommandObjectLog.cpp:449
lldb_private::CommandObjectMultiword::LoadSubCommand
bool LoadSubCommand(llvm::StringRef cmd_name, const lldb::CommandObjectSP &command_obj) override
Definition: CommandObjectMultiword.cpp:80
lldb_private::CommandReturnObject::SetStatus
void SetStatus(lldb::ReturnStatus status)
Definition: CommandReturnObject.cpp:127
lldb_private::CommandReturnObject::GetOutputStream
Stream & GetOutputStream()
Definition: CommandReturnObject.h:46
CommandObjectLogList::HandleArgumentCompletion
void HandleArgumentCompletion(CompletionRequest &request, OptionElementVector &opt_element_vector) override
The input array contains a parsed version of the line.
Definition: CommandObjectLog.cpp:272
lldb_private::Args::entries
llvm::ArrayRef< ArgEntry > entries() const
Definition: Args.h:130
Timer.h
lldb_private::CommandInterpreter
Definition: CommandInterpreter.h:214
lldb_private::eArgRepeatStar
@ eArgRepeatStar
Definition: lldb-private-enumerations.h:98
CommandObjectLogTimer
Definition: CommandObjectLog.cpp:472
lldb::eReturnStatusFailed
@ eReturnStatusFailed
Definition: lldb-enumerations.h:265
CommandObjectLogTimerDump
Definition: CommandObjectLog.cpp:372
CommandObjectLogTimerDisable::DoExecute
bool DoExecute(Args &args, CommandReturnObject &result) override
Definition: CommandObjectLog.cpp:359
CommandObjectLogEnable::m_options
CommandOptions m_options
Definition: CommandObjectLog.cpp:179
CommandObjectLogEnable::CommandOptions::log_file
FileSpec log_file
Definition: CommandObjectLog.cpp:137
lldb_private::CommandObject::CommandArgumentData::arg_type
lldb::CommandArgumentType arg_type
Definition: CommandObject.h:91
lldb_private::OptionElementVector
std::vector< OptionArgElement > OptionElementVector
Definition: Options.h:42
lldb_private::CommandReturnObject::GetErrorStream
Stream & GetErrorStream()
Definition: CommandReturnObject.h:56
string
string(SUBSTRING ${p} 10 -1 pStripped) if($
Definition: Plugins/CMakeLists.txt:40
CommandObjectLogDisable::DoExecute
bool DoExecute(Args &args, CommandReturnObject &result) override
Definition: CommandObjectLog.cpp:221
CommandObjectLogEnable::CommandOptions::SetOptionValue
Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_arg, ExecutionContext *execution_context) override
Set the value of an option.
Definition: CommandObjectLog.cpp:82
CommandObjectLogTimerDisable::CommandObjectLogTimerDisable
CommandObjectLogTimerDisable(CommandInterpreter &interpreter)
Definition: CommandObjectLog.cpp:351
LLDB_LOG_OPTION_PREPEND_TIMESTAMP
#define LLDB_LOG_OPTION_PREPEND_TIMESTAMP
Definition: Log.h:38
CommandObjectLogDisable::CommandObjectLogDisable
CommandObjectLogDisable(CommandInterpreter &interpreter)
Definition: CommandObjectLog.cpp:185
lldb_private::Status
Definition: Status.h:44
lldb_private::Args::GetArgumentAtIndex
const char * GetArgumentAtIndex(size_t idx) const
Gets the NULL terminated C string argument pointer for the argument at index idx.
Definition: Args.cpp:259
CommandObjectLogEnable::CommandObjectLogEnable
CommandObjectLogEnable(CommandInterpreter &interpreter)
Definition: CommandObjectLog.cpp:45
lldb_private::CommandReturnObject
Definition: CommandReturnObject.h:26
uint32_t
lldb::eReturnStatusSuccessFinishResult
@ eReturnStatusSuccessFinishResult
Definition: lldb-enumerations.h:261
LLDB_LOG_OPTION_PREPEND_SEQUENCE
#define LLDB_LOG_OPTION_PREPEND_SEQUENCE
Definition: Log.h:37
UINT32_MAX
#define UINT32_MAX
Definition: lldb-defines.h:19
lldb::eArgTypeBoolean
@ eArgTypeBoolean
Definition: lldb-enumerations.h:521
lldb::eArgTypeLogCategory
@ eArgTypeLogCategory
Definition: lldb-enumerations.h:548
lldb_private::CommandObjectLog::~CommandObjectLog
~CommandObjectLog() override
lldb_private::CommandReturnObject::AppendErrorWithFormat
void AppendErrorWithFormat(const char *format,...) __attribute__((format(printf
Definition: CommandReturnObject.cpp:46
OptionParser.h
lldb_private::CompletionRequest::GetCursorIndex
size_t GetCursorIndex() const
Definition: CompletionRequest.h:156
lldb_private
A class that represents a running process on the host machine.
Definition: SBCommandInterpreterRunOptions.h:16
CommandObjectLogEnable::GetOptions
Options * GetOptions() override
Definition: CommandObjectLog.cpp:74
CommandObjectLogList
Definition: CommandObjectLog.cpp:246
lldb_private::Args::GetArgumentArrayRef
llvm::ArrayRef< const char * > GetArgumentArrayRef() const
Gets the argument as an ArrayRef.
Definition: Args.h:171
LLDB_LOG_OPTION_THREADSAFE
#define LLDB_LOG_OPTION_THREADSAFE
Definition: Log.h:35
CommandObjectLogEnable::CommandOptions::OptionParsingStarting
void OptionParsingStarting(ExecutionContext *execution_context) override
Definition: CommandObjectLog.cpp:126
FileSpec.h
lldb_private::Args::empty
bool empty() const
Definition: Args.h:120
Stream.h
CommandObjectLog.h
lldb_private::CommandObject::CommandArgumentEntry
std::vector< CommandArgumentData > CommandArgumentEntry
Definition: CommandObject.h:105
PATH_MAX
#define PATH_MAX
Definition: windows/PosixApi.h:25
lldb_private::CommandReturnObject::AppendError
void void AppendError(llvm::StringRef in_string)
Definition: CommandReturnObject.cpp:100
LLDB_LOG_OPTION_PREPEND_FILE_FUNCTION
#define LLDB_LOG_OPTION_PREPEND_FILE_FUNCTION
Definition: Log.h:43
lldb_private::Args::GetArgumentCount
size_t GetArgumentCount() const
Gets the number of arguments left in this command object.
Definition: Args.h:118
lldb
Definition: SBAddress.h:15
CommandObjectLogTimerEnable
Definition: CommandObjectLog.cpp:298
CommandObjectLogList::DoExecute
bool DoExecute(Args &args, CommandReturnObject &result) override
Definition: CommandObjectLog.cpp:279
CommandObjectLogList::CommandObjectLogList
CommandObjectLogList(CommandInterpreter &interpreter)
Definition: CommandObjectLog.cpp:249
LLDB_LOG_OPTION_BACKTRACE
#define LLDB_LOG_OPTION_BACKTRACE
Definition: Log.h:41
CommandObjectLogTimerReset
Definition: CommandObjectLog.cpp:394
CommandObjectLogEnable
Definition: CommandObjectLog.cpp:42
lldb_private::CompletionRequest
Definition: CompletionRequest.h:100
CommandObjectLogTimerIncrement::CommandObjectLogTimerIncrement
CommandObjectLogTimerIncrement(CommandInterpreter &interpreter)
Definition: CommandObjectLog.cpp:420