From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12928 invoked by alias); 16 Sep 2002 14:12:27 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 12921 invoked from network); 16 Sep 2002 14:12:26 -0000 Received: from unknown (HELO touchme.toronto.redhat.com) (216.138.202.10) by sources.redhat.com with SMTP; 16 Sep 2002 14:12:26 -0000 Received: from redhat.com (tooth.toronto.redhat.com [172.16.14.29]) by touchme.toronto.redhat.com (Postfix) with ESMTP id B6DC5B8831; Mon, 16 Sep 2002 10:12:25 -0400 (EDT) Message-ID: <3D85E67D.1090702@redhat.com> Date: Mon, 16 Sep 2002 07:12:00 -0000 From: Fernando Nasser Organization: Red Hat Canada User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.0) Gecko/20020607 X-Accept-Language: en-us, en MIME-Version: 1.0 To: George Helffrich +44 117 954 5437 Cc: gdb-patches@sources.redhat.com Subject: Re: [PATCH] Re-posting of patch updated to current release References: <200209160929.g8G9T1C25095@olivine.geology.bristol.ac.uk> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2002-09/txt/msg00306.txt.bz2 As I understand, Eli has already checked and approved the doc changes, so I will check this in when I check George's edit command in. Thanks for updating the patch George. Regards, Fernando George Helffrich +44 117 954 5437 wrote: > All - > > Per maintainer's (F. Nasser) request, here is a re-posting of an approved > patch (2 July 2002, 9 Sep 2002) against the present source release. > > George Helffrich > (george@geology.bristol.ac.uk) > > --- gdb.1.orig Mon Sep 16 10:06:38 2002 > +++ gdb.1 Mon Sep 16 09:47:48 2002 > @@ -1,7 +1,7 @@ > .\" Copyright 1991, 1999 Free Software Foundation, Inc. > .\" See section COPYING for conditions for redistribution > .\" $Id: gdb.1,v 1.4 1999/01/05 00:50:50 jsm Exp $ > -.TH gdb 1 "4nov1991" "GNU Tools" "GNU Tools" > +.TH gdb 1 "22may2002" "GNU Tools" "GNU Tools" > .SH NAME > gdb \- The GNU Debugger > .SH SYNOPSIS > @@ -149,6 +149,12 @@ > .I over\c > \& any > function calls in the line. > +.TP > +.B edit \fR[\|\fIfile\fB:\fR\|]\fIfunction > +look at the program line where it is presently stopped. > +.TP > +.B list \fR[\|\fIfile\fB:\fR\|]\fIfunction > +type the text of the program in the vicinity of where it is presently stopped. > .TP > .B step > Execute next program line (after stopping); step \c > --- doc/gdb.texinfo.orig Mon Sep 16 09:49:36 2002 > +++ doc/gdb.texinfo Mon Sep 16 09:53:52 2002 > @@ -31,7 +31,10 @@ > @set EDITION Ninth > > @c !!set GDB manual's revision date > -@set DATE December 2001 > +@set DATE June 2002 > + > +@c !!set GDB edit command default editor > +@set EDITOR /bin/ex > > @c THIS MANUAL REQUIRES TEXINFO 4.0 OR LATER. > > @@ -3926,7 +3929,10 @@ > > After such a printout, the @code{list} command with no arguments > prints ten lines centered on the point of execution in the frame. > -@xref{List, ,Printing source lines}. > +You can also edit the program at the point of execution with your favorite > +editing program by typing @code{edit}. > +@xref{List, ,Printing source lines}, > +for details. > > @table @code > @kindex down-silently > @@ -4033,6 +4039,7 @@ > > @menu > * List:: Printing source lines > +* Edit:: Editing source files > * Search:: Searching source files > * Source Path:: Specifying source directories > * Machine Code:: Source and machine code > @@ -4154,6 +4161,71 @@ > Specifies the line containing the program address @var{address}. > @var{address} may be any expression. > @end table > + > +@node Edit > +@section Editing source files > +@cindex editing source files > + > +@kindex edit > +@kindex e @r{(@code{edit})} > +To edit the lines in a source file, use the @code{edit} command. > +The editing program of your choice > +is invoked with the current line set to > +the active line in the program. > +Alternatively, there are several ways to specify what part of the file you > +want to print if you want to see other parts of the program. > + > +Here are the forms of the @code{edit} command most commonly used: > + > +@table @code > +@item edit > +Edit the current source file at the active line number in the program. > + > +@item edit @var{number} > +Edit the current source file with @var{number} as the active line number. > + > +@item edit @var{function} > +Edit the file containing @var{function} at the beginning of its definition. > + > +@item edit @var{filename}:@var{number} > +Specifies line @var{number} in the source file @var{filename}. > + > +@item edit @var{filename}:@var{function} > +Specifies the line that begins the body of the > +function @var{function} in the file @var{filename}. You only need the > +file name with a function name to avoid ambiguity when there are > +identically named functions in different source files. > + > +@item edit *@var{address} > +Specifies the line containing the program address @var{address}. > +@var{address} may be any expression. > +@end table > + > +@subsection Choosing your editor > +You can customize @value{GDBN} to use any editor you want > +@footnote{ > +The only restriction is that your editor (say @code{ex}), recognizes the > +following command-line syntax: > +@example > +ex +@var{number} file > +@end example > +The optional numeric value +@var{number} designates the active line in the file. > +}. > +By default, it is @value{EDITOR}, but you can change this by setting the > +environment variable @code{EDITOR} before using > +@value{GDBN}. > +For example, to configure @value{GDBN} to use the @code{vi} editor, you > +could use these commands with the @code{sh} shell: > +@example > +EDITOR=/usr/bin/vi > +export EDITOR > +gdb ... > +@end example > +or in the @code{csh} shell, > +@example > +setenv EDITOR /usr/bin/vi > +gdb ... > +@end example > > @node Search > @section Searching source files > -- Fernando Nasser Red Hat Canada Ltd. E-Mail: fnasser@redhat.com 2323 Yonge Street, Suite #300 Toronto, Ontario M4P 2C9