|
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 |
| 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 |
| void | OnLoadDll (const ModuleSpec &module_spec, lldb::addr_t module_addr) override |
| void | OnUnloadDll (lldb::addr_t module_addr) 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 void | SetEnabledExtensions (Extension flags) |
| Method called in order to propagate the bitmap of protocol extensions supported by the client. | |
| 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) |
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 = true |
| 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_pending_halt = false |
| Set when Halt() / Interrupt() schedules a DebugBreakProcess injection. | |
| 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 778 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_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 242 of file NativeProcessWindows.cpp.
References lldb_private::ProcessDebugger::AllocateMemory(), lldb_private::Status::Success(), and lldb_private::Status::ToError().
|
private |
Definition at line 355 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 250 of file NativeProcessWindows.cpp.
References lldb_private::ProcessDebugger::DeallocateMemory(), and lldb_private::Status::ToError().
|
overridevirtual |
Implements lldb_private::NativeProcessProtocol.
Definition at line 188 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 337 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 307 of file NativeProcessWindows.cpp.
|
overridevirtual |
Implements lldb_private::NativeProcessProtocol.
Definition at line 405 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 426 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 385 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 226 of file NativeProcessWindows.cpp.
References lldb_private::ProcessDebugger::GetMemoryRegionInfo().
|
overridevirtual |
Implements lldb_private::NativeProcessProtocol.
Definition at line 254 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 331 of file NativeProcessWindows.cpp.
References GetSoftwareBreakpointTrapOpcode().
Referenced by HandleBreakpointException().
|
overrideprotectedvirtual |
Reimplemented from lldb_private::NativeProcessProtocol.
Definition at line 313 of file NativeProcessWindows.cpp.
References GetArchitecture(), and lldb_private::NativeProcessProtocol::GetSoftwareBreakpointTrapOpcode().
Referenced by GetSoftwareBreakpointPCOffset().
|
protected |
Definition at line 170 of file NativeProcessWindows.cpp.
References lldb_private::NativeProcessProtocol::GetThreadByID().
Referenced by HandleBreakpointException(), HandleSingleStepException(), and StopThread().
|
overridevirtual |
Implements lldb_private::NativeProcessProtocol.
Definition at line 175 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 520 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_INVALID_INDEX32, LLDB_LOG, 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 626 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 490 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 441 of file NativeProcessWindows.cpp.
References m_pending_library_events.
|
overridevirtual |
Reimplemented from lldb_private::NativeProcessProtocol.
Definition at line 222 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 215 of file NativeProcessWindows.cpp.
References Halt().
|
overridevirtual |
Reimplemented from lldb_private::NativeProcessProtocol.
Definition at line 256 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 217 of file NativeProcessWindows.cpp.
References lldb_private::ProcessDebugger::DestroyProcess(), and lldb_private::NativeProcessProtocol::GetState().
|
overridevirtual |
Reimplemented from lldb_private::ProcessDebugger.
Definition at line 671 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 652 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 463 of file NativeProcessWindows.cpp.
References GetArchitecture(), lldb_private::ProcessInfo::GetArchitecture(), lldb_private::ProcessDebugger::GetDebuggedProcessId(), lldb_private::NativeProcessProtocol::GetID(), lldb_private::GetLog(), lldb_private::Host::GetProcessInfo(), LLDB_INVALID_PROCESS_ID, LLDB_LOG, lldb_private::ProcessDebugger::m_session_data, lldb_private::NativeProcessProtocol::m_threads, lldb_private::Process, SetArchitecture(), and lldb_private::NativeProcessProtocol::SetID().
|
overridevirtual |
Reimplemented from lldb_private::ProcessDebugger.
Definition at line 716 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 445 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 697 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 705 of file NativeProcessWindows.cpp.
References m_loaded_modules, and m_pending_library_events.
|
overridevirtual |
Reimplemented from lldb_private::ProcessDebugger.
Definition at line 711 of file NativeProcessWindows.cpp.
References m_loaded_modules, and m_pending_library_events.
|
overridevirtual |
Implements lldb_private::NativeProcessProtocol.
Definition at line 231 of file NativeProcessWindows.cpp.
References lldb_private::ProcessDebugger::ReadMemory().
|
overridevirtual |
Reimplemented from lldb_private::NativeProcessProtocol.
Definition at line 348 of file NativeProcessWindows.cpp.
References lldb_private::NativeProcessProtocol::RemoveHardwareBreakpoint(), and lldb_private::NativeProcessProtocol::RemoveSoftwareBreakpoint().
|
overridevirtual |
Implements lldb_private::NativeProcessProtocol.
Definition at line 98 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 341 of file NativeProcessWindows.cpp.
References lldb_private::NativeProcessProtocol::SetHardwareBreakpoint(), and lldb_private::NativeProcessProtocol::SetSoftwareBreakpoint().
|
protected |
Definition at line 270 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 208 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 780 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 807 of file NativeProcessWindows.cpp.
References NativeProcessWindows().
Referenced by StartStdioForwarding().
|
private |
Tear down the read thread and disconnect m_stdio_communication.
Definition at line 793 of file NativeProcessWindows.cpp.
References m_pty, and m_stdio_communication.
Referenced by OnExitProcess(), and ~NativeProcessWindows().
|
protected |
Definition at line 288 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 304 of file NativeProcessWindows.cpp.
References lldb_private::NativeProcessProtocol::m_threads.
|
overridevirtual |
Implements lldb_private::NativeProcessProtocol.
Definition at line 236 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 817 of file NativeProcessWindows.cpp.
References lldb::eConnectionStatusSuccess, error(), lldb_private::Status::FromErrorString(), lldb_private::Status::FromErrorStringWithFormatv(), and m_stdio_communication.
|
private |
Definition at line 148 of file NativeProcessWindows.h.
Referenced by GetArchitecture(), NativeProcessWindows(), NativeProcessWindows(), and SetArchitecture().
|
private |
Whether we've seen the loader breakpoint that fires once per process at launch / attach.
Definition at line 170 of file NativeProcessWindows.h.
Referenced by HandleBreakpointException().
|
private |
Definition at line 162 of file NativeProcessWindows.h.
Referenced by CacheLoadedModules(), GetFileLoadAddress(), GetLoadedLibraries(), GetLoadedModuleFileSpec(), OnLoadDll(), and OnUnloadDll().
|
private |
Set when Halt() / Interrupt() schedules a DebugBreakProcess injection.
Definition at line 173 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 166 of file NativeProcessWindows.h.
Referenced by HasPendingLibraryEvents(), OnLoadDll(), OnUnloadDll(), and Resume().
|
private |
PseudoConsole for the lldb-server stdio-forwarding path.
Definition at line 176 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 179 of file NativeProcessWindows.h.
Referenced by NativeProcessWindows(), NativeProcessWindows(), StartStdioForwarding(), StopStdioForwarding(), and WriteStdin().