Skip to content
Snippets Groups Projects

Add inspect-library helper

Merged Ludovico de Nittis requested to merge wip/denittis/inspect-library into master
1 file
+ 12
1
Compare changes
  • Side-by-side
  • Inline
+ 12
1
@@ -112,7 +112,17 @@ main (int argc,
printf ("\n ]");
/* Some loaded libraries may be before our handle.
* To list them all we move the pointer at the beginning. */
while (dep_map != NULL && dep_map->l_prev != NULL)
dep_map = dep_map->l_prev;
printf (",\n \"dependencies\": [");
/* Some entries don't have a name. We move the pointer to the
* first element that has one. */
while (dep_map != NULL && strcmp (dep_map->l_name, "") == 0)
dep_map = dep_map->l_next;
if (dep_map != NULL)
{
printf ("\n \"%s\"", dep_map->l_name);
@@ -121,7 +131,8 @@ main (int argc,
for (; dep_map != NULL; dep_map = dep_map->l_next)
{
printf (",\n \"%s\"", dep_map->l_name);
if (strcmp (dep_map->l_name, "") != 0)
printf (",\n \"%s\"", dep_map->l_name);
}
printf ("\n ]\n }");
Loading