1 //===-- Driver.h ------------------------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef lldb_Driver_h_
11 #define lldb_Driver_h_
14 #include "lldb/Utility/PseudoTerminal.h"
21 #include "lldb/API/SBDefines.h"
22 #include "lldb/API/SBBroadcaster.h"
23 #include "lldb/API/SBDebugger.h"
24 #include "lldb/API/SBError.h"
27 #define NO_ASYNC false
31 class Driver : public lldb::SBBroadcaster
43 ParseArgs (int argc, const char *argv[], FILE *out_fh, bool &do_exit);
49 GetCrashLogFilename() const;
55 GetScriptLanguage() const;
58 ExecuteInitialCommands (bool before_file);
74 AddInitialCommand (const char *command, bool before_file, bool is_file, lldb::SBError &error);
76 //static OptionDefinition m_cmd_option_table[];
78 std::vector<std::string> m_args;
79 lldb::ScriptLanguage m_script_lang;
80 std::string m_core_file;
81 std::string m_crash_log;
82 std::vector<std::pair<bool,std::string> > m_initial_commands;
83 std::vector<std::pair<bool,std::string> > m_after_file_commands;
85 bool m_source_quietly;
87 bool m_print_python_path;
90 std::string m_process_name;
91 lldb::pid_t m_process_pid;
92 bool m_use_external_editor; // FIXME: When we have set/show variables we can remove this from here.
93 typedef std::set<char> OptionSet;
94 OptionSet m_seen_options;
99 SetOptionValue (int option_idx,
100 const char *option_arg,
101 Driver::OptionData &data);
111 ResizeWindow (unsigned short col);
114 lldb::SBDebugger m_debugger;
115 OptionData m_option_data;
118 ResetOptionValues ();
124 #endif // lldb_Driver_h_