class System
Defined at line 42 of file ../../src/developer/debug/zxdb/client/system.h
Represents the client's view of the system-wide state on the debugged
computer.
Public Methods
fxl::WeakPtr<System> GetWeakPtr ()
Defined at line 59 of file ../../src/developer/debug/zxdb/client/system.h
Where where ()
Returns whether this connection is local or remote.
Defined at line 62 of file ../../src/developer/debug/zxdb/client/system.h
void AddObserver (SystemObserver * observer)
Defined at line 64 of file ../../src/developer/debug/zxdb/client/system.h
void RemoveObserver (SystemObserver * observer)
Defined at line 65 of file ../../src/developer/debug/zxdb/client/system.h
MapSettingStore & settings ()
Defined at line 67 of file ../../src/developer/debug/zxdb/client/system.h
SystemSymbols * GetSymbols ()
Defined at line 79 of file ../../src/developer/debug/zxdb/client/system.h
DownloadManager * GetDownloadManager ()
Defined at line 81 of file ../../src/developer/debug/zxdb/client/system.h
const fxl::RefPtr<PrettyStackManager> & pretty_stack_manager ()
Defined at line 161 of file ../../src/developer/debug/zxdb/client/system.h
void System (Session * session)
System Implementation ---------------------------------------------------------------------------
Defined at line 274 of file ../../src/developer/debug/zxdb/client/system.cc
void ~System ()
Defined at line 305 of file ../../src/developer/debug/zxdb/client/system.cc
fxl::RefPtr<SettingSchema> GetSchema ()
Provides the setting schema for this object.
Defined at line 322 of file ../../src/developer/debug/zxdb/client/system.cc
ProcessImpl * ProcessImplFromKoid (uint64_t koid)
Defined at line 329 of file ../../src/developer/debug/zxdb/client/system.cc
std::vector<TargetImpl *> GetTargetImpls ()
Defined at line 338 of file ../../src/developer/debug/zxdb/client/system.cc
TargetImpl * CreateNewTargetImpl (TargetImpl * clone)
Like CreateNewTarget but returns the implementation.
Defined at line 345 of file ../../src/developer/debug/zxdb/client/system.cc
std::vector<Target *> GetTargets ()
Returns all targets currently in this System instance. The returned pointers are managed by the
System object and should not be cached once you return to the message loop. There is a single
default Target, which is not initially attached to anything.
Defined at line 352 of file ../../src/developer/debug/zxdb/client/system.cc
std::vector<Breakpoint *> GetBreakpoints ()
Returns all [non-]internal breakpoints currently in this System instance. The returned pointers
are managed by the System object and should not be cached once you return to the message loop.
Defined at line 360 of file ../../src/developer/debug/zxdb/client/system.cc
std::vector<Breakpoint *> GetInternalBreakpoints ()
Defined at line 370 of file ../../src/developer/debug/zxdb/client/system.cc
std::vector<Filter *> GetFilters ()
Returns all filters currently in this System instance. The returned pointers are managed by the
System object and should not be cached once you return to the message loop.
Defined at line 380 of file ../../src/developer/debug/zxdb/client/system.cc
Filter * GetFilterForId (const debug_ipc::Filter::Identifier & id)
Returns the filter matching the given id or nullptr if not found. Similarly to |GetFilters|
only weak pointers should be cached from the returned pointer and checked for validity before
use.
Defined at line 868 of file ../../src/developer/debug/zxdb/client/system.cc
std::vector<SymbolServer *> GetSymbolServers ()
Returns all symbol servers registered with this symbol instance. The returned pointers are
managed by the System object and should not be cached once you return to the message loop.
Defined at line 389 of file ../../src/developer/debug/zxdb/client/system.cc
Process * ProcessFromKoid (uint64_t koid)
Returns the process (and hence Target) associated with the given live koid. Returns 0 if not
found.
Defined at line 431 of file ../../src/developer/debug/zxdb/client/system.cc
void GetProcessTree (ProcessTreeCallback callback)
Schedules a request for the system process tree.
Defined at line 433 of file ../../src/developer/debug/zxdb/client/system.cc
Target * CreateNewTarget (Target * clone)
Creates/Deletes a target in this System instance. If "clone" is given, the settings from that
target will be cloned into the new one. If clone is null, an empty Target will be allocated.
Targets can't be deleted if they're running, and there must always be at least one target
in the system. Delete will fail otherwise.
Defined at line 437 of file ../../src/developer/debug/zxdb/client/system.cc
Err DeleteTarget (Target * t)
Defined at line 441 of file ../../src/developer/debug/zxdb/client/system.cc
Breakpoint * CreateNewBreakpoint ()
Creates a new breakpoint. It will have no associated process or location and will be disabled.
Defined at line 460 of file ../../src/developer/debug/zxdb/client/system.cc
Breakpoint * CreateNewInternalBreakpoint ()
Creates an internal breakpoint. Internal breakpoints are not reported by GetBreakpoints() and
are used to implement internal stepping functions.
Defined at line 474 of file ../../src/developer/debug/zxdb/client/system.cc
void DeleteBreakpoint (Breakpoint * breakpoint)
Deletes the given breakpoint. The passed-in pointer will be invalid after this call. Used for
both internal and external breakpoints.
Defined at line 483 of file ../../src/developer/debug/zxdb/client/system.cc
void DeleteAllBreakpoints ()
Delete all internal and external breakpoints.
Defined at line 500 of file ../../src/developer/debug/zxdb/client/system.cc
Filter * CreateNewFilter (std::optional<debug_ipc::Filter> maybe_filter)
Creates a new filter. It will have no associated pattern.
Defined at line 512 of file ../../src/developer/debug/zxdb/client/system.cc
void DeleteFilter (Filter * filter)
Delete a filter. The passed-in pointer will be invalid after this call.
Defined at line 525 of file ../../src/developer/debug/zxdb/client/system.cc
void DeleteAllFilters ()
Delete all filters in the system.
Defined at line 547 of file ../../src/developer/debug/zxdb/client/system.cc
Tracepoint * CreateNewTracepoint ()
Creates a new tracepoint.
Defined at line 559 of file ../../src/developer/debug/zxdb/client/system.cc
void DeleteTracepoint (Tracepoint * tracepoint)
Deletes the given tracepoint.
Defined at line 571 of file ../../src/developer/debug/zxdb/client/system.cc
void DeleteAllTracepoints ()
Deletes all tracepoints.
Defined at line 582 of file ../../src/developer/debug/zxdb/client/system.cc
std::vector<Tracepoint *> GetTracepoints ()
Returns all tracepoints.
Defined at line 588 of file ../../src/developer/debug/zxdb/client/system.cc
Tracepoint * GetTracepointForBreakpoint (const Breakpoint * bp)
Returns the tracepoint that owns the given breakpoint (if any).
Defined at line 597 of file ../../src/developer/debug/zxdb/client/system.cc
Tracepoint * GetTracepointForBreakpointId (uint32_t bp_id)
Defined at line 607 of file ../../src/developer/debug/zxdb/client/system.cc
void NotifyTracepointHit (Tracepoint * tracepoint, const TracepointHitRecord & hit)
Notifies observers of a tracepoint hit.
Defined at line 614 of file ../../src/developer/debug/zxdb/client/system.cc
void Pause (fit::callback<void ()> on_paused)
Pauses (suspends in Zircon terms) all threads of all attached processes.
The backend will try to ensure the threads are actually paused before issuing the on_paused
callback. But this is best effort and not guaranteed: both because there's a timeout for the
synchronous suspending and because a different continue message could race with the reply.
Defined at line 619 of file ../../src/developer/debug/zxdb/client/system.cc
void Continue (bool forward)
Applies to all threads of all debugged processes.
Defined at line 638 of file ../../src/developer/debug/zxdb/client/system.cc
void CancelAllThreadControllers ()
Stops all thread controllers which may be doing automatic stepping for all threads in all
processes. See Thread::CancelAllThreadControllers() for more.
Defined at line 651 of file ../../src/developer/debug/zxdb/client/system.cc
bool HasDownload (const std::string & build_id)
Whether there's a download pending for the given build ID.
Defined at line 977 of file ../../src/developer/debug/zxdb/client/system.cc
void DidConnect (Where where)
Notification that a connection has been made/terminated to a target system.
The is_local flag will be set when the connection is just a loopback to the local computer.
Defined at line 658 of file ../../src/developer/debug/zxdb/client/system.cc
void DidDisconnect ()
Defined at line 688 of file ../../src/developer/debug/zxdb/client/system.cc
BreakpointImpl * BreakpointImplForId (uint32_t id)
Returns the breakpoint implementation for the given ID, or null if the ID was not found in the
map. This will include both internal and regular breakpoints (it is used for notification
dispatch).
Defined at line 694 of file ../../src/developer/debug/zxdb/client/system.cc
const BreakpointImpl * BreakpointImplForId (uint32_t id)
Defined at line 701 of file ../../src/developer/debug/zxdb/client/system.cc
void OnSettingChanged (const SettingStore & , const std::string & setting_name)
SettingStoreObserver implementation.
Defined at line 716 of file ../../src/developer/debug/zxdb/client/system.cc
void NotifyFailedToFindDebugSymbols (const Err &err,const std::string &build_id,DebugSymbolFileTypefile_type)
Called when all downloads for |build_id| fail for all active symbol servers.
Defined at line 398 of file ../../src/developer/debug/zxdb/client/system.cc
void InjectSymbolServerForTesting (std::unique_ptr<SymbolServer> server)
Add a symbol server for testing purposes.
Defined at line 806 of file ../../src/developer/debug/zxdb/client/system.cc
TargetImpl * GetNextTargetForTesting ()
Returns the next available Target for a test, which might be created on the fly. This is
effectively exposing the private method |GetNextTarget| to tests, which is helpful for creating
multiple processes.
Defined at line 458 of file ../../src/developer/debug/zxdb/client/system.cc
void SyncFilters ()
Sync filters to debug_agent.
Defined at line 810 of file ../../src/developer/debug/zxdb/client/system.cc
void OnFilterMatches (const std::vector<debug_ipc::FilterMatch> & matches)
Will attach to any process we are not already attached to.
Defined at line 832 of file ../../src/developer/debug/zxdb/client/system.cc
void AttachToPid (uint64_tpid,debug_ipc::AttachConfigconfig,Target::CallbackWithTimestampcallback)
Searches through for an open slot (Target without an attached process) or creates another one
if none is found. Calls attach on that target, passing |callback| into it.
Defined at line 896 of file ../../src/developer/debug/zxdb/client/system.cc
void DetachFromAllTargets (fit::callback<void (int)> cb)
Detach from all targets, and delete the now unused Target objects. This can be called by user
commands (e.g. "detach *", or "quit" when in embedded mode).
Defined at line 943 of file ../../src/developer/debug/zxdb/client/system.cc
void AddPostDownloadTask (fit::callback<void ()> cb)
Adds a task to be run once any pending downloads are completed. If no downloads are currently
in progress, the callback is issued immediately.
Defined at line 981 of file ../../src/developer/debug/zxdb/client/system.cc
Enumerations
enum class Where
| Name | Value | Comments |
|---|---|---|
| kNone | 0 |
No connection. |
| kLocal | 1 |
Connection is to the local system, file paths can be used directly. |
| kRemote | 2 |
Remote connection to another computer. |
Defined at line 47 of file ../../src/developer/debug/zxdb/client/system.h