int Util_CompareDotted(const char *s1, const char *s2);
-#if defined(__linux__)
-void Util_PrintLoadedObjects(void *addr_inside_exec);
-#endif
-
#if defined(VMX86_STATS)
Bool Util_QueryCStResidency(uint32 *numCpus, uint32 *numCStates,
uint64 **transitns, uint64 **residency,
#endif /* !defined(N_PLAT_NLM) */
-#if defined (__linux__) && !defined(VMX86_TOOLS)
-/*
- *-----------------------------------------------------------------------------
- *
- * UtilPrintLoadedObjectsCallback --
- *
- * Callback from dl_iterate_phdr to add info for a single
- * loaded object to the log.
- *
- * Results:
- * 0: continue iterating/success
- * non-zero: stop iterating/error
- *
- * Side effects:
- * None.
- *
- *-----------------------------------------------------------------------------
- */
-
-static int
-UtilPrintLoadedObjectsCallback(struct dl_phdr_info *info, //IN
- size_t size, //IN
- void *data) //IN
-{
- /* Blank name means things like stack, which we don't care about */
- if (strcmp(info->dlpi_name, "")) {
- Log("Object %s loaded at %p\n", info->dlpi_name,
- (void *)info->dlpi_addr);
- }
- return 0;
-}
-
-
-/*
- *----------------------------------------------------------------------
- *
- * Util_PrintLoadedObjects --
- *
- * Print the list of loaded objects to the log. Useful in
- * parsing backtraces with ASLR.
- *
- * Results:
- *
- * void
- *
- * Side effects:
- * None.
- *
- *----------------------------------------------------------------------
- */
-
-void
-Util_PrintLoadedObjects(void *addr_inside_exec)
-{
- Dl_info dli;
-
- Log("Printing loaded objects\n");
- if (dladdr(addr_inside_exec, &dli)) {
- Log("Object %s loaded at %p\n", dli.dli_fname,
- (void *)dli.dli_fbase);
- }
- dl_iterate_phdr(UtilPrintLoadedObjectsCallback, NULL);
- Log("End printing loaded objects\n");
-}
-#endif
-
#if !defined(_WIN32) && !defined(N_PLAT_NLM)
/*