From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21208 invoked by alias); 22 Sep 2012 13:30:59 -0000 Received: (qmail 21199 invoked by uid 22791); 22 Sep 2012 13:30:58 -0000 X-SWARE-Spam-Status: No, hits=-6.6 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 22 Sep 2012 13:30:42 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q8MDUdd7017207 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sat, 22 Sep 2012 09:30:39 -0400 Received: from host2.jankratochvil.net (ovpn-113-58.phx2.redhat.com [10.3.113.58]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q8MDUYaJ019481 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Sat, 22 Sep 2012 09:30:37 -0400 Date: Sat, 22 Sep 2012 13:30:00 -0000 From: Jan Kratochvil To: Khoo Yit Phang Cc: Joel Brobecker , GDB Patches Subject: Re: [PATCH] Warn about data-directory when failing to import Python "gdb" module Message-ID: <20120922133033.GA31924@host2.jankratochvil.net> References: <20120917202241.GB4423@host2.jankratochvil.net> <20120917205828.GA28626@adacore.com> <45F70E7D-4B99-49B9-A160-76C0D3B9534F@cs.umd.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <45F70E7D-4B99-49B9-A160-76C0D3B9534F@cs.umd.edu> User-Agent: Mutt/1.5.21 (2010-09-15) 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-09/txt/msg00469.txt.bz2 On Tue, 18 Sep 2012 22:39:51 +0200, Khoo Yit Phang wrote: > I'd still like to add this warning: even with the data-directory patch > I just posted, it is still possible for this issue to occur, e.g., due to > a bad install. Some minor fixes: > > GDB is unable to find its auxiliary files. You may need to provide the > -data-directory flag to GDB (please refer to the manual for details). There has been already discussion about how to reference the GDB manual and the checked in variant is: ------------------------------------------------------------------------------ commit 86635be5fbe89ff6c300de47fac5a70bf01486c1 To enable execution of this file add add-auto-load-safe-path /home/jkratoch/redhat/gdb-clean/gdb/gdb-gdb.gdb line to your configuration file "/home/jkratoch/.gdbinit". To completely disable this security protection add set auto-load safe-path / line to your configuration file "/home/jkratoch/.gdbinit". For more information about this security protection see the "Auto-loading safe path" section in the GDB manual. E.g., run from the shell: info "(gdb)Auto-loading safe path" ------------------------------------------------------------------------------ I find the proposed message "GDB is unable to find its auxiliary files." redundant to the already printed: warning: Could not load the Python gdb module from `dfasdfsa/python'. I would also change the second warning -> printf_filtered as it will then no longer insert so many empty lines there. In the end the output could be: ------------------------------------------------------------------------------ Python Exception No module named gdb: warning: Could not load the Python gdb module from `dfasdfsa/python'. You may need to provide the -data-directory flag to GDB. Limited Python support is available from the _gdb module. For more information about GDB dependencies on external files see the "Data Files" section in the GDB manual. E.g., run from the shell: info "(gdb)Data Files" ------------------------------------------------------------------------------ Do you agree or would you like to make more adjustments to the text? Thanks, Jan