Fixed attaching to commands with invalid shared library symbols count.
[debugger.git] / debugger.c
index cc39e84..43cb370 100644 (file)
@@ -460,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;