This was supposed to early return after logging the NULL buffer, not
foolishly carry on and attempt to dereference it.
Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
This includes an additional _double variant for _Generics and a bool
one.
Similarly, _WESTON_TRACE_ANNOTATE_FUNC_FLOW gets a _Generics macro variant
to handle the case were we have a integer flow ID, rather than an a
pointer.
Finally we always have a flow ID set when weston_input_event gets
initalized.
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Added as an example of adding another layer of nesting, to show
the entry point for the Generic (which has no parent), and
a helper function for nesting inside another structure.
Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
We now track the size of the key string, as well as allow adding empty
"container" annotations that are just a name for nested storage.
When parents are present, the full key name is created by walking them
and prepending them to a string backwards.
Use this to implement a buffer annotation helper and use it in the one
place we're already logging a buffer.
Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
The int, string, and float annotators will become our atoms when we
start logging larger structs. The functions for complex annotations
will call these many times for a single annotation.
So we should assert in the int, string, and float annotators before
adding there, so the big functions are implicitly checked.
Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
For now just the three we have, but we'll be adding a bunch of complex
annotations, so having their own place will be cleaner.
Signed-off-by: Derek Foreman <derek.foreman@collabora.com>