Back to index

lightning-sunbird  0.9+nobinonly
Functions
ShowLibs.cpp File Reference
#include <stdio.h>
#include <dlfcn.h>

Go to the source code of this file.

Functions

static void ShowLibs (struct r_debug *rd)
int main (int argc, char **argv)
 The Xalan testcases app.

Function Documentation

int main ( int  argc,
char **  argv 
)

The Xalan testcases app.

Definition at line 56 of file ShowLibs.cpp.

{
  void* h = dlopen("/usr/X11R6/lib/libX11.so", RTLD_LAZY);
#ifdef linux
  printf("Direct r_debug libs:\n");
  ShowLibs(&_r_debug);

  printf("_DYNAMICE r_debug libs:\n");
  ElfW(Dyn)* dp;
  for (dp = _DYNAMIC; dp->d_tag != DT_NULL; dp++) {
    if (dp->d_tag == DT_DEBUG) {
      struct r_debug* rd = (struct r_debug*) dp->d_un.d_ptr;
      ShowLibs(rd);
    }
  }
#endif
  return 0;
}

Here is the call graph for this function:

static void ShowLibs ( struct r_debug *  rd) [static]

Definition at line 46 of file ShowLibs.cpp.

{
  link_map* map = rd->r_map;
  while (NULL != map) {
    printf("addr=%08x name=%s prev=%p next=%p\n", map->l_addr, map->l_name,
          map->l_prev, map->l_next);
    map = map->l_next;
  }
}

Here is the caller graph for this function: