LLDB mainline
Classes | Namespaces | Macros | Functions | Variables
ProcessGDBRemote.cpp File Reference
#include "lldb/Host/Config.h"
#include <cerrno>
#include <cstdlib>
#include <sys/stat.h>
#include <ctime>
#include <sys/types.h>
#include "lldb/Breakpoint/Watchpoint.h"
#include "lldb/Breakpoint/WatchpointAlgorithms.h"
#include "lldb/Breakpoint/WatchpointResource.h"
#include "lldb/Core/Debugger.h"
#include "lldb/Core/Module.h"
#include "lldb/Core/ModuleSpec.h"
#include "lldb/Core/PluginManager.h"
#include "lldb/Core/Value.h"
#include "lldb/DataFormatters/FormatManager.h"
#include "lldb/Host/ConnectionFileDescriptor.h"
#include "lldb/Host/FileSystem.h"
#include "lldb/Host/HostThread.h"
#include "lldb/Host/PosixApi.h"
#include "lldb/Host/PseudoTerminal.h"
#include "lldb/Host/StreamFile.h"
#include "lldb/Host/ThreadLauncher.h"
#include "lldb/Host/XML.h"
#include "lldb/Interpreter/CommandInterpreter.h"
#include "lldb/Interpreter/CommandObject.h"
#include "lldb/Interpreter/CommandObjectMultiword.h"
#include "lldb/Interpreter/CommandReturnObject.h"
#include "lldb/Interpreter/OptionArgParser.h"
#include "lldb/Interpreter/OptionGroupBoolean.h"
#include "lldb/Interpreter/OptionGroupUInt64.h"
#include "lldb/Interpreter/OptionValueProperties.h"
#include "lldb/Interpreter/Options.h"
#include "lldb/Interpreter/Property.h"
#include "lldb/Symbol/ObjectFile.h"
#include "lldb/Target/ABI.h"
#include "lldb/Target/DynamicLoader.h"
#include "lldb/Target/MemoryRegionInfo.h"
#include "lldb/Target/RegisterFlags.h"
#include "lldb/Target/SystemRuntime.h"
#include "lldb/Target/Target.h"
#include "lldb/Target/TargetList.h"
#include "lldb/Target/ThreadPlanCallFunction.h"
#include "lldb/Utility/Args.h"
#include "lldb/Utility/FileSpec.h"
#include "lldb/Utility/LLDBLog.h"
#include "lldb/Utility/State.h"
#include "lldb/Utility/StreamString.h"
#include "lldb/Utility/Timer.h"
#include <algorithm>
#include <csignal>
#include <map>
#include <memory>
#include <mutex>
#include <optional>
#include <sstream>
#include <thread>
#include "GDBRemoteRegisterContext.h"
#include "GDBRemoteRegisterFallback.h"
#include "Plugins/Process/Utility/GDBRemoteSignals.h"
#include "Plugins/Process/Utility/InferiorCallPOSIX.h"
#include "Plugins/Process/Utility/StopInfoMachException.h"
#include "ProcessGDBRemote.h"
#include "ProcessGDBRemoteLog.h"
#include "ThreadGDBRemote.h"
#include "lldb/Host/Host.h"
#include "lldb/Utility/StringExtractorGDBRemote.h"
#include "llvm/ADT/ScopeExit.h"
#include "llvm/ADT/StringMap.h"
#include "llvm/ADT/StringSwitch.h"
#include "llvm/Support/FormatAdapters.h"
#include "llvm/Support/Threading.h"
#include "llvm/Support/raw_ostream.h"
#include "ProcessGDBRemoteProperties.inc"
#include "ProcessGDBRemotePropertiesEnum.inc"

Go to the source code of this file.

Classes

class  CommandObjectProcessGDBRemoteSpeedTest
 
class  CommandObjectProcessGDBRemotePacketHistory
 
class  CommandObjectProcessGDBRemotePacketXferSize
 
class  CommandObjectProcessGDBRemotePacketSend
 
class  CommandObjectProcessGDBRemotePacketMonitor
 
class  CommandObjectProcessGDBRemotePacket
 
class  CommandObjectMultiwordProcessGDBRemote
 

Namespaces

namespace  lldb
 

Macros

#define DEBUGSERVER_BASENAME   "debugserver"
 
#define LLDB_PROPERTIES_processgdbremote
 
#define LLDB_PROPERTIES_processgdbremote
 
#define LOW_PORT   (1024u)
 
#define HIGH_PORT   (49151u)
 
#define USE_SOCKETPAIR_FOR_LOCAL_CONNECTION   1
 

Functions

void lldb::DumpProcessGDBRemotePacketHistory (void *p, const char *path)
 
static PluginProperties & GetGlobalPluginProperties ()
 
static size_t SplitCommaSeparatedRegisterNumberString (const llvm::StringRef &comma_separated_register_numbers, std::vector< uint32_t > &regnums, int base)
 
static GDBStoppointType GetGDBStoppointType (const WatchpointResourceSP &wp_res_sp)
 
static bool SetCloexecFlag (int fd)
 
static StructuredData::ObjectSP ParseStructuredDataPacket (llvm::StringRef packet)
 

Variables

static const char * end_delimiter = "--end--;"
 
static const int end_delimiter_len = 8
 
static const char *const s_async_json_packet_prefix = "JSON-async:"
 

Macro Definition Documentation

◆ DEBUGSERVER_BASENAME

#define DEBUGSERVER_BASENAME   "debugserver"

Definition at line 95 of file ProcessGDBRemote.cpp.

◆ HIGH_PORT

#define HIGH_PORT   (49151u)

Definition at line 188 of file ProcessGDBRemote.cpp.

◆ LLDB_PROPERTIES_processgdbremote [1/2]

#define LLDB_PROPERTIES_processgdbremote

Definition at line 127 of file ProcessGDBRemote.cpp.

◆ LLDB_PROPERTIES_processgdbremote [2/2]

#define LLDB_PROPERTIES_processgdbremote

Definition at line 127 of file ProcessGDBRemote.cpp.

◆ LOW_PORT

#define LOW_PORT   (1024u)

Definition at line 187 of file ProcessGDBRemote.cpp.

◆ USE_SOCKETPAIR_FOR_LOCAL_CONNECTION

#define USE_SOCKETPAIR_FOR_LOCAL_CONNECTION   1

Definition at line 3341 of file ProcessGDBRemote.cpp.

Function Documentation

◆ GetGDBStoppointType()

static GDBStoppointType GetGDBStoppointType ( const WatchpointResourceSP wp_res_sp)
static

◆ GetGlobalPluginProperties()

static PluginProperties & GetGlobalPluginProperties ( )
static

Definition at line 174 of file ProcessGDBRemote.cpp.

◆ ParseStructuredDataPacket()

static StructuredData::ObjectSP ParseStructuredDataPacket ( llvm::StringRef  packet)
static

◆ SetCloexecFlag()

static bool SetCloexecFlag ( int  fd)
static

◆ SplitCommaSeparatedRegisterNumberString()

static size_t SplitCommaSeparatedRegisterNumberString ( const llvm::StringRef &  comma_separated_register_numbers,
std::vector< uint32_t > &  regnums,
int  base 
)
static

Variable Documentation

◆ end_delimiter

const char* end_delimiter = "--end--;"
static

◆ end_delimiter_len

const int end_delimiter_len = 8
static

◆ s_async_json_packet_prefix

const char* const s_async_json_packet_prefix = "JSON-async:"
static

Definition at line 5205 of file ProcessGDBRemote.cpp.

Referenced by ParseStructuredDataPacket().