2012-02-01 Tristan Gingold <gingold@adacore.com>
authorTristan Gingold <gingold@adacore.com>
Wed, 1 Feb 2012 16:20:51 +0000 (16:20 +0000)
committerTristan Gingold <gingold@adacore.com>
Wed, 1 Feb 2012 16:20:51 +0000 (16:20 +0000)
* libunwind-frame.c (libunwind_load): Display message if dlopen
failed.

gdb/ChangeLog
gdb/libunwind-frame.c

index 055fdd2..de161de 100644 (file)
@@ -1,3 +1,8 @@
+2012-02-01  Tristan Gingold  <gingold@adacore.com>
+
+       * libunwind-frame.c (libunwind_load): Display message if dlopen
+       failed.
+
 2012-02-01  Gary Benson  <gbenson@redhat.com>
 
        * symtab.h (symbol_name_match_p_ftype): New typedef.
index 94449b0..893fe1e 100644 (file)
@@ -508,7 +508,11 @@ libunwind_load (void)
 
   handle = dlopen (LIBUNWIND_SO, RTLD_NOW);
   if (handle == NULL)
-    return 0;
+    {
+      fprintf_unfiltered (gdb_stderr, _("[GDB failed to load %s: %s]\n"),
+                          LIBUNWIND_SO, dlerror ());
+      return 0;
+    }
 
   /* Initialize pointers to the dynamic library functions we will use.  */