From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26895 invoked by alias); 28 Jun 2010 18:57:26 -0000 Received: (qmail 26801 invoked by uid 22791); 28 Jun 2010 18:57:24 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 28 Jun 2010 18:57:19 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 05EF42BAB65; Mon, 28 Jun 2010 14:57:18 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id CLQJMx37yMQ6; Mon, 28 Jun 2010 14:57:17 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id C13C12BAB43; Mon, 28 Jun 2010 14:57:17 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id A72D2F5895; Mon, 28 Jun 2010 11:57:14 -0700 (PDT) Date: Mon, 28 Jun 2010 18:57:00 -0000 From: Joel Brobecker To: Eli Zaretskii Cc: gdb-patches@sourceware.org Subject: Re: [RFA/doco] Document the GDB python directory. Message-ID: <20100628185714.GO2595@adacore.com> References: <1277662486-2260-1-git-send-email-brobecker@adacore.com> <83zkygb7ef.fsf@gnu.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="bCsyhTFzCvuiizWE" Content-Disposition: inline In-Reply-To: <83zkygb7ef.fsf@gnu.org> User-Agent: Mutt/1.5.20 (2009-06-14) 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: 2010-06/txt/msg00647.txt.bz2 --bCsyhTFzCvuiizWE Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-length: 213 > Yes, but please add to the NEWS entry a pointer to the section in the > manual where the details are. Thanks. Would the following be the correct way of adding that reference in the NEWS file? Thanks, -- Joel --bCsyhTFzCvuiizWE Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="pythondir-doco-2.diff" Content-length: 2664 commit 919edacf2281a00e3900fbd92421be88e53445aa Author: Joel Brobecker Date: Sun Jun 27 10:58:40 2010 -0700 Document the GDB python directory. 2010-06-27 Joel Brobecker * NEWS: Add entry announcing the python directory. 2010-06-27 Joel Brobecker * gdb.texinfo (Python): Document what the python directory is and what its location is. (Basic Python): Document the gdb.PYTHONDIR constant. diff --git a/gdb/NEWS b/gdb/NEWS index 1e1ea39..9fa2af5 100644 --- a/gdb/NEWS +++ b/gdb/NEWS @@ -103,6 +103,12 @@ is now deprecated. * Python scripting +** GDB now provides a new directory location, called the python directory, + where Python scripts written for GDB can be installed. The location + of that directory is /python, where + is the GDB data directory. For more details, see the `Debugging with + GDB' manual, section `Scripting GDB using Python'. + ** The GDB Python API now has access to breakpoints, symbols, symbol tables, program spaces, and frame's code blocks. Additionally, GDB Parameters can now be created from the API, and manipulated via diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index cbd636f..d0e5a39 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -20089,6 +20089,13 @@ You can script @value{GDBN} using the @uref{http://www.python.org/, Python programming language}. This feature is available only if @value{GDBN} was configured using @option{--with-python}. +@cindex python directory +Python scripts used by @value{GDBN} should be installed in +@file{@var{data-directory}/python}, where @var{data-directory} is +the data directory as determined at @value{GDBN} startup (@pxref{Data Files}). This directory, known as the @dfn{python directory}, +is automatically added to the Python Search Path in order to allow +the Python interpreter to locate all scripts installed at this location. + @menu * Python Commands:: Accessing Python from @value{GDBN}. * Python API:: Accessing @value{GDBN} from Python. @@ -20199,6 +20206,11 @@ methods and classes added by @value{GDBN} are placed in this module. @value{GDBN} automatically @code{import}s the @code{gdb} module for use in all scripts evaluated by the @code{python} command. +@findex gdb.PYTHONDIR +@defvar PYTHONDIR +A string containing the python directory (@pxref{Python}). +@end defvar + @findex gdb.execute @defun execute command [from_tty] Evaluate @var{command}, a string, as a @value{GDBN} CLI command. --bCsyhTFzCvuiizWE--