From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27403 invoked by alias); 22 Sep 2012 18:37:20 -0000 Received: (qmail 27395 invoked by uid 22791); 22 Sep 2012 18:37:20 -0000 X-SWARE-Spam-Status: No, hits=-3.6 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from server-nat-6.cs.umd.edu (HELO bacon.cs.umd.edu) (128.8.127.149) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 22 Sep 2012 18:37:07 +0000 Received: from [192.168.2.10] (pool-72-83-72-24.washdc.east.verizon.net [72.83.72.24]) (Authenticated sender: khooyp) by bacon.cs.umd.edu (Postfix) with ESMTPSA id 6D718B40B02; Sat, 22 Sep 2012 14:37:03 -0400 (EDT) Subject: Re: [PATCH] Warn about data-directory when failing to import Python "gdb" module Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: multipart/mixed; boundary=Apple-Mail-36-664630207 From: Khoo Yit Phang In-Reply-To: <20120922133033.GA31924@host2.jankratochvil.net> Date: Sat, 22 Sep 2012 18:37:00 -0000 Cc: Khoo Yit Phang , GDB Patches Message-Id: <852B272B-AEEE-49AB-8AFC-C1EAB2B5A1EF@cs.umd.edu> References: <20120917202241.GB4423@host2.jankratochvil.net> <20120917205828.GA28626@adacore.com> <45F70E7D-4B99-49B9-A160-76C0D3B9534F@cs.umd.edu> <20120922133033.GA31924@host2.jankratochvil.net> To: Jan Kratochvil X-CSD-MailScanner-ID: 6D718B40B02.AD859 X-CSD-MailScanner: Found to be clean X-CSD-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-50, required 5, autolearn=not spam, ALL_TRUSTED -50.00) X-CSD-MailScanner-From: khooyp@cs.umd.edu X-CSD-MailScanner-Watermark: 1348943826.0135@tUp1mrnbNnVyMxNULQVIXQ 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/msg00474.txt.bz2 --Apple-Mail-36-664630207 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Content-length: 813 Hi Jan, On Sep 22, 2012, at 9:30 AM, Jan Kratochvil wrote: > -------------------------------------------------------------------------= ----- > Python Exception No module named gdb:=20 >=20 > 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" > -------------------------------------------------------------------------= ----- Thanks for pointing out this style, it looks good to me, and it's nice to b= e consistent. I've updated my patch with it. Yit September 22, 2012 --Apple-Mail-36-664630207 Content-Disposition: attachment; filename=warn-gdb-python-compat.txt Content-Type: text/plain; x-unix-mode=0600; name="warn-gdb-python-compat.txt" Content-Transfer-Encoding: quoted-printable Content-length: 928 gdb/ChangeLog 2012-09-22 Khoo Yit Phang * gdb/python.c (finish_python_initialization): Augment the warning when importing "gdb" fails, to check that data-directory is set correctly. diff --git a/gdb/python/python.c b/gdb/python/python.c --- a/gdb/python/python.c +++ b/gdb/python/python.c @@ -1506,7 +1506,12 @@ gdbpy_print_stack (); warning (_("Could not load the Python gdb module from `%s'."), gdb_pythondir); - warning (_("Limited Python support is available from the _gdb module= .")); + printf_filtered(_("\ +You may need to provide the -data-directory flag to GDB.\n\ +Limited Python support is available from the _gdb module.\n\ +For more information about GDB dependencies on external files\n\ +see the \"Data Files\" section in the GDB manual. E.g., run from the shel= l:\n\ +\tinfo \"(gdb)Data Files\"\n")); do_cleanups (cleanup); return; } --Apple-Mail-36-664630207--