|
LLDB mainline
|
#include <NativeProcessWindows.h>
Classes | |
| class | Manager |
Public Member Functions | |
| ~NativeProcessWindows () override | |
| Status | Resume (const ResumeActionList &resume_actions) override |
| Status | Halt () override |
| Status | Detach () override |
| Status | Signal (int signo) override |
| Sends a process a UNIX signal signal. | |
| Status | Interrupt () override |
| Tells a process to interrupt all operations as if by a Ctrl-C. | |
| Status | Kill () override |
| Status | IgnoreSignals (llvm::ArrayRef< int > signals) override |
| Status | GetMemoryRegionInfo (lldb::addr_t load_addr, MemoryRegionInfo &range_info) override |
| Status | ReadMemory (lldb::addr_t addr, void *buf, size_t size, size_t &bytes_read) override |
| Status | WriteMemory (lldb::addr_t addr, const void *buf, size_t size, size_t &bytes_written) override |
| llvm::Expected< lldb::addr_t > | AllocateMemory (size_t size, uint32_t permissions) override |
| llvm::Error | DeallocateMemory (lldb::addr_t addr) override |
| lldb::addr_t | GetSharedLibraryInfoAddress () override |
| bool | IsAlive () const override |
| size_t | UpdateThreads () override |
| const ArchSpec & | GetArchitecture () const override |
| void | SetArchitecture (const ArchSpec &arch_spec) |
| Status | SetBreakpoint (lldb::addr_t addr, uint32_t size, bool hardware) override |
| Status | RemoveBreakpoint (lldb::addr_t addr, bool hardware=false) override |
| llvm::ErrorOr< std::unique_ptr< llvm::MemoryBuffer > > | GetAuxvData () const override |
| Status | GetLoadedModuleFileSpec (const char *module_path, FileSpec &file_spec) override |
| Status | GetFileLoadAddress (const llvm::StringRef &file_name, lldb::addr_t &load_addr) override |
| llvm::Expected< std::vector< LoadedLibraryInfo > > | GetLoadedLibraries () override |
| Return the currently loaded libraries of the target in the qXfer:libraries:read form (generic name + base address pairs; used on Windows, where the inferior is not SVR4 and the module list comes from the PE loader). | |
| bool | HasPendingLibraryEvents () override |
| void | SetClientSupportsLibrariesRead (bool v) |
| void | SetEnabledExtensions (Extension flags) override |
| Forwards to NativeProcessProtocol's bookkeeping. | |
| size_t | WriteStdin (const void *buf, size_t len, Status &error) override |
| Forward bytes from the gdb-remote I packet into the inferior's ConPTY-backed stdin via m_stdio_communication.Write → ConnectionConPTY::Write → WriteFile on the parent-side STDIN HANDLE. | |
| void | OnExitProcess (uint32_t exit_code) override |
| void | OnDebuggerConnected (lldb::addr_t image_base) override |
| ExceptionResult | OnDebugException (bool first_chance, const ExceptionRecord &record) override |
| void | OnCreateThread (const HostThread &thread) override |
| void | OnExitThread (lldb::tid_t thread_id, uint32_t exit_code) override |
| DllEventAction | OnLoadDll (const ModuleSpec &module_spec, lldb::addr_t module_addr, lldb::tid_t thread_id) override |
| DllEventAction | OnUnloadDll (lldb::addr_t module_addr, lldb::tid_t thread_id) override |
| void | OnDebugString (lldb::addr_t debug_string_addr, bool is_unicode, uint16_t length_lower_word) override |
| Public Member Functions inherited from lldb_private::NativeProcessProtocol | |
| virtual | ~NativeProcessProtocol ()=default |
| Status | ReadMemoryWithoutTrap (lldb::addr_t addr, void *buf, size_t size, size_t &bytes_read) |
| virtual Status | ReadMemoryTags (int32_t type, lldb::addr_t addr, size_t len, std::vector< uint8_t > &tags) |
| virtual Status | WriteMemoryTags (int32_t type, lldb::addr_t addr, size_t len, const std::vector< uint8_t > &tags) |
| llvm::Expected< llvm::StringRef > | ReadCStringFromMemory (lldb::addr_t addr, char *buffer, size_t max_size, size_t &total_bytes_read) |
| Reads a null terminated string from memory. | |
| virtual llvm::Expected< std::vector< SVR4LibraryInfo > > | GetLoadedSVR4Libraries () |
| bool | HasSoftwareBreakpoint (lldb::addr_t addr) |
| virtual const HardwareBreakpointMap & | GetHardwareBreakpointMap () const |
| virtual Status | SetHardwareBreakpoint (lldb::addr_t addr, size_t size) |
| virtual Status | RemoveHardwareBreakpoint (lldb::addr_t addr) |
| virtual const NativeWatchpointList::WatchpointMap & | GetWatchpointMap () const |
| virtual std::optional< std::pair< uint32_t, uint32_t > > | GetHardwareDebugSupportInfo () const |
| virtual Status | SetWatchpoint (lldb::addr_t addr, size_t size, uint32_t watch_flags, bool hardware) |
| virtual Status | RemoveWatchpoint (lldb::addr_t addr) |
| lldb::pid_t | GetID () const |
| lldb::StateType | GetState () const |
| bool | IsRunning () const |
| bool | IsStepping () const |
| bool | CanResume () const |
| lldb::ByteOrder | GetByteOrder () const |
| uint32_t | GetAddressByteSize () const |
| virtual std::optional< WaitStatus > | GetExitStatus () |
| virtual bool | SetExitStatus (WaitStatus status, bool bNotifyStateChange) |
| NativeThreadProtocol * | GetThreadAtIndex (uint32_t idx) |
| NativeThreadProtocol * | GetThreadByID (lldb::tid_t tid) |
| void | SetCurrentThreadID (lldb::tid_t tid) |
| lldb::tid_t | GetCurrentThreadID () const |
| NativeThreadProtocol * | GetCurrentThread () |
| ThreadIterable | Threads () const |
| virtual int | GetTerminalFileDescriptor () |
| uint32_t | GetStopID () const |
| virtual void | NotifyTracersProcessWillResume () |
| Notify tracers that the target process will resume. | |
| virtual void | NotifyTracersProcessDidStop () |
| Notify tracers that the target process just stopped. | |
| virtual llvm::Error | TraceStart (llvm::StringRef json_params, llvm::StringRef type) |
| Start tracing a process or its threads. | |
| virtual llvm::Error | TraceStop (const TraceStopRequest &request) |
| Stop tracing a live process or its threads. | |
| virtual llvm::Expected< llvm::json::Value > | TraceGetState (llvm::StringRef type) |
| Get the current tracing state of the process and its threads. | |
| virtual llvm::Expected< std::vector< uint8_t > > | TraceGetBinaryData (const TraceGetBinaryDataRequest &request) |
| Get binary data given a trace technology and a data identifier. | |
| virtual llvm::Expected< TraceSupportedResponse > | TraceSupported () |
| Get the processor tracing type supported for this process. | |
| virtual llvm::Expected< std::string > | SaveCore (llvm::StringRef path_hint) |
| Write a core dump (without crashing the program). | |
| virtual std::vector< std::string > | GetStructuredDataPlugins () |
| Get the list of structured data plugins supported by this process. | |
| Public Member Functions inherited from lldb_private::ProcessDebugger | |
| virtual | ~ProcessDebugger () |
| virtual void | OnDebuggerError (const Status &error, uint32_t type) |
| bool | IsSystemModuleAddress (lldb::addr_t addr) |
Protected Member Functions | |
| NativeThreadWindows * | GetThreadByID (lldb::tid_t thread_id) |
| llvm::Expected< llvm::ArrayRef< uint8_t > > | GetSoftwareBreakpointTrapOpcode (size_t size_hint) override |
| size_t | GetSoftwareBreakpointPCOffset () override |
| Return the offset of the PC relative to the software breakpoint that was hit. | |
| bool | FindSoftwareBreakpoint (lldb::addr_t addr) |
| void | StopThread (lldb::tid_t thread_id, lldb::StopReason reason, std::string description="") |
| void | SetStopReasonForThread (NativeThreadWindows &thread, lldb::StopReason reason, std::string description="") |
| Protected Member Functions inherited from lldb_private::NativeProcessProtocol | |
| NativeProcessProtocol (lldb::pid_t pid, int terminal_fd, NativeDelegate &delegate) | |
| void | SetID (lldb::pid_t pid) |
| void | SetState (lldb::StateType state, bool notify_delegates=true) |
| virtual void | DoStopIDBumped (uint32_t newBumpId) |
| Status | SetSoftwareBreakpoint (lldb::addr_t addr, uint32_t size_hint) |
| Status | RemoveSoftwareBreakpoint (lldb::addr_t addr) |
| void | FixupBreakpointPCAsNeeded (NativeThreadProtocol &thread) |
| virtual void | NotifyDidExec () |
| Notify the delegate that an exec occurred. | |
| NativeThreadProtocol * | GetThreadByIDUnlocked (lldb::tid_t tid) |
| Protected Member Functions inherited from lldb_private::ProcessDebugger | |
| Status | DetachProcess () |
| Status | LaunchProcess (ProcessLaunchInfo &launch_info, DebugDelegateSP delegate) |
| Status | AttachProcess (lldb::pid_t pid, const ProcessAttachInfo &attach_info, DebugDelegateSP delegate) |
| Status | DestroyProcess (lldb::StateType process_state) |
| Status | HaltProcess (bool &caused_stop) |
| Status | GetMemoryRegionInfo (lldb::addr_t load_addr, MemoryRegionInfo &range_info) |
| Status | ReadMemory (lldb::addr_t addr, void *buf, size_t size, size_t &bytes_read) |
| llvm::Error | ReadDebugString (lldb::addr_t debug_string_addr, bool is_unicode, uint16_t length_lower_word, llvm::SmallVectorImpl< char > &output) |
| Read an OUTPUT_DEBUG_STRING_INFO payload from the inferior. | |
| Status | WriteMemory (lldb::addr_t addr, const void *buf, size_t size, size_t &bytes_written) |
| Status | AllocateMemory (size_t size, uint32_t permissions, lldb::addr_t &addr) |
| Status | DeallocateMemory (lldb::addr_t addr) |
| lldb::pid_t | GetDebuggedProcessId () const |
| Status | WaitForDebuggerConnection (DebuggerThreadSP debugger, HostProcess &process) |
Private Member Functions | |
| NativeProcessWindows (ProcessLaunchInfo &launch_info, NativeDelegate &delegate, llvm::Error &E) | |
| NativeProcessWindows (lldb::pid_t pid, int terminal_fd, NativeDelegate &delegate, llvm::Error &E) | |
| ExceptionResult | HandleSingleStepException (const ExceptionRecord &record) |
| ExceptionResult | HandleBreakpointException (const ExceptionRecord &record) |
| ExceptionResult | HandleGenericException (bool first_chance, const ExceptionRecord &record) |
| Status | CacheLoadedModules () |
| void | StartStdioForwarding () |
| Wire up m_stdio_communication on m_pty's STDOUT HANDLE. | |
| void | StopStdioForwarding () |
| Tear down the read thread and disconnect m_stdio_communication. | |
Static Private Member Functions | |
| static void | STDIOReadThreadBytesReceived (void *baton, const void *src, size_t src_len) |
| Bridge between m_stdio_communication's read thread and NativeDelegate::NewProcessOutput. | |
Private Attributes | |
| ArchSpec | m_arch |
| std::map< lldb_private::FileSpec, lldb::addr_t > | m_loaded_modules |
| bool | m_pending_library_events = false |
| Set whenever an OS DLL load/unload event has been seen since the last stop reply. | |
| bool | m_initial_stop_seen = false |
| Whether we've seen the loader breakpoint that fires once per process at launch / attach. | |
| bool | m_expecting_loader_int3 = false |
| bool | m_pending_halt = false |
| Set when Halt() / Interrupt() schedules a DebugBreakProcess injection. | |
| bool | m_client_supports_libraries_read = false |
| std::shared_ptr< PseudoConsole > | m_pty |
| PseudoConsole for the lldb-server stdio-forwarding path. | |
| ThreadedCommunication | m_stdio_communication |
| Wraps a ConnectionConPTY around the PTY's parent-side STDOUT HANDLE. | |
Definition at line 32 of file NativeProcessWindows.h.
|
override |
Definition at line 880 of file NativeProcessWindows.cpp.
References StopStdioForwarding().
|
private |
Definition at line 53 of file NativeProcessWindows.cpp.
References GetArchitecture(), lldb_private::ProcessDebugger::GetDebuggedProcessId(), lldb_private::ProcessDebugger::LaunchProcess(), LLDB_INVALID_PROCESS_ID, m_arch, m_pty, m_stdio_communication, lldb_private::NativeProcessProtocol::NativeProcessProtocol(), lldb_private::NativeProcessProtocol::SetID(), StartStdioForwarding(), lldb_private::ProcessLaunchInfo::TakePTY(), and lldb_private::Status::ToError().
Referenced by lldb_private::NativeProcessWindows::Manager::Attach(), lldb_private::NativeProcessWindows::Manager::Launch(), and STDIOReadThreadBytesReceived().
|
private |
Definition at line 74 of file NativeProcessWindows.cpp.
References lldb_private::ProcessDebugger::AttachProcess(), lldb_private::ProcessInfo::GetArchitecture(), lldb_private::ProcessDebugger::GetDebuggedProcessId(), lldb_private::Host::GetProcessInfo(), m_arch, m_expecting_loader_int3, m_stdio_communication, lldb_private::NativeProcessProtocol::NativeProcessProtocol(), lldb_private::NativeProcessProtocol::SetID(), lldb_private::ProcessInfo::SetProcessID(), and lldb_private::Status::ToError().
|
overridevirtual |
Reimplemented from lldb_private::NativeProcessProtocol.
Definition at line 246 of file NativeProcessWindows.cpp.
References lldb_private::ProcessDebugger::AllocateMemory(), lldb_private::Status::Success(), and lldb_private::Status::ToError().
|
private |
Definition at line 359 of file NativeProcessWindows.cpp.
References lldb::eErrorTypeWin32, error(), lldb_private::AutoHandle::get(), lldb_private::NativeProcessProtocol::GetID(), lldb_private::FileSystem::Instance(), lldb_private::AutoHandle::IsValid(), m_loaded_modules, lldb_private::FileSystem::Resolve(), and lldb_private::Status.
Referenced by GetFileLoadAddress(), GetLoadedLibraries(), and GetLoadedModuleFileSpec().
|
overridevirtual |
Reimplemented from lldb_private::NativeProcessProtocol.
Definition at line 254 of file NativeProcessWindows.cpp.
References lldb_private::ProcessDebugger::DeallocateMemory(), and lldb_private::Status::ToError().
|
overridevirtual |
Implements lldb_private::NativeProcessProtocol.
Definition at line 192 of file NativeProcessWindows.cpp.
References lldb_private::ProcessDebugger::DetachProcess(), error(), lldb::eStateDetached, lldb::eStateExited, lldb_private::Status::FromErrorStringWithFormatv(), lldb_private::NativeProcessProtocol::GetID(), lldb_private::GetLog(), lldb_private::NativeProcessProtocol::GetState(), LLDB_LOG, lldb_private::Process, and lldb_private::NativeProcessProtocol::SetState().
|
protected |
Definition at line 341 of file NativeProcessWindows.cpp.
References lldb_private::NativeProcessProtocol::m_software_breakpoints.
Referenced by HandleBreakpointException().
|
inlineoverridevirtual |
Implements lldb_private::NativeProcessProtocol.
Definition at line 88 of file NativeProcessWindows.h.
References m_arch.
Referenced by GetSoftwareBreakpointTrapOpcode(), NativeProcessWindows(), lldb_private::NativeThreadWindows::NativeThreadWindows(), and OnDebuggerConnected().
|
overridevirtual |
Implements lldb_private::NativeProcessProtocol.
Definition at line 311 of file NativeProcessWindows.cpp.
|
overridevirtual |
Implements lldb_private::NativeProcessProtocol.
Definition at line 409 of file NativeProcessWindows.cpp.
References CacheLoadedModules(), error(), lldb_private::Status::FromErrorStringWithFormat(), lldb_private::NativeProcessProtocol::GetID(), lldb_private::FileSpec::GetPath(), lldb_private::FileSystem::Instance(), LLDB_INVALID_ADDRESS, m_loaded_modules, lldb_private::FileSystem::Resolve(), and lldb_private::Status.
|
overridevirtual |
Return the currently loaded libraries of the target in the qXfer:libraries:read form (generic name + base address pairs; used on Windows, where the inferior is not SVR4 and the module list comes from the PE loader).
Reimplemented from lldb_private::NativeProcessProtocol.
Definition at line 430 of file NativeProcessWindows.cpp.
References lldb_private::LoadedLibraryInfo::base_addr, CacheLoadedModules(), error(), m_loaded_modules, and lldb_private::LoadedLibraryInfo::name.
|
overridevirtual |
Implements lldb_private::NativeProcessProtocol.
Definition at line 389 of file NativeProcessWindows.cpp.
References CacheLoadedModules(), error(), lldb_private::Status::FromErrorStringWithFormat(), lldb_private::NativeProcessProtocol::GetID(), lldb_private::FileSpec::GetPath(), lldb_private::FileSystem::Instance(), m_loaded_modules, lldb_private::FileSystem::Resolve(), and lldb_private::Status.
|
overridevirtual |
Reimplemented from lldb_private::NativeProcessProtocol.
Definition at line 230 of file NativeProcessWindows.cpp.
References lldb_private::ProcessDebugger::GetMemoryRegionInfo().
|
overridevirtual |
Implements lldb_private::NativeProcessProtocol.
Definition at line 258 of file NativeProcessWindows.cpp.
|
overrideprotectedvirtual |
Return the offset of the PC relative to the software breakpoint that was hit.
If an architecture (e.g. arm) reports breakpoint hits before incrementing the PC, this offset will be 0. If an architecture (e.g. intel) reports breakpoints hits after incrementing the PC, this offset will be the size of the breakpoint opcode.
Reimplemented from lldb_private::NativeProcessProtocol.
Definition at line 335 of file NativeProcessWindows.cpp.
References GetSoftwareBreakpointTrapOpcode().
Referenced by HandleBreakpointException().
|
overrideprotectedvirtual |
Reimplemented from lldb_private::NativeProcessProtocol.
Definition at line 317 of file NativeProcessWindows.cpp.
References GetArchitecture(), and lldb_private::NativeProcessProtocol::GetSoftwareBreakpointTrapOpcode().
Referenced by GetSoftwareBreakpointPCOffset().
|
protected |
Definition at line 174 of file NativeProcessWindows.cpp.
References lldb_private::NativeProcessProtocol::GetThreadByID().
Referenced by HandleBreakpointException(), HandleSingleStepException(), OnLoadDll(), OnUnloadDll(), and StopThread().
|
overridevirtual |
Implements lldb_private::NativeProcessProtocol.
Definition at line 179 of file NativeProcessWindows.cpp.
References lldb::eStateStopped, lldb_private::Status::Fail(), lldb_private::NativeProcessProtocol::GetState(), lldb_private::ProcessDebugger::HaltProcess(), m_pending_halt, and lldb_private::Status.
Referenced by Interrupt().
|
private |
Definition at line 534 of file NativeProcessWindows.cpp.
References BreakInDebugger, error(), lldb::eStateStopped, lldb::eStopReasonBreakpoint, lldb::eStopReasonException, lldb::eStopReasonSignal, lldb::eStopReasonWatchpoint, lldb_private::Exception, lldb_private::Status::Fail(), FindSoftwareBreakpoint(), lldb_private::ExceptionRecord::GetExceptionAddress(), lldb_private::ExceptionRecord::GetExceptionArguments(), lldb_private::ExceptionRecord::GetExceptionValue(), lldb_private::GetLog(), GetSoftwareBreakpointPCOffset(), GetThreadByID(), lldb_private::ExceptionRecord::GetThreadID(), lldb_private::ProcessDebugger::IsSystemModuleAddress(), LLDB_INVALID_INDEX32, LLDB_LOG, m_expecting_loader_int3, m_initial_stop_seen, m_pending_halt, lldb_private::NativeProcessProtocol::m_threads, MaskException, lldb_private::ThreadStopInfo::reason, lldb_private::NativeProcessProtocol::SetCurrentThreadID(), lldb_private::NativeProcessProtocol::SetState(), SetStopReasonForThread(), lldb_private::ThreadStopInfo::signo, and StopThread().
Referenced by OnDebugException().
|
private |
Definition at line 648 of file NativeProcessWindows.cpp.
References BreakInDebugger, lldb_private::ExceptionRecord::Dump(), lldb::eStateStopped, lldb::eStopReasonException, lldb_private::Exception, lldb_private::ExceptionRecord::GetExceptionAddress(), lldb_private::ExceptionRecord::GetExceptionValue(), lldb_private::GetLog(), lldb_private::ExceptionRecord::GetThreadID(), LLDB_LOG, SendToApplication, lldb_private::NativeProcessProtocol::SetState(), and StopThread().
Referenced by OnDebugException().
|
private |
Definition at line 504 of file NativeProcessWindows.cpp.
References error(), lldb::eStateStopped, lldb::eStopReasonTrace, lldb::eStopReasonWatchpoint, lldb_private::Exception, lldb_private::ExceptionRecord::GetExceptionAddress(), lldb_private::GetLog(), GetThreadByID(), lldb_private::ExceptionRecord::GetThreadID(), lldb_private::NativeRegisterContext::GetWatchpointAddress(), lldb_private::NativeRegisterContext::GetWatchpointHitAddress(), lldb_private::NativeRegisterContext::GetWatchpointHitIndex(), LLDB_INVALID_INDEX32, LLDB_LOG, MaskException, lldb_private::NativeProcessProtocol::SetState(), and StopThread().
Referenced by OnDebugException().
|
overridevirtual |
Reimplemented from lldb_private::NativeProcessProtocol.
Definition at line 445 of file NativeProcessWindows.cpp.
References m_pending_library_events.
|
overridevirtual |
Reimplemented from lldb_private::NativeProcessProtocol.
Definition at line 226 of file NativeProcessWindows.cpp.
References lldb_private::Status.
|
overridevirtual |
Tells a process to interrupt all operations as if by a Ctrl-C.
The default implementation will send a local host's equivalent of a SIGSTOP to the process via the NativeProcessProtocol::Signal() operation.
Reimplemented from lldb_private::NativeProcessProtocol.
Definition at line 219 of file NativeProcessWindows.cpp.
References Halt().
|
overridevirtual |
Reimplemented from lldb_private::NativeProcessProtocol.
Definition at line 260 of file NativeProcessWindows.cpp.
References lldb::eStateCrashed, lldb::eStateDetached, lldb::eStateExited, lldb::eStateInvalid, lldb::eStateUnloaded, and lldb_private::NativeProcessProtocol::GetState().
|
overridevirtual |
Implements lldb_private::NativeProcessProtocol.
Definition at line 221 of file NativeProcessWindows.cpp.
References lldb_private::ProcessDebugger::DestroyProcess(), and lldb_private::NativeProcessProtocol::GetState().
|
overridevirtual |
Reimplemented from lldb_private::ProcessDebugger.
Definition at line 700 of file NativeProcessWindows.cpp.
References error(), lldb::eStateCrashed, lldb::eStateStopped, lldb::eStopReasonNone, lldb_private::GetLog(), lldb_private::NativeProcessProtocol::GetState(), lldb_private::NativeProcessProtocol::GetWatchpointMap(), LLDB_LOG, lldb_private::NativeWatchpoint::m_addr, lldb_private::NativeWatchpoint::m_hardware, lldb_private::ProcessDebugger::m_mutex, lldb_private::NativeWatchpoint::m_size, lldb_private::NativeProcessProtocol::m_threads, lldb_private::NativeWatchpoint::m_watch_flags, lldb_private::ThreadStopInfo::reason, and lldb_private::Thread.
|
overridevirtual |
Reimplemented from lldb_private::ProcessDebugger.
Definition at line 674 of file NativeProcessWindows.cpp.
References lldb_private::ExceptionRecord::GetExceptionValue(), HandleBreakpointException(), HandleGenericException(), HandleSingleStepException(), lldb_private::ProcessDebugger::m_mutex, lldb_private::ProcessDebugger::OnDebugException(), and STATUS_WX86_BREAKPOINT.
|
overridevirtual |
Reimplemented from lldb_private::ProcessDebugger.
Definition at line 467 of file NativeProcessWindows.cpp.
References GetArchitecture(), lldb_private::ProcessInfo::GetArchitecture(), lldb_private::ProcessDebugger::GetDebuggedProcessId(), lldb_private::ProcessInfo::GetExecutableFile(), lldb_private::NativeProcessProtocol::GetID(), lldb_private::GetLog(), lldb_private::Host::GetProcessInfo(), lldb_private::FileSystem::Instance(), LLDB_INVALID_PROCESS_ID, LLDB_LOG, m_loaded_modules, lldb_private::ProcessDebugger::m_session_data, lldb_private::NativeProcessProtocol::m_threads, lldb_private::Process, lldb_private::FileSystem::Resolve(), SetArchitecture(), and lldb_private::NativeProcessProtocol::SetID().
|
overridevirtual |
Reimplemented from lldb_private::ProcessDebugger.
Definition at line 818 of file NativeProcessWindows.cpp.
References lldb_private::GetLog(), LLDB_LOG, lldb_private::NativeProcessProtocol::m_delegate, lldb_private::Process, and lldb_private::ProcessDebugger::ReadDebugString().
|
overridevirtual |
Reimplemented from lldb_private::ProcessDebugger.
Definition at line 449 of file NativeProcessWindows.cpp.
References lldb::eStateExited, lldb_private::WaitStatus::Exit, lldb_private::NativeProcessProtocol::GetID(), lldb_private::GetLog(), LLDB_LOG, lldb_private::ProcessDebugger::OnExitProcess(), lldb_private::Process, lldb_private::NativeProcessProtocol::SetExitStatus(), lldb_private::NativeProcessProtocol::SetState(), and StopStdioForwarding().
|
overridevirtual |
Reimplemented from lldb_private::ProcessDebugger.
Definition at line 726 of file NativeProcessWindows.cpp.
References lldb_private::NativeProcessProtocol::m_threads, and lldb_private::NativeProcessProtocol::m_threads_mutex.
|
overridevirtual |
Reimplemented from lldb_private::ProcessDebugger.
Definition at line 734 of file NativeProcessWindows.cpp.
References ContinueDebugLoop, lldb_private::NativeThreadWindows::DoStop(), lldb::eStateStopped, lldb::eStopReasonNone, lldb_private::Status::Fail(), lldb_private::ModuleSpec::GetFileSpec(), lldb_private::NativeThreadProtocol::GetID(), lldb_private::GetLog(), lldb_private::FileSpec::GetPath(), GetThreadByID(), lldb_private::FileSystem::Instance(), lldb_private::ProcessDebugger::IsSystemDLL(), LLDB_LOG, m_client_supports_libraries_read, m_initial_stop_seen, m_loaded_modules, lldb_private::ProcessDebugger::m_mutex, m_pending_library_events, lldb_private::NativeProcessProtocol::m_threads, ParkDebugLoop, lldb_private::Process, lldb_private::ThreadStopInfo::reason, lldb_private::FileSystem::Resolve(), lldb_private::NativeProcessProtocol::SetCurrentThreadID(), lldb_private::NativeProcessProtocol::SetState(), lldb_private::NativeThreadWindows::SetStopReason(), and lldb_private::ThreadStopInfo::signo.
|
overridevirtual |
Reimplemented from lldb_private::ProcessDebugger.
Definition at line 775 of file NativeProcessWindows.cpp.
References ContinueDebugLoop, lldb_private::NativeThreadWindows::DoStop(), lldb::eStateStopped, lldb::eStopReasonNone, lldb_private::Status::Fail(), lldb_private::NativeThreadProtocol::GetID(), lldb_private::GetLog(), lldb_private::FileSpec::GetPath(), GetThreadByID(), lldb_private::ProcessDebugger::IsSystemDLL(), LLDB_LOG, m_client_supports_libraries_read, m_initial_stop_seen, m_loaded_modules, lldb_private::ProcessDebugger::m_mutex, m_pending_library_events, lldb_private::NativeProcessProtocol::m_threads, ParkDebugLoop, lldb_private::Process, lldb_private::ThreadStopInfo::reason, lldb_private::NativeProcessProtocol::SetCurrentThreadID(), lldb_private::NativeProcessProtocol::SetState(), lldb_private::NativeThreadWindows::SetStopReason(), and lldb_private::ThreadStopInfo::signo.
|
overridevirtual |
Implements lldb_private::NativeProcessProtocol.
Definition at line 235 of file NativeProcessWindows.cpp.
References lldb_private::ProcessDebugger::ReadMemory().
|
overridevirtual |
Reimplemented from lldb_private::NativeProcessProtocol.
Definition at line 352 of file NativeProcessWindows.cpp.
References lldb_private::NativeProcessProtocol::RemoveHardwareBreakpoint(), and lldb_private::NativeProcessProtocol::RemoveSoftwareBreakpoint().
|
overridevirtual |
Implements lldb_private::NativeProcessProtocol.
Definition at line 100 of file NativeProcessWindows.cpp.
References error(), lldb::eStateCrashed, lldb::eStateRunning, lldb::eStateStepping, lldb::eStateStopped, lldb::eStateSuspended, lldb_private::Status::Fail(), lldb_private::Status::FromErrorString(), lldb_private::Status::FromErrorStringWithFormat(), lldb_private::ResumeActionList::GetActionForThread(), lldb_private::ProcessDebugger::GetDebuggedProcessId(), lldb_private::NativeProcessProtocol::GetID(), lldb_private::GetLog(), lldb_private::NativeProcessProtocol::GetState(), LLDB_LOG, lldb_private::ProcessDebugger::m_mutex, m_pending_library_events, lldb_private::ProcessDebugger::m_session_data, lldb_private::NativeProcessProtocol::m_threads, MaskException, lldb_private::Process, lldb_private::NativeProcessProtocol::SetState(), lldb_private::ResumeAction::state, and lldb_private::StateAsCString().
|
inline |
Definition at line 90 of file NativeProcessWindows.h.
References m_arch.
Referenced by OnDebuggerConnected().
|
overridevirtual |
Implements lldb_private::NativeProcessProtocol.
Definition at line 345 of file NativeProcessWindows.cpp.
References lldb_private::NativeProcessProtocol::SetHardwareBreakpoint(), and lldb_private::NativeProcessProtocol::SetSoftwareBreakpoint().
|
inline |
Definition at line 110 of file NativeProcessWindows.h.
References m_client_supports_libraries_read.
Referenced by SetEnabledExtensions().
|
inlineoverridevirtual |
Forwards to NativeProcessProtocol's bookkeeping.
Reimplemented from lldb_private::NativeProcessProtocol.
Definition at line 115 of file NativeProcessWindows.h.
References lldb_private::NativeProcessProtocol::libraries, lldb_private::NativeProcessProtocol::libraries_svr4, SetClientSupportsLibrariesRead(), and lldb_private::NativeProcessProtocol::SetEnabledExtensions().
|
protected |
Definition at line 274 of file NativeProcessWindows.cpp.
References lldb_private::ThreadStopInfo::data_count, lldb_private::ThreadStopInfo::details, lldb::eStopReasonException, lldb_private::ThreadStopInfo::exception, lldb_private::ThreadStopInfo::reason, lldb_private::NativeProcessProtocol::SetCurrentThreadID(), lldb_private::ThreadStopInfo::signo, SIGTRAP, and lldb_private::ThreadStopInfo::type.
Referenced by HandleBreakpointException(), and StopThread().
|
overridevirtual |
Sends a process a UNIX signal signal.
Implements lldb_private::NativeProcessProtocol.
Definition at line 212 of file NativeProcessWindows.cpp.
References error(), and lldb_private::Status::FromErrorString().
|
private |
Wire up m_stdio_communication on m_pty's STDOUT HANDLE.
Definition at line 882 of file NativeProcessWindows.cpp.
References m_pty, m_stdio_communication, and STDIOReadThreadBytesReceived().
Referenced by NativeProcessWindows().
|
staticprivate |
Bridge between m_stdio_communication's read thread and NativeDelegate::NewProcessOutput.
Definition at line 909 of file NativeProcessWindows.cpp.
References NativeProcessWindows().
Referenced by StartStdioForwarding().
|
private |
Tear down the read thread and disconnect m_stdio_communication.
Definition at line 895 of file NativeProcessWindows.cpp.
References m_pty, and m_stdio_communication.
Referenced by OnExitProcess(), and ~NativeProcessWindows().
|
protected |
Definition at line 292 of file NativeProcessWindows.cpp.
References error(), lldb_private::GetLog(), GetThreadByID(), LLDB_LOG, lldb_private::NativeProcessProtocol::m_threads, SetStopReasonForThread(), and lldb_private::Thread.
Referenced by HandleBreakpointException(), HandleGenericException(), and HandleSingleStepException().
|
overridevirtual |
Implements lldb_private::NativeProcessProtocol.
Definition at line 308 of file NativeProcessWindows.cpp.
References lldb_private::NativeProcessProtocol::m_threads.
|
overridevirtual |
Implements lldb_private::NativeProcessProtocol.
Definition at line 240 of file NativeProcessWindows.cpp.
References lldb_private::ProcessDebugger::WriteMemory().
|
overridevirtual |
Forward bytes from the gdb-remote I packet into the inferior's ConPTY-backed stdin via m_stdio_communication.Write → ConnectionConPTY::Write → WriteFile on the parent-side STDIN HANDLE.
Returns the number of bytes written (0 if the PTY is disconnected or write fails).
Reimplemented from lldb_private::NativeProcessProtocol.
Definition at line 919 of file NativeProcessWindows.cpp.
References lldb::eConnectionStatusSuccess, error(), lldb_private::Status::FromErrorString(), lldb_private::Status::FromErrorStringWithFormatv(), and m_stdio_communication.
|
private |
Definition at line 161 of file NativeProcessWindows.h.
Referenced by GetArchitecture(), NativeProcessWindows(), NativeProcessWindows(), and SetArchitecture().
|
private |
Definition at line 190 of file NativeProcessWindows.h.
Referenced by OnLoadDll(), OnUnloadDll(), and SetClientSupportsLibrariesRead().
|
private |
Definition at line 185 of file NativeProcessWindows.h.
Referenced by HandleBreakpointException(), and NativeProcessWindows().
|
private |
Whether we've seen the loader breakpoint that fires once per process at launch / attach.
Definition at line 183 of file NativeProcessWindows.h.
Referenced by HandleBreakpointException(), OnLoadDll(), and OnUnloadDll().
|
private |
Definition at line 175 of file NativeProcessWindows.h.
Referenced by CacheLoadedModules(), GetFileLoadAddress(), GetLoadedLibraries(), GetLoadedModuleFileSpec(), OnDebuggerConnected(), OnLoadDll(), and OnUnloadDll().
|
private |
Set when Halt() / Interrupt() schedules a DebugBreakProcess injection.
Definition at line 188 of file NativeProcessWindows.h.
Referenced by Halt(), and HandleBreakpointException().
|
private |
Set whenever an OS DLL load/unload event has been seen since the last stop reply.
Definition at line 179 of file NativeProcessWindows.h.
Referenced by HasPendingLibraryEvents(), OnLoadDll(), OnUnloadDll(), and Resume().
|
private |
PseudoConsole for the lldb-server stdio-forwarding path.
Definition at line 193 of file NativeProcessWindows.h.
Referenced by NativeProcessWindows(), StartStdioForwarding(), and StopStdioForwarding().
|
private |
Wraps a ConnectionConPTY around the PTY's parent-side STDOUT HANDLE.
Definition at line 196 of file NativeProcessWindows.h.
Referenced by NativeProcessWindows(), NativeProcessWindows(), StartStdioForwarding(), StopStdioForwarding(), and WriteStdin().