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: [patch, doc RFA] New command-line option -na.


> Date: Fri, 10 Dec 2010 16:47:34 -0800 (PST)
> From: dje@google.com (Doug Evans)
> 
> This patch adds a new command-line option, -na, to disable auto-loading.

Thanks.

> --- NEWS	10 Dec 2010 20:33:44 -0000	1.414
> +++ NEWS	11 Dec 2010 00:23:22 -0000
> @@ -8,6 +8,11 @@
>  -data-directory DIR	Specify DIR as the "data-directory".
>  			This is mostly for testing purposes.
>  
> +-na			Disable the loading of auto-loaded scripts.
> +
> +* The "maint set python auto-load on|off" command has been renamed to
> +  "set auto-load-scripts on|off".
> +

This part is okay.

>    fputs_unfiltered (gdbinit, stream);
>    fputs_unfiltered (_(" file.\n\
> +  --na		     Do not auto-load scripts provided by the program.\n\
>    --quiet            Do not print version number on startup.\n\
>    --readnow          Fully read symbol files on first access.\n\

You used TABs, the other lines use spaces, so the options might not
align.

> +Enable or disable auto-loading of scripts when an object is opened."), _("\

The "object" part makes this doc strings less useful than it could be.
What "objects" are we talking about here?  I think these are
executable program files and shared libraries, is that true?  (Yes, I
know the original doc string used that, but it was an obscure maint
command back then.)

> +@item -na
> +@cindex @code{--na}
> +Do not auto-load scripts provided by the program.

Same here: "provided by the program" how?  Yes, I know that the
cross-referenced node explains that in detail, but I would like us to
have here something that won't require every reader to go there in
order to understand.  For example:

  Do not auto-load scripts when programs or shared libraries are
  loaded.

> +Loads any auto-loaded scripts provided by the program being debugged.
> +@xref{Auto-loading}.

In addition to the same rewording as above, this sounds inaccurate:
aren't these scripts loaded only as part of loading the debuggee's
executable file?  If so, we should mention that here, because (AFAIU),
invoking GDB without any program as the argument won't trigger any
auto-loading.

>  @table @code
> -@kindex maint set python auto-load
> -@item maint set python auto-load [yes|no]
> -Enable or disable the Python auto-loading feature.
> -
> -@kindex maint show python auto-load
> -@item maint show python auto-load
> -Show whether Python auto-loading is enabled or disabled.
> +@kindex set auto-load
> +@item set auto-load [yes|no]
> +Enable or disable the auto-loading of scripts.
> +
> +@kindex show auto-load
> +@item show auto-load
> +Show whether auto-loading is enabled or disabled.
>  @end table

If we are going to leave this section inside the Python chapter, then
we should say "auto-load Python scripts" etc. elsewhere, because this
feature is limited to loading Python scripts, right?

Thanks.


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