llvm/lldb/tools/driver/Driver.cpp

//===-- Driver.cpp ----------------------------------------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#include "Driver.h"

#include "lldb/API/SBCommandInterpreter.h"
#include "lldb/API/SBCommandInterpreterRunOptions.h"
#include "lldb/API/SBCommandReturnObject.h"
#include "lldb/API/SBDebugger.h"
#include "lldb/API/SBFile.h"
#include "lldb/API/SBHostOS.h"
#include "lldb/API/SBLanguageRuntime.h"
#include "lldb/API/SBStream.h"
#include "lldb/API/SBStringList.h"
#include "lldb/API/SBStructuredData.h"
#include "lldb/Host/Config.h"

#include "llvm/ADT/StringRef.h"
#include "llvm/Support/Format.h"
#include "llvm/Support/InitLLVM.h"
#include "llvm/Support/Path.h"
#include "llvm/Support/Signals.h"
#include "llvm/Support/WithColor.h"
#include "llvm/Support/raw_ostream.h"

#include <algorithm>
#include <atomic>
#include <bitset>
#include <clocale>
#include <csignal>
#include <future>
#include <string>
#include <thread>
#include <utility>

#include <climits>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <fcntl.h>

#if !defined(__APPLE__)
#include "llvm/Support/DataTypes.h"
#endif

usingnamespacelldb;
usingnamespacellvm;

namespace {
usingnamespacellvm::opt;

enum ID {};

#define PREFIX
#include "Options.inc"
#undef PREFIX

static constexpr opt::OptTable::Info InfoTable[] =;

class LLDBOptTable : public opt::GenericOptTable {};
} // namespace

static void reset_stdin_termios();
static bool g_old_stdin_termios_is_valid =;
static struct termios g_old_stdin_termios;

static bool disable_color(const raw_ostream &OS) {}

static Driver *g_driver =;

// In the Driver::MainLoop, we change the terminal settings.  This function is
// added as an atexit handler to make sure we clean them up.
static void reset_stdin_termios() {}

Driver::Driver()
    :{}

Driver::~Driver() {}

void Driver::OptionData::AddInitialCommand(std::string command,
                                           CommandPlacement placement,
                                           bool is_file, SBError &error) {}

void Driver::WriteCommandsForSourcing(CommandPlacement placement,
                                      SBStream &strm) {}

// Check the arguments that were passed to this program to make sure they are
// valid and to get their argument values (if any).  Return a boolean value
// indicating whether or not to start up the full debugger (i.e. the Command
// Interpreter) or not.  Return FALSE if the arguments were invalid OR if the
// user only wanted help or version information.
SBError Driver::ProcessArgs(const opt::InputArgList &args, bool &exiting) {}

std::string EscapeString(std::string arg) {}

int Driver::MainLoop() {}

void Driver::ResizeWindow(unsigned short col) {}

void sigwinch_handler(int signo) {}

void sigint_handler(int signo) {}

#ifndef _WIN32
static void sigtstp_handler(int signo) {}
#endif

static void printHelp(LLDBOptTable &table, llvm::StringRef tool_name) {}

int main(int argc, char const *argv[]) {}