Skip to content
Snippets Groups Projects
Commit a480bb6f authored by Simon McVittie's avatar Simon McVittie
Browse files

Replace DUMP_METADATA with DUMP_CAPSULE

parent 7e47ce89
No related branches found
No related tags found
1 merge request!311Build capsule-capture-libs from a bundled copy of libcapsule
...@@ -16,33 +16,41 @@ ...@@ -16,33 +16,41 @@
({ int _i = 0; for( char **_c = css; _c && *_c; _c++, _i++ ) \ ({ int _i = 0; for( char **_c = css; _c && *_c; _c++, _i++ ) \
DEBUG( DEBUG_CAPSULE, " ->%s[ %02d ]: %s", #what, _i, *_c ); }) DEBUG( DEBUG_CAPSULE, " ->%s[ %02d ]: %s", #what, _i, *_c ); })
#define DUMP_METADATA(x,m) ({ \ #define DUMP_CAPSULE(x, cap) ({ \
DEBUG( DEBUG_CAPSULE, "\nMETADATA #%d\n", (int) x ); \ DEBUG( DEBUG_CAPSULE, "\nCAPSULE #%d\n", (int) x ); \
DEBUG( DEBUG_CAPSULE, " \n" \ DEBUG( DEBUG_CAPSULE, " \n" \
"struct _capsule_metadata %p" "\n" \ "struct _capsule %p" "\n" \
"{" "\n" \ "{" "\n" \
" Lmid_t namespace; %ld" "\n" \ " void *dl_handle; %p" "\n" \
" const char *soname; %s" "\n" \ " char *prefix; %s" "\n" \
" const char *default_prefix; %s" "\n" \ " capsule_metadata *meta; %p" "\n" \
" char *active_prefix; %s" "\n" \ " {" "\n" \
" const char **exclude; %p" "\n" \ " Lmid_t namespace; %ld" "\n" \
" const char **export; %p" "\n" \ " const char *soname; %s" "\n" \
" const char **nowrap; %p" "\n" \ " const char *default_prefix; %s" "\n" \
" char **combined_exclude; %p" "\n" \ " char *active_prefix; %s" "\n" \
" char **combined_export; %p" "\n" \ " const char **exclude; %p" "\n" \
" char **combined_nowrap; %p" "\n" \ " const char **export; %p" "\n" \
"};" "\n", \ " const char **nowrap; %p" "\n" \
m, \ " char **combined_exclude; %p" "\n" \
m->namespace , \ " char **combined_export; %p" "\n" \
m->soname , \ " char **combined_nowrap; %p" "\n" \
m->default_prefix , \ " };" "\n" \
m->active_prefix , \ "};" "\n", \
m->exclude , \ cap , \
m->export , \ cap->dl_handle , \
m->nowrap , \ cap->prefix , \
m->combined_exclude , \ cap->meta , \
m->combined_export , \ cap->meta->namespace , \
m->combined_nowrap ); }) cap->meta->soname , \
cap->meta->default_prefix , \
cap->meta->active_prefix , \
cap->meta->exclude , \
cap->meta->export , \
cap->meta->nowrap , \
cap->meta->combined_exclude , \
cap->meta->combined_export , \
cap->meta->combined_nowrap ); })
typedef struct _capsule_namespace typedef struct _capsule_namespace
{ {
...@@ -383,7 +391,7 @@ get_capsule_by_soname (const char *soname) ...@@ -383,7 +391,7 @@ get_capsule_by_soname (const char *soname)
if( !cap || strcmp( cap->meta->soname, soname ) ) if( !cap || strcmp( cap->meta->soname, soname ) )
continue; continue;
DUMP_METADATA(n, cap->meta); DUMP_CAPSULE(n, cap);
return cap; return cap;
} }
...@@ -425,7 +433,7 @@ capsule_init (const char *soname) ...@@ -425,7 +433,7 @@ capsule_init (const char *soname)
continue; continue;
DEBUG( DEBUG_CAPSULE, " "); DEBUG( DEBUG_CAPSULE, " ");
DUMP_METADATA( i, other->meta ); DUMP_CAPSULE( i, other );
DUMP_STRV( excluded, other->meta->combined_exclude ); DUMP_STRV( excluded, other->meta->combined_exclude );
DUMP_STRV( exported, other->meta->combined_export ); DUMP_STRV( exported, other->meta->combined_export );
DUMP_STRV( nowrap, other->meta->combined_nowrap ); DUMP_STRV( nowrap, other->meta->combined_nowrap );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment