class Session
Defined at line 67 of file ../../src/developer/debug/zxdb/client/session.h
The session object manages the connection with the remote debug agent.
Protected Members
ObserverList observers_
Public Methods
fxl::WeakPtr<Session> GetWeakPtr ()
Defined at line 83 of file ../../src/developer/debug/zxdb/client/session.h
RemoteAPI * remote_api ()
The RempteAPI for sending messages to the debug_agent.
Defined at line 86 of file ../../src/developer/debug/zxdb/client/session.h
uint32_t ipc_version ()
Defined at line 87 of file ../../src/developer/debug/zxdb/client/session.h
void AddObserver (SessionObserver * observer)
Defined at line 89 of file ../../src/developer/debug/zxdb/client/session.h
void RemoveObserver (SessionObserver * observer)
Defined at line 90 of file ../../src/developer/debug/zxdb/client/session.h
void AddBreakpointObserver (BreakpointObserver * observer)
Defined at line 92 of file ../../src/developer/debug/zxdb/client/session.h
void RemoveBreakpointObserver (BreakpointObserver * observer)
Defined at line 95 of file ../../src/developer/debug/zxdb/client/session.h
void AddDownloadObserver (DownloadObserver * observer)
Defined at line 99 of file ../../src/developer/debug/zxdb/client/session.h
void RemoveDownloadObserver (DownloadObserver * observer)
Defined at line 102 of file ../../src/developer/debug/zxdb/client/session.h
void AddProcessObserver (ProcessObserver * observer)
Defined at line 105 of file ../../src/developer/debug/zxdb/client/session.h
void RemoveProcessObserver (ProcessObserver * observer)
Defined at line 106 of file ../../src/developer/debug/zxdb/client/session.h
bool is_minidump ()
Returns information about whether this session is connected to a minidump instead of a live
system.
Defined at line 112 of file ../../src/developer/debug/zxdb/client/session.h
bool IsConnected ()
Returns true if there is currently a connection.
Defined at line 119 of file ../../src/developer/debug/zxdb/client/session.h
bool HasPendingConnection ()
Returns whether a connection is pending.
Defined at line 122 of file ../../src/developer/debug/zxdb/client/session.h
Err last_connection_error ()
Returns the last connection error.
Defined at line 125 of file ../../src/developer/debug/zxdb/client/session.h
const std::string minidump_path ()
Information about the current connection.
Defined at line 128 of file ../../src/developer/debug/zxdb/client/session.h
const std::string connected_host ()
Defined at line 129 of file ../../src/developer/debug/zxdb/client/session.h
uint16_t connected_port ()
Defined at line 130 of file ../../src/developer/debug/zxdb/client/session.h
System & system ()
Access to the singleton corresponding to the debugged system.
Defined at line 153 of file ../../src/developer/debug/zxdb/client/session.h
debug::Arch arch ()
Platform/architecture of the attached system. Will be "kUnknown" when not connected.
Defined at line 156 of file ../../src/developer/debug/zxdb/client/session.h
debug::Platform platform ()
Defined at line 157 of file ../../src/developer/debug/zxdb/client/session.h
const ArchInfo & arch_info ()
Architecture information of the attached system.
Defined at line 160 of file ../../src/developer/debug/zxdb/client/session.h
fxl::ObserverList<TargetObserver> & target_observers ()
Observer list getters.
Defined at line 163 of file ../../src/developer/debug/zxdb/client/session.h
fxl::ObserverList<ProcessObserver> & process_observers ()
Defined at line 164 of file ../../src/developer/debug/zxdb/client/session.h
fxl::ObserverList<ThreadObserver> & thread_observers ()
Defined at line 165 of file ../../src/developer/debug/zxdb/client/session.h
fxl::ObserverList<BreakpointObserver> & breakpoint_observers ()
Defined at line 166 of file ../../src/developer/debug/zxdb/client/session.h
fxl::ObserverList<DownloadObserver> & download_observers ()
Defined at line 167 of file ../../src/developer/debug/zxdb/client/session.h
fxl::ObserverList<ComponentObserver> & component_observers ()
Defined at line 168 of file ../../src/developer/debug/zxdb/client/session.h
void set_stream (debug::StreamBuffer * stream)
For test purposes, so that the Session appears to be connected.
Defined at line 220 of file ../../src/developer/debug/zxdb/client/session.h
AnalyticsReporter & analytics ()
Defined at line 222 of file ../../src/developer/debug/zxdb/client/session.h
void Session ()
Creates a session with no connection. All sending will fail until the callback associated with
a Connect() call is issued.
Defined at line 410 of file ../../src/developer/debug/zxdb/client/session.cc
void Session (std::unique_ptr<RemoteAPI>remote_api,debug::Archarch,debug::Platformplatform,uint64_tpage_size)
Creates a session using a custom RemoteAPI implementation. Use for tests to mock out sending
IPC messages.
Defined at line 417 of file ../../src/developer/debug/zxdb/client/session.cc
void Session (debug::StreamBuffer * stream)
Creates with a previously-allocated local connection. The pointer must outlive this class. In
this mode, the stream can not be disconnected.
Defined at line 426 of file ../../src/developer/debug/zxdb/client/session.cc
void ~Session ()
Defined at line 439 of file ../../src/developer/debug/zxdb/client/session.cc
void OnStreamReadable ()
Notification about the stream.
Defined at line 445 of file ../../src/developer/debug/zxdb/client/session.cc
void OnStreamError ()
Defined at line 505 of file ../../src/developer/debug/zxdb/client/session.cc
void Connect (const SessionConnectionInfo & info, fit::callback<void (const Err &)> cb)
Call with an empty host and 0 port to reconnect to the last attempted connection destination.
If there is no previous destination, this will be issue an error.
Defined at line 541 of file ../../src/developer/debug/zxdb/client/session.cc
Err Disconnect ()
Synchronously disconnects from the remote system. Calling when there is no connection will
return an error.
This can also be called when a connection is pending (Connect() has been called but the
callback has not been issued yet) which will cancel the pending connection. The Connect()
callback will still be issued but will indicate failure.
Defined at line 627 of file ../../src/developer/debug/zxdb/client/session.cc
void OpenMinidump (const std::string & path, fit::callback<void (const Err &)> callback)
Open a minidump instead of connecting to a running system. The callback will be issued with an
error if the file cannot be opened or if there is already a connection.
Defined at line 593 of file ../../src/developer/debug/zxdb/client/session.cc
bool ClearConnectionData ()
Frees all connection-related data. A helper for different modes of cleanup. Returns true if
there was a connection to clear.
Defined at line 653 of file ../../src/developer/debug/zxdb/client/session.cc
void DispatchNotifyThreadStarting (const debug_ipc::NotifyThreadStarting & notify)
Dispatches these particular notification types from the agent. These are public since tests
will commonly want to synthesize these events.
Note on DispatchNotifyException: Test code can skip setting the metadata by clearing the
set_metadata flag. This allows them to set up the thread's state manually before issuing an
exception. Production code should always set the set_metadata flag to populate the thread's
state from the data in the exception.
Defined at line 667 of file ../../src/developer/debug/zxdb/client/session.cc
void DispatchNotifyThreadExiting (const debug_ipc::NotifyThreadExiting & notify)
Defined at line 679 of file ../../src/developer/debug/zxdb/client/session.cc
void DispatchNotifyException (const debug_ipc::NotifyException & notify, bool set_metadata)
This is the main entrypoint for all thread stops notifications in the client.
Defined at line 839 of file ../../src/developer/debug/zxdb/client/session.cc
void DispatchNotifyModules (const debug_ipc::NotifyModules & notify)
Defined at line 893 of file ../../src/developer/debug/zxdb/client/session.cc
void DispatchNotifyProcessStarting (const debug_ipc::NotifyProcessStarting & notify)
Defined at line 903 of file ../../src/developer/debug/zxdb/client/session.cc
void DispatchNotifyProcessExiting (const debug_ipc::NotifyProcessExiting & notify)
Defined at line 947 of file ../../src/developer/debug/zxdb/client/session.cc
void DispatchNotifyIO (const debug_ipc::NotifyIO & notify)
Defined at line 952 of file ../../src/developer/debug/zxdb/client/session.cc
void DispatchNotifyLog (const debug_ipc::NotifyLog & notify)
Defined at line 961 of file ../../src/developer/debug/zxdb/client/session.cc
void DispatchNotifyComponentDiscovered (const debug_ipc::NotifyComponentDiscovered & notify)
Defined at line 985 of file ../../src/developer/debug/zxdb/client/session.cc
void DispatchNotifyComponentStarting (const debug_ipc::NotifyComponentStarting & notify)
Defined at line 996 of file ../../src/developer/debug/zxdb/client/session.cc
void DispatchNotifyComponentExiting (const debug_ipc::NotifyComponentExiting & notify)
Defined at line 1011 of file ../../src/developer/debug/zxdb/client/session.cc
void DispatchNotifyTestExited (const debug_ipc::NotifyTestExited & notify)
Defined at line 1017 of file ../../src/developer/debug/zxdb/client/session.cc
void DispatchNotifyFilterCreated (const debug_ipc::NotifyFilterCreated & notify)
Defined at line 1023 of file ../../src/developer/debug/zxdb/client/session.cc
void HandleException (ThreadImpl *thread,const debug_ipc::NotifyException ¬ify,HandleExceptionSettingssettings)
Defined at line 691 of file ../../src/developer/debug/zxdb/client/session.cc
void OnSettingChanged (const SettingStore & , const std::string & setting_name)
SettingStoreObserver
Defined at line 1195 of file ../../src/developer/debug/zxdb/client/session.cc
Records
Friends
class RemoteAPITest
class RemoteAPIImpl
class PendingConnection