Commit 8e63f304 authored by Josh Kunz's avatar Josh Kunz

Add more detailed membrane logging information

parent bb04856c
This diff is collapsed.
......@@ -830,6 +830,13 @@ cn_principal_t * cn_cnode_principal(struct cnode * c);
* a cnode needs to be obtained, or if the existing reference is sufficient. */
bool cn_is_referenced_cnode(cn_principal_t * p, cptr_t c, struct cnode * cnode);
/* Returns an s-expression representing this cnode. It must be free()d. */
char * cn_cnode_string(struct cnode * c);
/* Returns an s-expression representing the capabilitily `c` in provider
* `p`. The returned string must be free()d */
char * cn_cptr_string(cn_principal_t *p, cptr_t c);
/* ---------- Object-Specific Callbacks ----------- */
/* A set of additional per-caller callbacks that can be passed to the callback
......
......@@ -63,8 +63,12 @@ int cn_default_grant_cb(struct cnode *ca, struct cnode *cb, void * payload) {
int ret = -1;
#ifndef NDEBUG
c_log_debug("[grant cb] %#0lx -> %#0lx",
cptr2ul(cap_cnode_cptr(ca)), cptr2ul(cap_cnode_cptr(cb)));
char * _send_cap_str = cn_cnode_string(ca);
char * _recv_cap_str = cn_cnode_string(cb);
c_log_debug("[grant cb] %s -> %s",
_send_cap_str, _recv_cap_str);
free(_send_cap_str);
free(_recv_cap_str);
#endif
cn_obj_t *obj = (cn_obj_t *) cap_cnode_object(ca);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment