llvm/lldb/source/API/SBProcess.cpp

//===-- SBProcess.cpp -----------------------------------------------------===//
//
// 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 "lldb/API/SBProcess.h"
#include "lldb/Utility/Instrumentation.h"

#include <cinttypes>

#include "lldb/lldb-defines.h"
#include "lldb/lldb-types.h"

#include "lldb/Core/AddressRangeListImpl.h"
#include "lldb/Core/Debugger.h"
#include "lldb/Core/Module.h"
#include "lldb/Core/PluginManager.h"
#include "lldb/Core/StructuredDataImpl.h"
#include "lldb/Host/StreamFile.h"
#include "lldb/Target/MemoryRegionInfo.h"
#include "lldb/Target/Process.h"
#include "lldb/Target/RegisterContext.h"
#include "lldb/Target/SystemRuntime.h"
#include "lldb/Target/Target.h"
#include "lldb/Target/Thread.h"
#include "lldb/Utility/Args.h"
#include "lldb/Utility/LLDBLog.h"
#include "lldb/Utility/ProcessInfo.h"
#include "lldb/Utility/State.h"
#include "lldb/Utility/Stream.h"

#include "lldb/API/SBBroadcaster.h"
#include "lldb/API/SBCommandReturnObject.h"
#include "lldb/API/SBDebugger.h"
#include "lldb/API/SBEvent.h"
#include "lldb/API/SBFile.h"
#include "lldb/API/SBFileSpec.h"
#include "lldb/API/SBMemoryRegionInfo.h"
#include "lldb/API/SBMemoryRegionInfoList.h"
#include "lldb/API/SBSaveCoreOptions.h"
#include "lldb/API/SBScriptObject.h"
#include "lldb/API/SBStream.h"
#include "lldb/API/SBStringList.h"
#include "lldb/API/SBStructuredData.h"
#include "lldb/API/SBThread.h"
#include "lldb/API/SBThreadCollection.h"
#include "lldb/API/SBTrace.h"
#include "lldb/API/SBUnixSignals.h"

usingnamespacelldb;
usingnamespacelldb_private;

SBProcess::SBProcess() {}

// SBProcess constructor

SBProcess::SBProcess(const SBProcess &rhs) :{}

SBProcess::SBProcess(const lldb::ProcessSP &process_sp)
    :{}

const SBProcess &SBProcess::operator=(const SBProcess &rhs) {}

// Destructor
SBProcess::~SBProcess() = default;

const char *SBProcess::GetBroadcasterClassName() {}

const char *SBProcess::GetPluginName() {}

const char *SBProcess::GetShortPluginName() {}

lldb::ProcessSP SBProcess::GetSP() const {}

void SBProcess::SetSP(const ProcessSP &process_sp) {}

void SBProcess::Clear() {}

bool SBProcess::IsValid() const {}
operator bool()

bool SBProcess::RemoteLaunch(char const **argv, char const **envp,
                             const char *stdin_path, const char *stdout_path,
                             const char *stderr_path,
                             const char *working_directory,
                             uint32_t launch_flags, bool stop_at_entry,
                             lldb::SBError &error) {}

bool SBProcess::RemoteAttachToProcessWithID(lldb::pid_t pid,
                                            lldb::SBError &error) {}

uint32_t SBProcess::GetNumThreads() {}

SBThread SBProcess::GetSelectedThread() const {}

SBThread SBProcess::CreateOSPluginThread(lldb::tid_t tid,
                                         lldb::addr_t context) {}

SBTarget SBProcess::GetTarget() const {}

size_t SBProcess::PutSTDIN(const char *src, size_t src_len) {}

size_t SBProcess::GetSTDOUT(char *dst, size_t dst_len) const {}

size_t SBProcess::GetSTDERR(char *dst, size_t dst_len) const {}

size_t SBProcess::GetAsyncProfileData(char *dst, size_t dst_len) const {}

void SBProcess::ReportEventState(const SBEvent &event, SBFile out) const {}

void SBProcess::ReportEventState(const SBEvent &event, FILE *out) const {}

void SBProcess::ReportEventState(const SBEvent &event, FileSP out) const {}

void SBProcess::AppendEventStateReport(const SBEvent &event,
                                       SBCommandReturnObject &result) {}

bool SBProcess::SetSelectedThread(const SBThread &thread) {}

bool SBProcess::SetSelectedThreadByID(lldb::tid_t tid) {}

bool SBProcess::SetSelectedThreadByIndexID(uint32_t index_id) {}

SBThread SBProcess::GetThreadAtIndex(size_t index) {}

uint32_t SBProcess::GetNumQueues() {}

SBQueue SBProcess::GetQueueAtIndex(size_t index) {}

uint32_t SBProcess::GetStopID(bool include_expression_stops) {}

SBEvent SBProcess::GetStopEventForStopID(uint32_t stop_id) {}

void SBProcess::ForceScriptedState(StateType new_state) {}

StateType SBProcess::GetState() {}

int SBProcess::GetExitStatus() {}

const char *SBProcess::GetExitDescription() {}

lldb::pid_t SBProcess::GetProcessID() {}

uint32_t SBProcess::GetUniqueID() {}

ByteOrder SBProcess::GetByteOrder() const {}

uint32_t SBProcess::GetAddressByteSize() const {}

SBError SBProcess::Continue() {}

SBError SBProcess::Destroy() {}

SBError SBProcess::Stop() {}

SBError SBProcess::Kill() {}

SBError SBProcess::Detach() {}

SBError SBProcess::Detach(bool keep_stopped) {}

SBError SBProcess::Signal(int signo) {}

SBUnixSignals SBProcess::GetUnixSignals() {}

void SBProcess::SendAsyncInterrupt() {}

SBThread SBProcess::GetThreadByID(tid_t tid) {}

SBThread SBProcess::GetThreadByIndexID(uint32_t index_id) {}

StateType SBProcess::GetStateFromEvent(const SBEvent &event) {}

bool SBProcess::GetRestartedFromEvent(const SBEvent &event) {}

size_t SBProcess::GetNumRestartedReasonsFromEvent(const lldb::SBEvent &event) {}

const char *
SBProcess::GetRestartedReasonAtIndexFromEvent(const lldb::SBEvent &event,
                                              size_t idx) {}

SBProcess SBProcess::GetProcessFromEvent(const SBEvent &event) {}

bool SBProcess::GetInterruptedFromEvent(const SBEvent &event) {}

lldb::SBStructuredData
SBProcess::GetStructuredDataFromEvent(const lldb::SBEvent &event) {}

bool SBProcess::EventIsProcessEvent(const SBEvent &event) {}

bool SBProcess::EventIsStructuredDataEvent(const lldb::SBEvent &event) {}

SBBroadcaster SBProcess::GetBroadcaster() const {}

const char *SBProcess::GetBroadcasterClass() {}

lldb::SBAddressRangeList SBProcess::FindRangesInMemory(
    const void *buf, uint64_t size, const SBAddressRangeList &ranges,
    uint32_t alignment, uint32_t max_matches, SBError &error) {}

lldb::addr_t SBProcess::FindInMemory(const void *buf, uint64_t size,
                                     const SBAddressRange &range,
                                     uint32_t alignment, SBError &error) {}

size_t SBProcess::ReadMemory(addr_t addr, void *dst, size_t dst_len,
                             SBError &sb_error) {}

size_t SBProcess::ReadCStringFromMemory(addr_t addr, void *buf, size_t size,
                                        lldb::SBError &sb_error) {}

uint64_t SBProcess::ReadUnsignedFromMemory(addr_t addr, uint32_t byte_size,
                                           lldb::SBError &sb_error) {}

lldb::addr_t SBProcess::ReadPointerFromMemory(addr_t addr,
                                              lldb::SBError &sb_error) {}

size_t SBProcess::WriteMemory(addr_t addr, const void *src, size_t src_len,
                              SBError &sb_error) {}

void SBProcess::GetStatus(SBStream &status) {}

bool SBProcess::GetDescription(SBStream &description) {}

SBStructuredData SBProcess::GetExtendedCrashInformation() {}

uint32_t
SBProcess::GetNumSupportedHardwareWatchpoints(lldb::SBError &sb_error) const {}

uint32_t SBProcess::LoadImage(lldb::SBFileSpec &sb_remote_image_spec,
                              lldb::SBError &sb_error) {}

uint32_t SBProcess::LoadImage(const lldb::SBFileSpec &sb_local_image_spec,
                              const lldb::SBFileSpec &sb_remote_image_spec,
                              lldb::SBError &sb_error) {}

uint32_t SBProcess::LoadImageUsingPaths(const lldb::SBFileSpec &image_spec,
                                        SBStringList &paths,
                                        lldb::SBFileSpec &loaded_path,
                                        lldb::SBError &error) {}

lldb::SBError SBProcess::UnloadImage(uint32_t image_token) {}

lldb::SBError SBProcess::SendEventData(const char *event_data) {}

uint32_t SBProcess::GetNumExtendedBacktraceTypes() {}

const char *SBProcess::GetExtendedBacktraceTypeAtIndex(uint32_t idx) {}

SBThreadCollection SBProcess::GetHistoryThreads(addr_t addr) {}

bool SBProcess::IsInstrumentationRuntimePresent(
    InstrumentationRuntimeType type) {}

lldb::SBError SBProcess::SaveCore(const char *file_name) {}

lldb::SBError SBProcess::SaveCore(const char *file_name,
                                  const char *flavor,
                                  SaveCoreStyle core_style) {}

lldb::SBError SBProcess::SaveCore(SBSaveCoreOptions &options) {}

lldb::SBError
SBProcess::GetMemoryRegionInfo(lldb::addr_t load_addr,
                               SBMemoryRegionInfo &sb_region_info) {}

lldb::SBMemoryRegionInfoList SBProcess::GetMemoryRegions() {}

lldb::SBProcessInfo SBProcess::GetProcessInfo() {}

lldb::SBFileSpec SBProcess::GetCoreFile() {}

addr_t SBProcess::GetAddressMask(AddressMaskType type,
                                 AddressMaskRange addr_range) {}

void SBProcess::SetAddressMask(AddressMaskType type, addr_t mask,
                               AddressMaskRange addr_range) {}

void SBProcess::SetAddressableBits(AddressMaskType type, uint32_t num_bits,
                                   AddressMaskRange addr_range) {}

addr_t SBProcess::FixAddress(addr_t addr, AddressMaskType type) {}

lldb::addr_t SBProcess::AllocateMemory(size_t size, uint32_t permissions,
                                       lldb::SBError &sb_error) {}

lldb::SBError SBProcess::DeallocateMemory(lldb::addr_t ptr) {}

lldb::SBScriptObject SBProcess::GetScriptedImplementation() {}