Fixed missing binary dependency of `still'.
[debugger.git] / debugger.c
index add07f9..43cb370 100644 (file)
 #include "debugger.h"
 
 
+/* Insert constant delay for before each critical check?  */
 #if 0
 #define USLEEP (1000000 / 2)
 #endif
-#define TIMEOUT_SECS 20
+
+#if 1  /* Standard run.  */
+#define TIMEOUT_SECS 4
+#define LOOPS_MIN 100000
+#else  /* QEMU?  */
 /* LOOPS_MIN is a safety as QEMU clock time sucks.
    100000 is 4s natively and 53s in QEMU.  */
+#define TIMEOUT_SECS 20
 #define LOOPS_MIN 500000
+#endif /* QEMU?  */
 
 
 #define ARRAY_SIZE(a) (sizeof (a) / sizeof ((a)[0]))
@@ -335,8 +342,6 @@ static Dwfl *get_dwfl (struct ps_prochandle *proc_handle)
         || dwfl_report_end (proc_handle->dwfl, NULL, NULL) != 0)
        {
          fprintf (stderr, "dwfl reporting: %m\n");
-         dwfl_end (proc_handle->dwfl);
-         proc_handle->dwfl = NULL;
          abort ();
        }
     }
@@ -455,10 +460,10 @@ static int getmodules_callback (Dwfl_Module *module,
   GElf_Sym sym;
 
   sym_count = dwfl_module_getsymtab (module);
-/* "/usr/lib/debug/lib64/ld-2.4.so.debug"?  */
-#if 0
+  if (sym_count == -1)
+    return DWARF_CB_OK;
   assert (sym_count >= 0);
-#endif
+
   for (ndx = 0; ndx < sym_count; ndx++)
     {
       const char *name_got;