LLDB  mainline
CommandInterpreter.h
Go to the documentation of this file.
1 //===-- CommandInterpreter.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_INTERPRETER_COMMANDINTERPRETER_H
10 #define LLDB_INTERPRETER_COMMANDINTERPRETER_H
11 
12 #include "lldb/Core/Debugger.h"
13 #include "lldb/Core/IOHandler.h"
18 #include "lldb/Utility/Args.h"
21 #include "lldb/Utility/Event.h"
22 #include "lldb/Utility/Log.h"
25 #include "lldb/lldb-forward.h"
26 #include "lldb/lldb-private.h"
27 
28 #include <mutex>
29 #include <stack>
30 
31 namespace lldb_private {
32 class CommandInterpreter;
33 
35 public:
36  CommandInterpreterRunResult() = default;
37 
38  uint32_t GetNumErrors() const { return m_num_errors; }
39 
41 
43  return m_result == result;
44  }
45 
46 protected:
48 
50 
52 
53 private:
54  int m_num_errors = 0;
57 };
58 
60 public:
61  /// Construct a CommandInterpreterRunOptions object. This class is used to
62  /// control all the instances where we run multiple commands, e.g.
63  /// HandleCommands, HandleCommandsFromFile, RunCommandInterpreter.
64  ///
65  /// The meanings of the options in this object are:
66  ///
67  /// \param[in] stop_on_continue
68  /// If \b true, execution will end on the first command that causes the
69  /// process in the execution context to continue. If \b false, we won't
70  /// check the execution status.
71  /// \param[in] stop_on_error
72  /// If \b true, execution will end on the first command that causes an
73  /// error.
74  /// \param[in] stop_on_crash
75  /// If \b true, when a command causes the target to run, and the end of the
76  /// run is a signal or exception, stop executing the commands.
77  /// \param[in] echo_commands
78  /// If \b true, echo the command before executing it. If \b false, execute
79  /// silently.
80  /// \param[in] echo_comments
81  /// If \b true, echo command even if it is a pure comment line. If
82  /// \b false, print no ouput in this case. This setting has an effect only
83  /// if echo_commands is \b true.
84  /// \param[in] print_results
85  /// If \b true and the command succeeds, print the results of the command
86  /// after executing it. If \b false, execute silently.
87  /// \param[in] print_errors
88  /// If \b true and the command fails, print the results of the command
89  /// after executing it. If \b false, execute silently.
90  /// \param[in] add_to_history
91  /// If \b true add the commands to the command history. If \b false, don't
92  /// add them.
94  LazyBool stop_on_error, LazyBool stop_on_crash,
95  LazyBool echo_commands, LazyBool echo_comments,
96  LazyBool print_results, LazyBool print_errors,
97  LazyBool add_to_history)
98  : m_stop_on_continue(stop_on_continue), m_stop_on_error(stop_on_error),
99  m_stop_on_crash(stop_on_crash), m_echo_commands(echo_commands),
100  m_echo_comment_commands(echo_comments), m_print_results(print_results),
101  m_print_errors(print_errors), m_add_to_history(add_to_history) {}
102 
103  CommandInterpreterRunOptions() = default;
104 
105  void SetSilent(bool silent) {
106  LazyBool value = silent ? eLazyBoolNo : eLazyBoolYes;
107 
108  m_print_results = value;
109  m_print_errors = value;
110  m_echo_commands = value;
111  m_echo_comment_commands = value;
112  m_add_to_history = value;
113  }
114  // These return the default behaviors if the behavior is not
115  // eLazyBoolCalculate. But I've also left the ivars public since for
116  // different ways of running the interpreter you might want to force
117  // different defaults... In that case, just grab the LazyBool ivars directly
118  // and do what you want with eLazyBoolCalculate.
120 
121  void SetStopOnContinue(bool stop_on_continue) {
122  m_stop_on_continue = stop_on_continue ? eLazyBoolYes : eLazyBoolNo;
123  }
124 
125  bool GetStopOnError() const { return DefaultToNo(m_stop_on_error); }
126 
127  void SetStopOnError(bool stop_on_error) {
128  m_stop_on_error = stop_on_error ? eLazyBoolYes : eLazyBoolNo;
129  }
130 
131  bool GetStopOnCrash() const { return DefaultToNo(m_stop_on_crash); }
132 
133  void SetStopOnCrash(bool stop_on_crash) {
134  m_stop_on_crash = stop_on_crash ? eLazyBoolYes : eLazyBoolNo;
135  }
136 
137  bool GetEchoCommands() const { return DefaultToYes(m_echo_commands); }
138 
139  void SetEchoCommands(bool echo_commands) {
140  m_echo_commands = echo_commands ? eLazyBoolYes : eLazyBoolNo;
141  }
142 
143  bool GetEchoCommentCommands() const {
145  }
146 
147  void SetEchoCommentCommands(bool echo_comments) {
149  }
150 
151  bool GetPrintResults() const { return DefaultToYes(m_print_results); }
152 
153  void SetPrintResults(bool print_results) {
154  m_print_results = print_results ? eLazyBoolYes : eLazyBoolNo;
155  }
156 
157  bool GetPrintErrors() const { return DefaultToYes(m_print_errors); }
158 
159  void SetPrintErrors(bool print_errors) {
160  m_print_errors = print_errors ? eLazyBoolYes : eLazyBoolNo;
161  }
162 
164 
165  void SetAddToHistory(bool add_to_history) {
166  m_add_to_history = add_to_history ? eLazyBoolYes : eLazyBoolNo;
167  }
168 
169  bool GetAutoHandleEvents() const {
171  }
172 
173  void SetAutoHandleEvents(bool auto_handle_events) {
174  m_auto_handle_events = auto_handle_events ? eLazyBoolYes : eLazyBoolNo;
175  }
176 
177  bool GetSpawnThread() const { return DefaultToNo(m_spawn_thread); }
178 
179  void SetSpawnThread(bool spawn_thread) {
180  m_spawn_thread = spawn_thread ? eLazyBoolYes : eLazyBoolNo;
181  }
182 
193 
194 private:
195  static bool DefaultToYes(LazyBool flag) {
196  switch (flag) {
197  case eLazyBoolNo:
198  return false;
199  default:
200  return true;
201  }
202  }
203 
204  static bool DefaultToNo(LazyBool flag) {
205  switch (flag) {
206  case eLazyBoolYes:
207  return true;
208  default:
209  return false;
210  }
211  }
212 };
213 
215  public Properties,
216  public IOHandlerDelegate {
217 public:
218  enum {
221  eBroadcastBitQuitCommandReceived = (1 << 2), // User entered quit
224  };
225 
226  /// Tristate boolean to manage children omission warnings.
228  eNoOmission = 0, ///< No children were omitted.
229  eUnwarnedOmission = 1, ///< Children omitted, and not yet notified.
230  eWarnedOmission = 2 ///< Children omitted and notified.
231  };
232 
234  eCommandTypesBuiltin = 0x0001, //< native commands such as "frame"
235  eCommandTypesUserDef = 0x0002, //< scripted commands
236  eCommandTypesUserMW = 0x0004, //< multiword commands (command containers)
237  eCommandTypesAliases = 0x0008, //< aliases such as "po"
238  eCommandTypesHidden = 0x0010, //< commands prefixed with an underscore
239  eCommandTypesAllThem = 0xFFFF //< all commands
240  };
241 
242  // The CommandAlias and CommandInterpreter both have a hand in
243  // substituting for alias commands. They work by writing special tokens
244  // in the template form of the Alias command, and then detecting them when the
245  // command is executed. These are the special tokens:
246  static const char *g_no_argument;
247  static const char *g_need_argument;
248  static const char *g_argument;
249 
250  CommandInterpreter(Debugger &debugger, bool synchronous_execution);
251 
252  ~CommandInterpreter() override = default;
253 
254  // These two functions fill out the Broadcaster interface:
255 
257 
258  ConstString &GetBroadcasterClass() const override {
259  return GetStaticBroadcasterClass();
260  }
261 
263  void SourceInitFileHome(CommandReturnObject &result, bool is_repl);
265 
266  bool AddCommand(llvm::StringRef name, const lldb::CommandObjectSP &cmd_sp,
267  bool can_replace);
268 
269  Status AddUserCommand(llvm::StringRef name,
270  const lldb::CommandObjectSP &cmd_sp, bool can_replace);
271 
272  lldb::CommandObjectSP GetCommandSPExact(llvm::StringRef cmd,
273  bool include_aliases = false) const;
274 
275  CommandObject *GetCommandObject(llvm::StringRef cmd,
276  StringList *matches = nullptr,
277  StringList *descriptions = nullptr) const;
278 
279  CommandObject *GetUserCommandObject(llvm::StringRef cmd,
280  StringList *matches = nullptr,
281  StringList *descriptions = nullptr) const;
282 
283  /// Determine whether a root level, built-in command with this name exists.
284  bool CommandExists(llvm::StringRef cmd) const;
285 
286  /// Determine whether an alias command with this name exists
287  bool AliasExists(llvm::StringRef cmd) const;
288 
289  /// Determine whether a root-level user command with this name exists.
290  bool UserCommandExists(llvm::StringRef cmd) const;
291 
292  /// Determine whether a root-level user multiword command with this name
293  /// exists.
294  bool UserMultiwordCommandExists(llvm::StringRef cmd) const;
295 
296  /// Look up the command pointed to by path encoded in the arguments of
297  /// the incoming command object. If all the path components exist
298  /// and are all actual commands - not aliases, and the leaf command is a
299  /// multiword command, return the command. Otherwise return nullptr, and put
300  /// a useful diagnostic in the Status object.
301  ///
302  /// \param[in] path
303  /// An Args object holding the path in its arguments
304  /// \param[in] leaf_is_command
305  /// If true, return the container of the leaf name rather than looking up
306  /// the whole path as a leaf command. The leaf needn't exist in this case.
307  /// \param[in,out] result
308  /// If the path is not found, this error shows where we got off track.
309  /// \return
310  /// If found, a pointer to the CommandObjectMultiword pointed to by path,
311  /// or to the container of the leaf element is is_leaf_command.
312  /// Returns nullptr under two circumstances:
313  /// 1) The command in not found (check error.Fail)
314  /// 2) is_leaf is true and the path has only a leaf. We don't have a
315  /// dummy "contains everything MWC, so we return null here, but
316  /// in this case error.Success is true.
317 
319  bool leaf_is_command,
320  Status &result);
321 
322  CommandAlias *AddAlias(llvm::StringRef alias_name,
323  lldb::CommandObjectSP &command_obj_sp,
324  llvm::StringRef args_string = llvm::StringRef());
325 
326  // Remove a command if it is removable (python or regex command)
327  bool RemoveCommand(llvm::StringRef cmd);
328 
329  bool RemoveAlias(llvm::StringRef alias_name);
330 
331  bool GetAliasFullName(llvm::StringRef cmd, std::string &full_name) const;
332 
333  bool RemoveUserMultiword(llvm::StringRef multiword_name);
334 
335  // Do we want to allow top-level user multiword commands to be deleted?
337 
338  bool RemoveUser(llvm::StringRef alias_name);
339 
340  void RemoveAllUser() { m_user_dict.clear(); }
341 
342  const CommandAlias *GetAlias(llvm::StringRef alias_name) const;
343 
344  CommandObject *BuildAliasResult(llvm::StringRef alias_name,
345  std::string &raw_input_string,
346  std::string &alias_result,
347  CommandReturnObject &result);
348 
349  bool HandleCommand(const char *command_line, LazyBool add_to_history,
350  const ExecutionContext &override_context,
351  CommandReturnObject &result);
352 
353  bool HandleCommand(const char *command_line, LazyBool add_to_history,
354  CommandReturnObject &result);
355 
356  bool WasInterrupted() const;
357 
358  /// Execute a list of commands in sequence.
359  ///
360  /// \param[in] commands
361  /// The list of commands to execute.
362  /// \param[in,out] context
363  /// The execution context in which to run the commands.
364  /// \param[in] options
365  /// This object holds the options used to control when to stop, whether to
366  /// execute commands,
367  /// etc.
368  /// \param[out] result
369  /// This is marked as succeeding with no output if all commands execute
370  /// safely,
371  /// and failed with some explanation if we aborted executing the commands
372  /// at some point.
373  void HandleCommands(const StringList &commands,
374  const ExecutionContext &context,
375  const CommandInterpreterRunOptions &options,
376  CommandReturnObject &result);
377 
378  void HandleCommands(const StringList &commands,
379  const CommandInterpreterRunOptions &options,
380  CommandReturnObject &result);
381 
382  /// Execute a list of commands from a file.
383  ///
384  /// \param[in] file
385  /// The file from which to read in commands.
386  /// \param[in,out] context
387  /// The execution context in which to run the commands.
388  /// \param[in] options
389  /// This object holds the options used to control when to stop, whether to
390  /// execute commands,
391  /// etc.
392  /// \param[out] result
393  /// This is marked as succeeding with no output if all commands execute
394  /// safely,
395  /// and failed with some explanation if we aborted executing the commands
396  /// at some point.
397  void HandleCommandsFromFile(FileSpec &file, const ExecutionContext &context,
398  const CommandInterpreterRunOptions &options,
399  CommandReturnObject &result);
400 
401  void HandleCommandsFromFile(FileSpec &file,
402  const CommandInterpreterRunOptions &options,
403  CommandReturnObject &result);
404 
405  CommandObject *GetCommandObjectForCommand(llvm::StringRef &command_line);
406 
407  /// Returns the auto-suggestion string that should be added to the given
408  /// command line.
409  llvm::Optional<std::string> GetAutoSuggestionForCommand(llvm::StringRef line);
410 
411  // This handles command line completion.
412  void HandleCompletion(CompletionRequest &request);
413 
414  // This version just returns matches, and doesn't compute the substring. It
415  // is here so the Help command can call it for the first argument.
417 
418  int GetCommandNamesMatchingPartialString(const char *cmd_cstr,
419  bool include_aliases,
420  StringList &matches,
421  StringList &descriptions);
422 
423  void GetHelp(CommandReturnObject &result,
425 
426  void GetAliasHelp(const char *alias_name, StreamString &help_string);
427 
428  void OutputFormattedHelpText(Stream &strm, llvm::StringRef prefix,
429  llvm::StringRef help_text);
430 
431  void OutputFormattedHelpText(Stream &stream, llvm::StringRef command_word,
432  llvm::StringRef separator,
433  llvm::StringRef help_text, size_t max_word_len);
434 
435  // this mimics OutputFormattedHelpText but it does perform a much simpler
436  // formatting, basically ensuring line alignment. This is only good if you
437  // have some complicated layout for your help text and want as little help as
438  // reasonable in properly displaying it. Most of the times, you simply want
439  // to type some text and have it printed in a reasonable way on screen. If
440  // so, use OutputFormattedHelpText
441  void OutputHelpText(Stream &stream, llvm::StringRef command_word,
442  llvm::StringRef separator, llvm::StringRef help_text,
443  uint32_t max_word_len);
444 
446 
448 
449  lldb::PlatformSP GetPlatform(bool prefer_target_platform);
450 
451  const char *ProcessEmbeddedScriptCommands(const char *arg);
452 
453  void UpdatePrompt(llvm::StringRef prompt);
454 
455  bool Confirm(llvm::StringRef message, bool default_answer);
456 
457  void LoadCommandDictionary();
458 
459  void Initialize();
460 
461  void Clear();
462 
463  bool HasCommands() const;
464 
465  bool HasAliases() const;
466 
467  bool HasUserCommands() const;
468 
469  bool HasUserMultiwordCommands() const;
470 
471  bool HasAliasOptions() const;
472 
473  void BuildAliasCommandArgs(CommandObject *alias_cmd_obj,
474  const char *alias_name, Args &cmd_args,
475  std::string &raw_input_string,
476  CommandReturnObject &result);
477 
478  /// Picks the number out of a string of the form "%NNN", otherwise return 0.
479  int GetOptionArgumentPosition(const char *in_string);
480 
481  void SkipLLDBInitFiles(bool skip_lldbinit_files) {
482  m_skip_lldbinit_files = skip_lldbinit_files;
483  }
484 
485  void SkipAppInitFiles(bool skip_app_init_files) {
486  m_skip_app_init_files = skip_app_init_files;
487  }
488 
489  bool GetSynchronous();
490 
491  void FindCommandsForApropos(llvm::StringRef word, StringList &commands_found,
492  StringList &commands_help,
493  bool search_builtin_commands,
494  bool search_user_commands,
495  bool search_alias_commands,
496  bool search_user_mw_commands);
497 
499 
500  bool SetBatchCommandMode(bool value) {
501  const bool old_value = m_batch_command_mode;
502  m_batch_command_mode = value;
503  return old_value;
504  }
505 
509  }
510 
514  }
515 
516  void PrintWarningsIfNecessary(Stream &s, const std::string &cmd_name) {
518  s.Printf("*** Some of the displayed variables have more members than the "
519  "debugger will show by default. To show all of them, you can "
520  "either use the --show-all-children option to %s or raise the "
521  "limit by changing the target.max-children-count setting.\n",
522  cmd_name.c_str());
524  }
525 
527  s.Printf("*** Some of the displayed variables have a greater depth of "
528  "members than the debugger will show by default. To increase "
529  "the limit, use the --depth option to %s, or raise the limit by "
530  "changing the target.max-children-depth setting.\n",
531  cmd_name.c_str());
533  }
534  }
535 
537 
538  bool IsActive();
539 
542 
543  void GetLLDBCommandsFromIOHandler(const char *prompt,
544  IOHandlerDelegate &delegate,
545  void *baton = nullptr);
546 
547  void GetPythonCommandsFromIOHandler(const char *prompt,
548  IOHandlerDelegate &delegate,
549  void *baton = nullptr);
550 
551  const char *GetCommandPrefix();
552 
553  // Properties
554  bool GetExpandRegexAliases() const;
555 
556  bool GetPromptOnQuit() const;
557  void SetPromptOnQuit(bool enable);
558 
559  bool GetSaveSessionOnQuit() const;
560  void SetSaveSessionOnQuit(bool enable);
561 
563  void SetSaveSessionDirectory(llvm::StringRef path);
564 
565  bool GetEchoCommands() const;
566  void SetEchoCommands(bool enable);
567 
568  bool GetEchoCommentCommands() const;
569  void SetEchoCommentCommands(bool enable);
570 
571  bool GetRepeatPreviousCommand() const;
572 
573  bool GetRequireCommandOverwrite() const;
574 
576  return m_user_dict;
577  }
578 
580  return m_user_mw_dict;
581  }
582 
584  return m_command_dict;
585  }
586 
588 
589  /// Specify if the command interpreter should allow that the user can
590  /// specify a custom exit code when calling 'quit'.
591  void AllowExitCodeOnQuit(bool allow);
592 
593  /// Sets the exit code for the quit command.
594  /// \param[in] exit_code
595  /// The exit code that the driver should return on exit.
596  /// \return True if the exit code was successfully set; false if the
597  /// interpreter doesn't allow custom exit codes.
598  /// \see AllowExitCodeOnQuit
599  [[nodiscard]] bool SetQuitExitCode(int exit_code);
600 
601  /// Returns the exit code that the user has specified when running the
602  /// 'quit' command.
603  /// \param[out] exited
604  /// Set to true if the user has called quit with a custom exit code.
605  int GetQuitExitCode(bool &exited) const;
606 
607  void ResolveCommand(const char *command_line, CommandReturnObject &result);
608 
609  bool GetStopCmdSourceOnError() const;
610 
611  lldb::IOHandlerSP
612  GetIOHandler(bool force_create = false,
613  CommandInterpreterRunOptions *options = nullptr);
614 
615  bool GetSpaceReplPrompts() const;
616 
617  /// Save the current debugger session transcript to a file on disk.
618  /// \param output_file
619  /// The file path to which the session transcript will be written. Since
620  /// the argument is optional, an arbitrary temporary file will be create
621  /// when no argument is passed.
622  /// \param result
623  /// This is used to pass function output and error messages.
624  /// \return \b true if the session transcript was successfully written to
625  /// disk, \b false otherwise.
626  bool SaveTranscript(CommandReturnObject &result,
627  llvm::Optional<std::string> output_file = llvm::None);
628 
630 
631  bool IsInteractive();
632 
633  bool IOHandlerInterrupt(IOHandler &io_handler) override;
634 
635 protected:
636  friend class Debugger;
637 
638  // IOHandlerDelegate functions
639  void IOHandlerInputComplete(IOHandler &io_handler,
640  std::string &line) override;
641 
643  if (ch == 'd')
644  return ConstString("quit\n");
645  return ConstString();
646  }
647 
648  void GetProcessOutput();
649 
650  bool DidProcessStopAbnormally() const;
651 
652  void SetSynchronous(bool value);
653 
654  lldb::CommandObjectSP GetCommandSP(llvm::StringRef cmd,
655  bool include_aliases = true,
656  bool exact = true,
657  StringList *matches = nullptr,
658  StringList *descriptions = nullptr) const;
659 
660 private:
661  void OverrideExecutionContext(const ExecutionContext &override_context);
662 
664 
666 
667  void SourceInitFile(FileSpec file, CommandReturnObject &result);
668 
669  // Completely resolves aliases and abbreviations, returning a pointer to the
670  // final command object and updating command_line to the fully substituted
671  // and translated command.
673  CommandReturnObject &result);
674 
675  void FindCommandsForApropos(llvm::StringRef word, StringList &commands_found,
676  StringList &commands_help,
677  const CommandObject::CommandMap &command_map);
678 
679  // An interruptible wrapper around the stream output
680  void PrintCommandOutput(IOHandler &io_handler, llvm::StringRef str,
681  bool is_stdout);
682 
683  bool EchoCommandNonInteractive(llvm::StringRef line,
684  const Flags &io_handler_flags) const;
685 
686  // A very simple state machine which models the command handling transitions
687  enum class CommandHandlingState {
688  eIdle,
689  eInProgress,
690  eInterrupted,
691  };
692 
693  std::atomic<CommandHandlingState> m_command_state{
695 
697 
698  void StartHandlingCommand();
699  void FinishHandlingCommand();
700  bool InterruptCommand();
701 
702  Debugger &m_debugger; // The debugger session that this interpreter is
703  // associated with
704  // Execution contexts that were temporarily set by some of HandleCommand*
705  // overloads.
706  std::stack<ExecutionContext> m_overriden_exe_contexts;
710  CommandObject::CommandMap m_command_dict; // Stores basic built-in commands
711  // (they cannot be deleted, removed
712  // or overwritten).
714  m_alias_dict; // Stores user aliases/abbreviations for commands
715  CommandObject::CommandMap m_user_dict; // Stores user-defined commands
717  m_user_mw_dict; // Stores user-defined multiword commands
719  std::string m_repeat_command; // Stores the command that will be executed for
720  // an empty command string.
721  lldb::IOHandlerSP m_command_io_handler_sp;
724  /// Whether we truncated a value's list of children and whether the user has
725  /// been told.
727  /// Whether we reached the maximum child nesting depth and whether the user
728  /// has been told.
730 
731  // FIXME: Stop using this to control adding to the history and then replace
732  // this with m_command_source_dirs.size().
734  /// A stack of directory paths. When not empty, the last one is the directory
735  /// of the file that's currently sourced.
736  std::vector<FileSpec> m_command_source_dirs;
737  std::vector<uint32_t> m_command_source_flags;
739 
740  // The exit code the user has requested when calling the 'quit' command.
741  // No value means the user hasn't set a custom exit code so far.
742  llvm::Optional<int> m_quit_exit_code;
743  // If the driver is accepts custom exit codes for the 'quit' command.
744  bool m_allow_exit_code = false;
745 
747 };
748 
749 } // namespace lldb_private
750 
751 #endif // LLDB_INTERPRETER_COMMANDINTERPRETER_H
lldb_private::CommandInterpreter::GetPromptOnQuit
bool GetPromptOnQuit() const
Definition: CommandInterpreter.cpp:150
CommandAlias.h
lldb_private::CommandInterpreter::VerifyUserMultiwordCmdPath
CommandObjectMultiword * VerifyUserMultiwordCmdPath(Args &path, bool leaf_is_command, Status &result)
Look up the command pointed to by path encoded in the arguments of the incoming command object.
lldb_private::CommandInterpreter::eCommandTypesUserDef
@ eCommandTypesUserDef
Definition: CommandInterpreter.h:235
lldb_private::ExecutionContext
Definition: ExecutionContext.h:292
lldb_private::CommandInterpreter::IOHandlerInputComplete
void IOHandlerInputComplete(IOHandler &io_handler, std::string &line) override
Called when a line or lines have been retrieved.
lldb_private::CommandInterpreter::m_comment_char
char m_comment_char
Definition: CommandInterpreter.h:722
lldb_private::CommandInterpreterRunResult::SetResult
void SetResult(lldb::CommandInterpreterResult result)
Definition: CommandInterpreter.h:51
lldb_private::CommandInterpreter::SetSaveSessionDirectory
void SetSaveSessionDirectory(llvm::StringRef path)
Definition: CommandInterpreter.cpp:177
lldb_private::CommandInterpreter::m_truncation_warning
ChildrenOmissionWarningStatus m_truncation_warning
Whether we truncated a value's list of children and whether the user has been told.
Definition: CommandInterpreter.h:726
lldb_private::CommandInterpreterRunOptions::m_spawn_thread
LazyBool m_spawn_thread
Definition: CommandInterpreter.h:192
lldb_private::CommandInterpreter::RestoreExecutionContext
void RestoreExecutionContext()
lldb_private::CommandInterpreter::SourceInitFileGlobal
void SourceInitFileGlobal(CommandReturnObject &result)
lldb_private::CommandInterpreter::SkipAppInitFiles
void SkipAppInitFiles(bool skip_app_init_files)
Definition: CommandInterpreter.h:485
lldb_private::CommandInterpreter::m_alias_dict
CommandObject::CommandMap m_alias_dict
Definition: CommandInterpreter.h:714
IOHandler.h
lldb_private::CommandInterpreter::GetCommandObjectForCommand
CommandObject * GetCommandObjectForCommand(llvm::StringRef &command_line)
lldb_private::CommandInterpreter::SourceInitFile
void SourceInitFile(FileSpec file, CommandReturnObject &result)
lldb_private::CommandInterpreter::m_debugger
Debugger & m_debugger
Definition: CommandInterpreter.h:702
lldb_private::CommandInterpreter::GetCommandPrefix
const char * GetCommandPrefix()
lldb_private::CommandInterpreter::HandleCommand
bool HandleCommand(const char *command_line, LazyBool add_to_history, const ExecutionContext &override_context, CommandReturnObject &result)
lldb_private::CommandInterpreter::RemoveAlias
bool RemoveAlias(llvm::StringRef alias_name)
lldb_private::CommandInterpreter::m_user_dict
CommandObject::CommandMap m_user_dict
Definition: CommandInterpreter.h:715
lldb_private::CommandInterpreter::GetSynchronous
bool GetSynchronous()
lldb_private::CommandInterpreterRunOptions::GetAutoHandleEvents
bool GetAutoHandleEvents() const
Definition: CommandInterpreter.h:169
lldb_private::CommandInterpreter::GetOptionArgumentPosition
int GetOptionArgumentPosition(const char *in_string)
Picks the number out of a string of the form "%NNN", otherwise return 0.
lldb_private::CommandInterpreter::GetProcessOutput
void GetProcessOutput()
lldb_private::CommandInterpreter::GetAliases
const CommandObject::CommandMap & GetAliases() const
Definition: CommandInterpreter.h:587
lldb_private::CommandInterpreter::IsInteractive
bool IsInteractive()
lldb_private::CommandInterpreter::GetHelp
void GetHelp(CommandReturnObject &result, uint32_t types=eCommandTypesAllThem)
lldb_private::CommandInterpreterRunOptions::SetSpawnThread
void SetSpawnThread(bool spawn_thread)
Definition: CommandInterpreter.h:179
lldb_private::CommandInterpreter::m_command_io_handler_sp
lldb::IOHandlerSP m_command_io_handler_sp
Definition: CommandInterpreter.h:721
lldb_private::CommandInterpreter::eBroadcastBitResetPrompt
@ eBroadcastBitResetPrompt
Definition: CommandInterpreter.h:220
lldb_private::CommandInterpreter::CommandInterpreter
CommandInterpreter(Debugger &debugger, bool synchronous_execution)
Definition: CommandInterpreter.cpp:124
lldb_private::CommandInterpreterRunOptions::m_stop_on_continue
LazyBool m_stop_on_continue
Definition: CommandInterpreter.h:183
lldb_private::CommandInterpreter::GetAliasFullName
bool GetAliasFullName(llvm::StringRef cmd, std::string &full_name) const
lldb_private::CommandInterpreter::SetEchoCommands
void SetEchoCommands(bool enable)
Definition: CommandInterpreter.cpp:188
lldb_private::CommandInterpreter::eBroadcastBitThreadShouldExit
@ eBroadcastBitThreadShouldExit
Definition: CommandInterpreter.h:219
lldb_private::eLazyBoolYes
@ eLazyBoolYes
Definition: lldb-private-enumerations.h:115
lldb_private::CommandInterpreter::CommandHandlingState::eInterrupted
@ eInterrupted
lldb_private::CommandInterpreterRunResult
Definition: CommandInterpreter.h:34
lldb_private::CommandInterpreterRunOptions::CommandInterpreterRunOptions
CommandInterpreterRunOptions(LazyBool stop_on_continue, LazyBool stop_on_error, LazyBool stop_on_crash, LazyBool echo_commands, LazyBool echo_comments, LazyBool print_results, LazyBool print_errors, LazyBool add_to_history)
Construct a CommandInterpreterRunOptions object.
Definition: CommandInterpreter.h:93
lldb_private::CommandInterpreter::HasCommands
bool HasCommands() const
lldb_private::CommandInterpreterRunOptions::GetStopOnError
bool GetStopOnError() const
Definition: CommandInterpreter.h:125
lldb_private::CommandInterpreterRunOptions::SetAddToHistory
void SetAddToHistory(bool add_to_history)
Definition: CommandInterpreter.h:165
lldb_private::CommandInterpreter::m_iohandler_nesting_level
int m_iohandler_nesting_level
Definition: CommandInterpreter.h:696
lldb_private::CommandInterpreterRunResult::CommandInterpreterRunResult
CommandInterpreterRunResult()=default
lldb_private::CommandInterpreterRunOptions::GetAddToHistory
bool GetAddToHistory() const
Definition: CommandInterpreter.h:163
lldb_private::CommandInterpreter::RemoveUser
bool RemoveUser(llvm::StringRef alias_name)
lldb_private::Flags
Definition: Flags.h:22
lldb_private::CommandInterpreter::GetCommandObject
CommandObject * GetCommandObject(llvm::StringRef cmd, StringList *matches=nullptr, StringList *descriptions=nullptr) const
lldb_private::CommandInterpreter::eCommandTypesAllThem
@ eCommandTypesAllThem
Definition: CommandInterpreter.h:239
lldb_private::CommandInterpreter::eBroadcastBitAsynchronousOutputData
@ eBroadcastBitAsynchronousOutputData
Definition: CommandInterpreter.h:222
lldb_private::CommandInterpreter::GetLLDBCommandsFromIOHandler
void GetLLDBCommandsFromIOHandler(const char *prompt, IOHandlerDelegate &delegate, void *baton=nullptr)
lldb_private::CommandInterpreter::OutputHelpText
void OutputHelpText(Stream &stream, llvm::StringRef command_word, llvm::StringRef separator, llvm::StringRef help_text, uint32_t max_word_len)
lldb_private::CommandInterpreter::g_argument
static const char * g_argument
Definition: CommandInterpreter.h:248
lldb_private::CommandInterpreter::GetPlatform
lldb::PlatformSP GetPlatform(bool prefer_target_platform)
lldb_private::CommandInterpreter::eBroadcastBitQuitCommandReceived
@ eBroadcastBitQuitCommandReceived
Definition: CommandInterpreter.h:221
lldb_private::CommandInterpreter::eCommandTypesAliases
@ eCommandTypesAliases
Definition: CommandInterpreter.h:237
lldb_private::CommandInterpreter::AddCommand
bool AddCommand(llvm::StringRef name, const lldb::CommandObjectSP &cmd_sp, bool can_replace)
lldb_private::CommandInterpreter::m_skip_app_init_files
bool m_skip_app_init_files
Definition: CommandInterpreter.h:709
lldb_private::CommandInterpreter::m_synchronous_execution
bool m_synchronous_execution
Definition: CommandInterpreter.h:707
lldb_private::CommandInterpreter::GetStaticBroadcasterClass
static ConstString & GetStaticBroadcasterClass()
Definition: CommandInterpreter.cpp:119
lldb_private::CommandInterpreterRunOptions::m_echo_comment_commands
LazyBool m_echo_comment_commands
Definition: CommandInterpreter.h:187
lldb_private::Stream
Definition: Stream.h:28
lldb_private::CommandInterpreterRunOptions::DefaultToYes
static bool DefaultToYes(LazyBool flag)
Definition: CommandInterpreter.h:195
lldb_private::Args
Definition: Args.h:33
lldb_private::CommandHistory
Definition: CommandHistory.h:21
lldb_private::CommandInterpreter::GetIOHandler
lldb::IOHandlerSP GetIOHandler(bool force_create=false, CommandInterpreterRunOptions *options=nullptr)
lldb_private::CommandInterpreter::GetStopCmdSourceOnError
bool GetStopCmdSourceOnError() const
Definition: CommandInterpreter.cpp:233
lldb_private::CommandInterpreter::OverrideExecutionContext
void OverrideExecutionContext(const ExecutionContext &override_context)
lldb_private::LazyBool
LazyBool
Definition: lldb-private-enumerations.h:115
lldb::eCommandInterpreterResultSuccess
@ eCommandInterpreterResultSuccess
Command interpreter finished successfully.
Definition: lldb-enumerations.h:1150
lldb_private::CommandInterpreterRunOptions::m_stop_on_error
LazyBool m_stop_on_error
Definition: CommandInterpreter.h:184
lldb_private::CommandInterpreter::GetPythonCommandsFromIOHandler
void GetPythonCommandsFromIOHandler(const char *prompt, IOHandlerDelegate &delegate, void *baton=nullptr)
lldb_private::CommandInterpreter::ProcessEmbeddedScriptCommands
const char * ProcessEmbeddedScriptCommands(const char *arg)
Definition: CommandInterpreter.cpp:499
lldb_private::CommandInterpreter::SetPromptOnQuit
void SetPromptOnQuit(bool enable)
Definition: CommandInterpreter.cpp:156
Debugger.h
lldb_private::CommandInterpreterRunOptions
Definition: CommandInterpreter.h:59
CompletionRequest.h
lldb_private::CommandInterpreter::m_command_source_flags
std::vector< uint32_t > m_command_source_flags
Definition: CommandInterpreter.h:737
lldb_private::CommandInterpreter::RemoveUserMultiword
bool RemoveUserMultiword(llvm::StringRef multiword_name)
lldb_private::CommandInterpreterRunOptions::m_auto_handle_events
LazyBool m_auto_handle_events
Definition: CommandInterpreter.h:191
lldb_private::CommandInterpreter::RunCommandInterpreter
CommandInterpreterRunResult RunCommandInterpreter(CommandInterpreterRunOptions &options)
lldb_private::CommandInterpreter::GetSaveSessionDirectory
FileSpec GetSaveSessionDirectory() const
Definition: CommandInterpreter.cpp:172
lldb_private::CommandInterpreter::AllowExitCodeOnQuit
void AllowExitCodeOnQuit(bool allow)
Specify if the command interpreter should allow that the user can specify a custom exit code when cal...
Definition: CommandInterpreter.cpp:204
lldb_private::CommandInterpreter::CommandHandlingState
CommandHandlingState
Definition: CommandInterpreter.h:687
lldb_private::CommandInterpreter::GetSpaceReplPrompts
bool GetSpaceReplPrompts() const
Definition: CommandInterpreter.cpp:239
Broadcaster.h
lldb_private::CommandInterpreter::CommandHandlingState::eIdle
@ eIdle
lldb_private::Properties
Definition: UserSettingsController.h:33
lldb_private::FileSpec
Definition: FileSpec.h:55
lldb_private::CommandObjectMultiword
Definition: CommandObjectMultiword.h:19
lldb_private::CommandInterpreter::GetUserCommandObject
CommandObject * GetUserCommandObject(llvm::StringRef cmd, StringList *matches=nullptr, StringList *descriptions=nullptr) const
lldb_private::CommandInterpreterRunOptions::SetEchoCommands
void SetEchoCommands(bool echo_commands)
Definition: CommandInterpreter.h:139
lldb_private::CommandInterpreter::eNoOmission
@ eNoOmission
No children were omitted.
Definition: CommandInterpreter.h:228
lldb_private::CommandInterpreter::GetBatchCommandMode
bool GetBatchCommandMode()
Definition: CommandInterpreter.h:498
lldb_private::CommandInterpreter::HandleCompletion
void HandleCompletion(CompletionRequest &request)
lldb_private::CommandInterpreter::InterruptCommand
bool InterruptCommand()
lldb_private::CommandInterpreter::GetUserCommands
const CommandObject::CommandMap & GetUserCommands() const
Definition: CommandInterpreter.h:575
lldb_private::CommandInterpreter::RemoveCommand
bool RemoveCommand(llvm::StringRef cmd)
Log.h
Args.h
lldb_private::CommandInterpreter::IOHandlerInterrupt
bool IOHandlerInterrupt(IOHandler &io_handler) override
lldb_private::CommandInterpreter::AddAlias
CommandAlias * AddAlias(llvm::StringRef alias_name, lldb::CommandObjectSP &command_obj_sp, llvm::StringRef args_string=llvm::StringRef())
lldb_private::CommandInterpreterRunOptions::SetStopOnContinue
void SetStopOnContinue(bool stop_on_continue)
Definition: CommandInterpreter.h:121
lldb_private::CommandInterpreter::m_command_history
CommandHistory m_command_history
Definition: CommandInterpreter.h:718
lldb_private::CommandInterpreterRunOptions::SetStopOnCrash
void SetStopOnCrash(bool stop_on_crash)
Definition: CommandInterpreter.h:133
lldb_private::CommandInterpreter::SetQuitExitCode
bool SetQuitExitCode(int exit_code)
Sets the exit code for the quit command.
Definition: CommandInterpreter.cpp:210
lldb_private::CommandInterpreter::Confirm
bool Confirm(llvm::StringRef message, bool default_answer)
lldb_private::CommandInterpreter::GetQuitExitCode
int GetQuitExitCode(bool &exited) const
Returns the exit code that the user has specified when running the 'quit' command.
Definition: CommandInterpreter.cpp:217
lldb_private::CommandInterpreter::GetCommands
const CommandObject::CommandMap & GetCommands() const
Definition: CommandInterpreter.h:583
lldb_private::CommandInterpreterRunOptions::GetStopOnContinue
bool GetStopOnContinue() const
Definition: CommandInterpreter.h:119
StreamString.h
lldb_private::CommandInterpreter::PrintCommandOutput
void PrintCommandOutput(IOHandler &io_handler, llvm::StringRef str, bool is_stdout)
lldb_private::CommandInterpreterRunOptions::GetPrintResults
bool GetPrintResults() const
Definition: CommandInterpreter.h:151
lldb_private::CommandInterpreter::GetEchoCommentCommands
bool GetEchoCommentCommands() const
Definition: CommandInterpreter.cpp:193
lldb_private::CommandInterpreter::LoadCommandDictionary
void LoadCommandDictionary()
Definition: CommandInterpreter.cpp:515
lldb_private::CommandInterpreter::SourceInitFileCwd
void SourceInitFileCwd(CommandReturnObject &result)
lldb_private::StringList
Definition: StringList.h:26
lldb_private::ConstString
Definition: ConstString.h:39
lldb_private::CommandInterpreter::HasUserMultiwordCommands
bool HasUserMultiwordCommands() const
lldb_private::CommandInterpreter::Initialize
void Initialize()
Definition: CommandInterpreter.cpp:257
lldb_private::StreamString
Definition: StreamString.h:23
lldb_private::CommandObject::CommandMap
std::map< std::string, lldb::CommandObjectSP > CommandMap
Definition: CommandObject.h:108
lldb_private::CommandInterpreter::ResolveCommand
void ResolveCommand(const char *command_line, CommandReturnObject &result)
Definition: CommandInterpreter.cpp:224
lldb_private::IOHandler
Definition: IOHandler.h:43
lldb_private::CommandInterpreter::GetEchoCommands
bool GetEchoCommands() const
Definition: CommandInterpreter.cpp:182
lldb_private::CommandInterpreter::m_command_dict
CommandObject::CommandMap m_command_dict
Definition: CommandInterpreter.h:710
lldb_private::CommandInterpreter::PreprocessCommand
Status PreprocessCommand(std::string &command)
lldb_private::CommandInterpreterRunOptions::m_echo_commands
LazyBool m_echo_commands
Definition: CommandInterpreter.h:186
lldb_private::CommandInterpreter
Definition: CommandInterpreter.h:214
lldb_private::CommandInterpreter::eWarnedOmission
@ eWarnedOmission
Children omitted and notified.
Definition: CommandInterpreter.h:230
lldb_private::CommandInterpreter::AliasExists
bool AliasExists(llvm::StringRef cmd) const
Determine whether an alias command with this name exists.
lldb_private::CommandInterpreter::ChildrenOmissionWarningStatus
ChildrenOmissionWarningStatus
Tristate boolean to manage children omission warnings.
Definition: CommandInterpreter.h:227
lldb_private::CommandInterpreterRunResult::IncrementNumberOfErrors
void IncrementNumberOfErrors()
Definition: CommandInterpreter.h:49
lldb_private::CommandInterpreter::AddUserCommand
Status AddUserCommand(llvm::StringRef name, const lldb::CommandObjectSP &cmd_sp, bool can_replace)
lldb_private::Debugger
Definition: Debugger.h:74
lldb_private::CommandInterpreter::GetBroadcasterClass
ConstString & GetBroadcasterClass() const override
This needs to be filled in if you are going to register the broadcaster with the broadcaster manager ...
Definition: CommandInterpreter.h:258
lldb_private::CommandInterpreter::HasAliases
bool HasAliases() const
lldb_private::CommandInterpreter::CommandExists
bool CommandExists(llvm::StringRef cmd) const
Determine whether a root level, built-in command with this name exists.
string
string(SUBSTRING ${p} 10 -1 pStripped) if($
Definition: Plugins/CMakeLists.txt:40
lldb_private::CommandInterpreter::ChildrenTruncated
void ChildrenTruncated()
Definition: CommandInterpreter.h:506
StringList.h
lldb_private::CommandInterpreterRunOptions::GetEchoCommentCommands
bool GetEchoCommentCommands() const
Definition: CommandInterpreter.h:143
lldb_private::CommandInterpreter::WasInterrupted
bool WasInterrupted() const
lldb_private::CommandInterpreter::IOHandlerGetControlSequence
ConstString IOHandlerGetControlSequence(char ch) override
Definition: CommandInterpreter.h:642
lldb_private::CommandInterpreter::m_result
CommandInterpreterRunResult m_result
Definition: CommandInterpreter.h:738
lldb_private::CommandInterpreterRunResult::IsResult
bool IsResult(lldb::CommandInterpreterResult result)
Definition: CommandInterpreter.h:42
lldb_private::CommandInterpreterRunOptions::GetPrintErrors
bool GetPrintErrors() const
Definition: CommandInterpreter.h:157
Event.h
CommandHistory.h
lldb_private::CommandInterpreterRunOptions::SetEchoCommentCommands
void SetEchoCommentCommands(bool echo_comments)
Definition: CommandInterpreter.h:147
lldb_private::CommandInterpreterRunOptions::m_print_results
LazyBool m_print_results
Definition: CommandInterpreter.h:188
lldb_private::CommandInterpreterRunOptions::GetSpawnThread
bool GetSpawnThread() const
Definition: CommandInterpreter.h:177
lldb_private::CommandInterpreter::m_command_source_dirs
std::vector< FileSpec > m_command_source_dirs
A stack of directory paths.
Definition: CommandInterpreter.h:736
lldb-private.h
lldb_private::CommandInterpreter::m_command_state
std::atomic< CommandHandlingState > m_command_state
Definition: CommandInterpreter.h:693
lldb_private::CommandInterpreter::HandleCompletionMatches
void HandleCompletionMatches(CompletionRequest &request)
lldb_private::CommandObject
Definition: CommandObject.h:67
lldb_private::CommandAlias
Definition: CommandAlias.h:20
lldb_private::CommandInterpreter::BuildAliasResult
CommandObject * BuildAliasResult(llvm::StringRef alias_name, std::string &raw_input_string, std::string &alias_result, CommandReturnObject &result)
lldb_private::CommandInterpreter::FindCommandsForApropos
void FindCommandsForApropos(llvm::StringRef word, StringList &commands_found, StringList &commands_help, bool search_builtin_commands, bool search_user_commands, bool search_alias_commands, bool search_user_mw_commands)
lldb_private::CommandInterpreterRunResult::CommandInterpreter
friend CommandInterpreter
Definition: CommandInterpreter.h:47
lldb_private::CommandInterpreter::UserCommandExists
bool UserCommandExists(llvm::StringRef cmd) const
Determine whether a root-level user command with this name exists.
lldb_private::Status
Definition: Status.h:44
lldb_private::CommandInterpreterRunOptions::DefaultToNo
static bool DefaultToNo(LazyBool flag)
Definition: CommandInterpreter.h:204
lldb_private::CommandInterpreter::ResolveCommandImpl
CommandObject * ResolveCommandImpl(std::string &command_line, CommandReturnObject &result)
lldb_private::CommandReturnObject
Definition: CommandReturnObject.h:26
lldb_private::CommandInterpreterRunOptions::SetSilent
void SetSilent(bool silent)
Definition: CommandInterpreter.h:105
lldb_private::CommandInterpreter::eBroadcastBitAsynchronousErrorData
@ eBroadcastBitAsynchronousErrorData
Definition: CommandInterpreter.h:223
lldb_private::CommandInterpreter::UserMultiwordCommandExists
bool UserMultiwordCommandExists(llvm::StringRef cmd) const
Determine whether a root-level user multiword command with this name exists.
message
message(FATAL_ERROR "invalid libipt include path provided") endif() include_directories($
Definition: Plugins/Trace/intel-pt/CMakeLists.txt:6
uint32_t
lldb_private::CommandInterpreterRunOptions::CommandInterpreterRunOptions
CommandInterpreterRunOptions()=default
lldb_private::eLazyBoolNo
@ eLazyBoolNo
Definition: lldb-private-enumerations.h:115
lldb_private::CommandInterpreter::GetDebugger
Debugger & GetDebugger()
Definition: CommandInterpreter.h:445
lldb_private::CommandInterpreter::m_skip_lldbinit_files
bool m_skip_lldbinit_files
Definition: CommandInterpreter.h:708
lldb_private::CommandInterpreter::SetBatchCommandMode
bool SetBatchCommandMode(bool value)
Definition: CommandInterpreter.h:500
lldb_private::CommandInterpreterRunOptions::GetEchoCommands
bool GetEchoCommands() const
Definition: CommandInterpreter.h:137
lldb_private::CommandInterpreter::GetRequireCommandOverwrite
bool GetRequireCommandOverwrite() const
Definition: CommandInterpreter.cpp:251
CommandObject.h
lldb_private::CommandInterpreter::GetUserMultiwordCommands
const CommandObject::CommandMap & GetUserMultiwordCommands() const
Definition: CommandInterpreter.h:579
lldb_private::CommandInterpreter::eCommandTypesUserMW
@ eCommandTypesUserMW
Definition: CommandInterpreter.h:236
lldb_private::CommandInterpreter::g_need_argument
static const char * g_need_argument
Definition: CommandInterpreter.h:247
lldb_private::CommandInterpreter::SetEchoCommentCommands
void SetEchoCommentCommands(bool enable)
Definition: CommandInterpreter.cpp:199
lldb_private::CommandInterpreter::GetSaveSessionOnQuit
bool GetSaveSessionOnQuit() const
Definition: CommandInterpreter.cpp:161
lldb_private::CommandInterpreter::HasAliasOptions
bool HasAliasOptions() const
lldb_private::CommandInterpreter::HandleCommandsFromFile
void HandleCommandsFromFile(FileSpec &file, const ExecutionContext &context, const CommandInterpreterRunOptions &options, CommandReturnObject &result)
Execute a list of commands from a file.
lldb_private::CommandInterpreter::IsActive
bool IsActive()
lldb_private::CommandInterpreterRunOptions::m_print_errors
LazyBool m_print_errors
Definition: CommandInterpreter.h:189
lldb_private::CommandInterpreter::DidProcessStopAbnormally
bool DidProcessStopAbnormally() const
lldb_private::CommandInterpreterRunResult::GetNumErrors
uint32_t GetNumErrors() const
Definition: CommandInterpreter.h:38
lldb_private::CommandInterpreter::m_repeat_command
std::string m_repeat_command
Definition: CommandInterpreter.h:719
lldb_private::CommandInterpreter::EchoCommandNonInteractive
bool EchoCommandNonInteractive(llvm::StringRef line, const Flags &io_handler_flags) const
lldb_private::CommandInterpreter::m_allow_exit_code
bool m_allow_exit_code
Definition: CommandInterpreter.h:744
lldb_private::CommandInterpreterRunResult::m_num_errors
int m_num_errors
Definition: CommandInterpreter.h:54
lldb_private::CommandInterpreter::Clear
void Clear()
Definition: CommandInterpreter.cpp:495
lldb_private::CommandInterpreter::eCommandTypesHidden
@ eCommandTypesHidden
Definition: CommandInterpreter.h:238
lldb_private::CommandInterpreter::PrintWarningsIfNecessary
void PrintWarningsIfNecessary(Stream &s, const std::string &cmd_name)
Definition: CommandInterpreter.h:516
lldb_private::CommandInterpreterRunOptions::GetStopOnCrash
bool GetStopOnCrash() const
Definition: CommandInterpreter.h:131
lldb_private::CommandInterpreterRunResult::GetResult
lldb::CommandInterpreterResult GetResult() const
Definition: CommandInterpreter.h:40
lldb_private::CommandInterpreter::FinishHandlingCommand
void FinishHandlingCommand()
lldb_private::CommandInterpreter::GetRepeatPreviousCommand
bool GetRepeatPreviousCommand() const
Definition: CommandInterpreter.cpp:245
lldb_private::CommandInterpreter::HasUserCommands
bool HasUserCommands() const
lldb_private::CommandInterpreterRunOptions::m_add_to_history
LazyBool m_add_to_history
Definition: CommandInterpreter.h:190
lldb_private::Stream::Printf
size_t Printf(const char *format,...) __attribute__((format(printf
Output printf formatted output to the stream.
Definition: Stream.cpp:107
lldb_private::CommandInterpreter::BuildAliasCommandArgs
void BuildAliasCommandArgs(CommandObject *alias_cmd_obj, const char *alias_name, Args &cmd_args, std::string &raw_input_string, CommandReturnObject &result)
lldb-forward.h
lldb_private::CommandInterpreter::GetCommandHistory
CommandHistory & GetCommandHistory()
Definition: CommandInterpreter.h:536
lldb_private::CommandInterpreter::GetCommandNamesMatchingPartialString
int GetCommandNamesMatchingPartialString(const char *cmd_cstr, bool include_aliases, StringList &matches, StringList &descriptions)
lldb_private::IOHandlerDelegate
A delegate class for use with IOHandler subclasses.
Definition: IOHandler.h:190
lldb_private::CommandInterpreterRunOptions::SetPrintResults
void SetPrintResults(bool print_results)
Definition: CommandInterpreter.h:153
lldb_private
A class that represents a running process on the host machine.
Definition: SBCommandInterpreterRunOptions.h:16
lldb_private::CommandInterpreter::GetAlias
const CommandAlias * GetAlias(llvm::StringRef alias_name) const
lldb_private::eLazyBoolCalculate
@ eLazyBoolCalculate
Definition: lldb-private-enumerations.h:115
lldb_private::CommandInterpreter::UpdatePrompt
void UpdatePrompt(llvm::StringRef prompt)
lldb_private::CommandInterpreter::CommandHandlingState::eInProgress
@ eInProgress
lldb_private::CommandInterpreter::m_command_source_depth
uint32_t m_command_source_depth
Definition: CommandInterpreter.h:733
lldb_private::CommandInterpreter::m_transcript_stream
StreamString m_transcript_stream
Definition: CommandInterpreter.h:746
lldb_private::CommandInterpreter::SkipLLDBInitFiles
void SkipLLDBInitFiles(bool skip_lldbinit_files)
Definition: CommandInterpreter.h:481
lldb_private::CommandInterpreter::m_quit_exit_code
llvm::Optional< int > m_quit_exit_code
Definition: CommandInterpreter.h:742
lldb_private::CommandInterpreter::GetExpandRegexAliases
bool GetExpandRegexAliases() const
Definition: CommandInterpreter.cpp:144
lldb_private::CommandInterpreter::GetExecutionContext
ExecutionContext GetExecutionContext() const
lldb_private::CommandInterpreterRunResult::m_result
lldb::CommandInterpreterResult m_result
Definition: CommandInterpreter.h:55
lldb_private::CommandInterpreter::GetCurrentSourceDir
FileSpec GetCurrentSourceDir()
lldb_private::CommandInterpreter::m_overriden_exe_contexts
std::stack< ExecutionContext > m_overriden_exe_contexts
Definition: CommandInterpreter.h:706
lldb_private::CommandInterpreter::SetReachedMaximumDepth
void SetReachedMaximumDepth()
Definition: CommandInterpreter.h:511
lldb_private::CommandInterpreter::eUnwarnedOmission
@ eUnwarnedOmission
Children omitted, and not yet notified.
Definition: CommandInterpreter.h:229
lldb_private::CommandInterpreterRunOptions::SetAutoHandleEvents
void SetAutoHandleEvents(bool auto_handle_events)
Definition: CommandInterpreter.h:173
lldb_private::CommandInterpreter::GetCommandSPExact
lldb::CommandObjectSP GetCommandSPExact(llvm::StringRef cmd, bool include_aliases=false) const
lldb_private::CommandInterpreterRunOptions::SetStopOnError
void SetStopOnError(bool stop_on_error)
Definition: CommandInterpreter.h:127
lldb::CommandInterpreterResult
CommandInterpreterResult
The result from a command interpreter run.
Definition: lldb-enumerations.h:1148
lldb_private::CommandInterpreter::RemoveAllUser
void RemoveAllUser()
Definition: CommandInterpreter.h:340
lldb_private::CommandInterpreter::OutputFormattedHelpText
void OutputFormattedHelpText(Stream &strm, llvm::StringRef prefix, llvm::StringRef help_text)
lldb_private::CommandInterpreter::m_max_depth_warning
ChildrenOmissionWarningStatus m_max_depth_warning
Whether we reached the maximum child nesting depth and whether the user has been told.
Definition: CommandInterpreter.h:729
lldb_private::CommandInterpreter::eCommandTypesBuiltin
@ eCommandTypesBuiltin
Definition: CommandInterpreter.h:234
lldb_private::CommandInterpreter::SaveTranscript
bool SaveTranscript(CommandReturnObject &result, llvm::Optional< std::string > output_file=llvm::None)
Save the current debugger session transcript to a file on disk.
lldb_private::Broadcaster
Definition: Broadcaster.h:242
lldb_private::CommandInterpreter::m_user_mw_dict
CommandObject::CommandMap m_user_mw_dict
Definition: CommandInterpreter.h:717
lldb_private::CommandInterpreter::SetSaveSessionOnQuit
void SetSaveSessionOnQuit(bool enable)
Definition: CommandInterpreter.cpp:167
ScriptInterpreter.h
lldb_private::CommandInterpreter::GetCommandSP
lldb::CommandObjectSP GetCommandSP(llvm::StringRef cmd, bool include_aliases=true, bool exact=true, StringList *matches=nullptr, StringList *descriptions=nullptr) const
lldb_private::CommandInterpreter::SetSynchronous
void SetSynchronous(bool value)
lldb_private::CommandInterpreterRunOptions::SetPrintErrors
void SetPrintErrors(bool print_errors)
Definition: CommandInterpreter.h:159
lldb_private::CommandInterpreter::GetAutoSuggestionForCommand
llvm::Optional< std::string > GetAutoSuggestionForCommand(llvm::StringRef line)
Returns the auto-suggestion string that should be added to the given command line.
lldb_private::CommandInterpreterRunOptions::m_stop_on_crash
LazyBool m_stop_on_crash
Definition: CommandInterpreter.h:185
lldb_private::CommandInterpreter::GetAliasHelp
void GetAliasHelp(const char *alias_name, StreamString &help_string)
lldb_private::CommandInterpreter::SourceInitFileHome
void SourceInitFileHome(CommandReturnObject &result, bool is_repl)
lldb_private::CommandInterpreter::~CommandInterpreter
~CommandInterpreter() override=default
lldb_private::CommandInterpreter::RemoveAllUserMultiword
void RemoveAllUserMultiword()
Definition: CommandInterpreter.h:336
lldb_private::CommandInterpreter::g_no_argument
static const char * g_no_argument
Definition: CommandInterpreter.h:246
lldb_private::CommandInterpreter::StartHandlingCommand
void StartHandlingCommand()
lldb_private::CommandInterpreter::m_batch_command_mode
bool m_batch_command_mode
Definition: CommandInterpreter.h:723
lldb_private::CompletionRequest
Definition: CompletionRequest.h:100
lldb_private::CommandInterpreter::HandleCommands
void HandleCommands(const StringList &commands, const ExecutionContext &context, const CommandInterpreterRunOptions &options, CommandReturnObject &result)
Execute a list of commands in sequence.
lldb_private::CommandInterpreter::CommandTypes
CommandTypes
Definition: CommandInterpreter.h:233