This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Document how to exit "python-interactive"


Hi,

On Aug 23, 2012, at 12:47 PM, Eli Zaretskii wrote:

>> diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
>> --- a/gdb/doc/gdb.texinfo
>> +++ b/gdb/doc/gdb.texinfo
>> @@ -22515,7 +22515,8 @@
>> @item python-interactive @r{[}@var{command}@r{]}
>> @itemx pi @r{[}@var{command}@r{]}
>> Without an argument, the @code{python-interactive} command can be used
>> -to start an interactive Python prompt.
>> +to start an interactive Python prompt.  To return to @value{GDBN},
>> +type @code{EOF} (e.g., @samp{Ctrl-D}) on an empty prompt.
> 
> I think "type the @code{EOF} character" is better.
> 
> Also, please use @kbd{Ctrl-D}.  Finally, I think "on the empty prompt"
> is redundant (and may even be incorrect -- doesn't it work even on a
> non-empty line?).

Ctrl-D must be on an empty line to signal EOF, at least on Linux and probably other Unix systems. On Windows, EOF is supposed to be Ctrl-Z followed by enter, but I don't know if it needs to be on an empty line. I'll move the "on an empty prompt" into the parentheses to be more accurate.

>> 	   python_interactive_command,
>> #ifdef HAVE_PYTHON
>> 	   _("\
>> -Start a Python interactive prompt.\n\
>> +Start a Python interactive prompt.  To return to GDB, type EOF\n\
> 
> I think the second sentence should begin on a new line.  Don't you get
> that line truncated in "apropos" output?

I hadn't known about "apropos", but the help prints fine since "apropos" appears to print only up to the first period. I'll leave it as is.

If it sounds good, I'll make the changes and check it in.

Thanks!

Yit
August 23, 2012


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]