From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29632 invoked by alias); 1 Feb 2012 14:06:44 -0000 Received: (qmail 29618 invoked by uid 22791); 1 Feb 2012 14:06:42 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from mel.act-europe.fr (HELO mel.act-europe.fr) (194.98.77.210) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 01 Feb 2012 14:06:29 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id A618D290050 for ; Wed, 1 Feb 2012 15:06:29 +0100 (CET) Received: from mel.act-europe.fr ([127.0.0.1]) by localhost (smtp.eu.adacore.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id C8SbLQQTlDjm for ; Wed, 1 Feb 2012 15:06:29 +0100 (CET) Received: from ulanbator.act-europe.fr (ulanbator.act-europe.fr [10.10.1.67]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mel.act-europe.fr (Postfix) with ESMTP id 9484629004D for ; Wed, 1 Feb 2012 15:06:29 +0100 (CET) From: Tristan Gingold Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Subject: RFA: display an error message if libunwind-XX cannot be load Date: Wed, 01 Feb 2012 14:06:00 -0000 Message-Id: <01BDAEC2-6805-4E7B-A0E6-5D728B0158DA@adacore.com> To: "gdb-patches@sourceware.org ml" Mime-Version: 1.0 (Apple Message framework v1251.1) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2012-02/txt/msg00007.txt.bz2 Hi, no message was reported if libunwind cannot be loaded, which serially impai= rs debugging. Hence this patchlet to fill the gap. The message is not highly user friendly (it appears before the banner), but= this is not unlike sol-thread.c I haven't handle the case where a symbol couldn't be resolved, but in pract= ice this happens less frequently. Ok for trunk ? Manually tested only. Tristan. 2012-02-01 Tristan Gingold * libunwind-frame.c (libunwind_load): Display message if dlopen failed. diff --git a/gdb/libunwind-frame.c b/gdb/libunwind-frame.c index 53ce1e2..360a28e 100644 --- a/gdb/libunwind-frame.c +++ b/gdb/libunwind-frame.c @@ -509,7 +509,11 @@ libunwind_load (void) =20 handle =3D dlopen (LIBUNWIND_SO, RTLD_NOW); if (handle =3D=3D NULL) - return 0; + { + fprintf_unfiltered (gdb_stderr, "\ +[GDB failed to load %s: %s]\n", LIBUNWIND_SO, dlerror ()); + return 0; + } =20 /* Initialize pointers to the dynamic library functions we will use. */ =20