class Debugdata
Defined at line 21 of file ../../sdk/lib/ld/include/lib/ld/fuchsia-debugdata.h
This encapsulates what are essentially lightweight FIDL bindings for
fuchsia.debugdata.Publisher/Publish and a couple of FIDL messages entailed
in using it.
Public Methods
void Debugdata ()
Defined at line 28 of file ../../sdk/lib/ld/include/lib/ld/fuchsia-debugdata.h
void Debugdata (Debugdata && )
Defined at line 29 of file ../../sdk/lib/ld/include/lib/ld/fuchsia-debugdata.h
void Debugdata (std::string_view data_sink, zx::vmo data)
The sink name and VMO are as described in the FIDL protocol's comments:
https://fuchsia.dev/reference/fidl/fuchsia.debugdata?hl=en#publisher
Defined at line 33 of file ../../sdk/lib/ld/include/lib/ld/fuchsia-debugdata.h
Debugdata & operator= (Debugdata && )
Defined at line 36 of file ../../sdk/lib/ld/include/lib/ld/fuchsia-debugdata.h
zx::result<zx::eventpair> Publish (zx::unowned_channel svc_client_end)
Send the fuchsia.debugdata.Publisher/Publish message in a pipelined open
on the "/svc" name table entry's client side, consuming this object. The
returned eventpair acts as a token; its lifetime represents the continued
mutability of the data in the VMO. If the VMO is mapped in and will be
touched until this process exits, then the handle can just be leaked with
a release() call. Otherwise it should be closed as soon as the VMO is no
longer being modified and not before (more or less), enabling the receiver
of the data to begin consuming it as soon as they are ready.
Defined at line 141 of file ../../sdk/lib/ld/fuchsia-debugdata.cc
zx::result<Deferred> DeferredPublish ()
Consume the object like Publish but stuff the pipelined open message meant
for the "/svc" name table entry into the client end of a new channel, and
return its server end and token. This defers the actual transfer until
later, when the name table is available. At that time, the server end can
be passed to Forward.
Defined at line 169 of file ../../sdk/lib/ld/fuchsia-debugdata.cc
zx::result<> Forward (zx::unowned_channel svc_client_end, zx::channel svc_server_end)
When the Deferred::svc_server_end from a DeferredPublish call is plumbed
to where the svc_client_end is available, this forwards it roughly as if
Publish had been called on the original object instead of DeferredPublish.
(The Deferred::vmo_token from the earlier call must be plumbed separately
or has already been intentionally leaked or closed.)
Defined at line 187 of file ../../sdk/lib/ld/fuchsia-debugdata.cc