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

utils: Add a debug category for the command-line tools

parent d8d63e80
No related branches found
No related tags found
1 merge request!311Build capsule-capture-libs from a bundled copy of libcapsule
......@@ -29,6 +29,7 @@ enum
DEBUG_RELOCS = 0x1 << 6,
DEBUG_ELF = 0x1 << 7,
DEBUG_DLFUNC = 0x1 << 8,
DEBUG_TOOL = 0x1 << 9,
DEBUG_ALL = 0xffff,
};
......
......@@ -266,6 +266,7 @@ void set_debug_flags (const char *control)
if( strstr( control, "reloc" ) ) debug_flags |= DEBUG_RELOCS;
if( strstr( control, "elf" ) ) debug_flags |= DEBUG_ELF;
if( strstr( control, "dlfunc" ) ) debug_flags |= DEBUG_DLFUNC;
if( strstr( control, "tool" ) ) debug_flags |= DEBUG_TOOL;
if( strstr( control, "all" ) ) debug_flags |= DEBUG_ALL;
if( !debug_flags )
......@@ -280,7 +281,8 @@ void set_debug_flags (const char *control)
" wrappers: %c # function wrappers installed in the capsule" "\n"
" reloc : %c # patching capsule symbols into external DSOs" "\n"
" dlfunc : %c # special handling of dlopen/dlsym calls" "\n"
" elf : %c # detailed ELF introspection logging" "\n",
" elf : %c # detailed ELF introspection logging" "\n"
" tool : %c # command-line tools" "\n",
(debug_flags & DEBUG_PATH ) ? 'Y' : 'n' ,
(debug_flags & DEBUG_SEARCH ) ? 'Y' : 'n' ,
(debug_flags & DEBUG_LDCACHE ) ? 'Y' : 'n' ,
......@@ -289,7 +291,8 @@ void set_debug_flags (const char *control)
(debug_flags & DEBUG_WRAPPERS) ? 'Y' : 'n' ,
(debug_flags & DEBUG_RELOCS ) ? 'Y' : 'n' ,
(debug_flags & DEBUG_DLFUNC ) ? 'Y' : 'n' ,
(debug_flags & DEBUG_ELF ) ? 'Y' : 'n' );
(debug_flags & DEBUG_ELF ) ? 'Y' : 'n' ,
(debug_flags & DEBUG_TOOL ) ? 'Y' : 'n' );
}
// soname: bare libfoo.so.X style name
......
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