From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25280 invoked by alias); 27 Mar 2013 18:51:16 -0000 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 Received: (qmail 25261 invoked by uid 89); 27 Mar 2013 18:51:09 -0000 X-Spam-SWARE-Status: No, score=-6.2 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_TRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE,RP_MATCHES_RCVD autolearn=ham version=3.3.1 Received: from mail-gh0-f201.google.com (HELO mail-gh0-f201.google.com) (209.85.160.201) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Wed, 27 Mar 2013 18:51:06 +0000 Received: by mail-gh0-f201.google.com with SMTP id r13so377639ghr.4 for ; Wed, 27 Mar 2013 11:51:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:mime-version:content-type:content-transfer-encoding :message-id:date:to:cc:subject:in-reply-to:references:x-mailer :x-gm-message-state; bh=8uGiA89DeukxQk+xkFlYqewwnJgQRF6IDAnssI2Urkk=; b=cmw0oNISN5VIk0K60JljGCb9B6nyJhZCxkbV/lrtFmu8CkQYOufXFJ68NnjqcA8vE8 ZU3JNFXI8Al6My+y3HHd8ivUxgLO2iYfaA/jRp+v1gOSh0Re7hHLI+xOgOTUqrx9Q5ND EBF7W+EZoUmBAZH692/DvaBIhQP5rRbefAuLeD8Yhh9gtWE45Rru1RVlDxxqsrNw5VrF paYF/p2sxmmX6GY0f4wxEigGdd5SMB7yCwhWw32rGZNazst4mFopmNsGgohAz3gIuFck AMO4Qt0CUqctdeUupeCy9iRXlKWzgtgtcZSFKLskEliLD1VEgMyF/JOcHkKmTyAhMHL+ guiw== X-Received: by 10.224.18.132 with SMTP id w4mr12210723qaa.1.1364410264664; Wed, 27 Mar 2013 11:51:04 -0700 (PDT) Received: from corp2gmr1-2.hot.corp.google.com (corp2gmr1-2.hot.corp.google.com [172.24.189.93]) by gmr-mx.google.com with ESMTPS id y8si3545062qcx.0.2013.03.27.11.51.04 (version=TLSv1.1 cipher=AES128-SHA bits=128/128); Wed, 27 Mar 2013 11:51:04 -0700 (PDT) Received: from ruffy2.mtv.corp.google.com (ruffy2.mtv.corp.google.com [172.17.128.107]) by corp2gmr1-2.hot.corp.google.com (Postfix) with ESMTP id 0845D5A403C; Wed, 27 Mar 2013 11:51:03 -0700 (PDT) From: Doug Evans MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <20819.16279.468828.807108@ruffy2.mtv.corp.google.com> Date: Wed, 27 Mar 2013 20:44:00 -0000 To: Tom Tromey Cc: gdb-patches@sourceware.org Subject: Re: [RFA, RFA 7.6] Improve help for, e.g., running gdb in build tree. In-Reply-To: <87y5d8elic.fsf@fleche.redhat.com> References: <87y5d8elic.fsf@fleche.redhat.com> X-Gm-Message-State: ALoCoQklTrTtCQVOoE3EuIN4heF11leomlKgC5ntfxRyRLLJ3Hc9+4BrSV/KV5n4/BKzDFhDIEyUks3KOLfbIGs20UBYqTFMbKwdUKddwNiVmmDCyR6RIvrRAxiTR2x31sjdU6XQc1p/7KdCt21MEuKiEiYCuA3Oh3jiQKEbRgvYoB1kYoUnmGkaKoLwISvQsBPkJm4yz+UusbW46FqWLoY45IT3RxynuQ== X-SW-Source: 2013-03/txt/msg01034.txt.bz2 Tom Tromey writes: > >>>>> "Doug" == Doug Evans writes: > > Doug> 2013-03-27 Doug Evans > Doug> * python/python.c (finish_python_initialization): Provide suggestion > Doug> for how to tell gdb to find its python files. > > It looks reasonable to me. > > Tom This is a minor improvement. I think the output is more readable. E.g. @ruffy2:gdb$ ./gdb Python Exception No module named gdb: warning: Could not load the Python gdb module from `/usr/share/fsf-gdb/python'. warning: Limited Python support is available from the _gdb module. warning: Suggest passing --data-directory=/path/to/gdb/data-directory. GNU gdb (GDB) 7.5.91.20130321-cvs Copyright (C) 2013 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-linux". For bug reporting instructions, please see: . (gdb) q becomes: @ruffy2:gdb$ ./gdb Python Exception No module named gdb: warning: Could not load the Python gdb module from `/usr/share/fsf-gdb/python'. Limited Python support is available from the _gdb module. Suggest passing --data-directory=/path/to/gdb/data-directory. GNU gdb (GDB) 7.5.91.20130321-cvs Copyright (C) 2013 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-linux". For bug reporting instructions, please see: . (gdb) q Ok? 2013-03-27 Doug Evans * python/python.c (finish_python_initialization): Provide suggestion for how to tell gdb to find its python files. Index: python.c =================================================================== RCS file: /cvs/src/src/gdb/python/python.c,v retrieving revision 1.111 diff -u -p -r1.111 python.c --- python.c 12 Mar 2013 17:39:45 -0000 1.111 +++ python.c 27 Mar 2013 18:48:40 -0000 @@ -1711,9 +1711,13 @@ finish_python_initialization (void) if (gdb_python_module == NULL) { gdbpy_print_stack (); - warning (_("Could not load the Python gdb module from `%s'."), + /* This is passed in one call to warning so that blank lines aren't + inserted between each line of text. */ + warning (_("\n" + "Could not load the Python gdb module from `%s'.\n" + "Limited Python support is available from the _gdb module.\n" + "Suggest passing --data-directory=/path/to/gdb/data-directory.\n"), gdb_pythondir); - warning (_("Limited Python support is available from the _gdb module.")); do_cleanups (cleanup); return; }