Rename "maint set python auto-load" to "set auto-load-scripts".
* NEWS: Mention it. * python/py-auto-load.c (auto_load_scripts): Renamed from gdbpy_auto_load. (load_auto_scripts_for_objfile): Update. (gdbpy_initialize_auto_load): Rename "maint set python auto-load" to "set auto-load-scripts". doc/ * gdb.texinfo (Startup): Document auto-loading of scripts during startup. (Auto-loading): Delete "maint set python auto-load on|off". Add "set auto-load-scripts on|off".
This commit is contained in:
parent
2fbb4320ca
commit
a86caf66bb
5 changed files with 64 additions and 19 deletions
|
@ -1,3 +1,13 @@
|
||||||
|
2010-12-15 Doug Evans <dje@google.com>
|
||||||
|
|
||||||
|
Rename "maint set python auto-load" to "set auto-load-scripts".
|
||||||
|
* NEWS: Mention it.
|
||||||
|
* python/py-auto-load.c (auto_load_scripts): Renamed from
|
||||||
|
gdbpy_auto_load.
|
||||||
|
(load_auto_scripts_for_objfile): Update.
|
||||||
|
(gdbpy_initialize_auto_load): Rename "maint set python auto-load" to
|
||||||
|
"set auto-load-scripts".
|
||||||
|
|
||||||
2010-12-14 Kevin Buettner <kevinb@redhat.com>
|
2010-12-14 Kevin Buettner <kevinb@redhat.com>
|
||||||
|
|
||||||
* mips-tdep.c (mips_eabi_push_dummy_call): Place signed, rather
|
* mips-tdep.c (mips_eabi_push_dummy_call): Place signed, rather
|
||||||
|
|
3
gdb/NEWS
3
gdb/NEWS
|
@ -8,6 +8,9 @@
|
||||||
-data-directory DIR Specify DIR as the "data-directory".
|
-data-directory DIR Specify DIR as the "data-directory".
|
||||||
This is mostly for testing purposes.
|
This is mostly for testing purposes.
|
||||||
|
|
||||||
|
* The "maint set python auto-load on|off" command has been renamed to
|
||||||
|
"set auto-load-scripts on|off".
|
||||||
|
|
||||||
* GDB has a new command: "set directories".
|
* GDB has a new command: "set directories".
|
||||||
It is like the "dir" command except that it replaces the
|
It is like the "dir" command except that it replaces the
|
||||||
source path list instead of augmenting it.
|
source path list instead of augmenting it.
|
||||||
|
|
|
@ -1,3 +1,10 @@
|
||||||
|
2010-12-15 Doug Evans <dje@google.com>
|
||||||
|
|
||||||
|
* gdb.texinfo (Startup): Document auto-loading of scripts during
|
||||||
|
startup.
|
||||||
|
(Auto-loading): Delete "maint set python auto-load on|off".
|
||||||
|
Add "set auto-load-scripts on|off".
|
||||||
|
|
||||||
2010-12-07 Doug Evans <dje@google.com>
|
2010-12-07 Doug Evans <dje@google.com>
|
||||||
|
|
||||||
* gdb.texinfo (Mode Options): Document -data-directory.
|
* gdb.texinfo (Mode Options): Document -data-directory.
|
||||||
|
|
|
@ -1262,6 +1262,25 @@ init file, one generic in your home directory, and another, specific
|
||||||
to the program you are debugging, in the directory where you invoke
|
to the program you are debugging, in the directory where you invoke
|
||||||
@value{GDBN}.
|
@value{GDBN}.
|
||||||
|
|
||||||
|
@item
|
||||||
|
If the command line specified a program to debug, or a process to
|
||||||
|
attach to, or a core file, @value{GDBN} loads any auto-loaded
|
||||||
|
scripts provided for the program or for its loaded shared libraries.
|
||||||
|
@xref{Auto-loading}.
|
||||||
|
|
||||||
|
If you wish to disable the auto-loading during startup,
|
||||||
|
you must do something like the following:
|
||||||
|
|
||||||
|
@smallexample
|
||||||
|
$ gdb -ex "set auto-load-scripts off" -ex "file myprogram"
|
||||||
|
@end smallexample
|
||||||
|
|
||||||
|
The following does not work because the auto-loading is turned off too late:
|
||||||
|
|
||||||
|
@smallexample
|
||||||
|
$ gdb -ex "set auto-load-scripts off" myprogram
|
||||||
|
@end smallexample
|
||||||
|
|
||||||
@item
|
@item
|
||||||
Reads command files specified by the @samp{-x} option. @xref{Command
|
Reads command files specified by the @samp{-x} option. @xref{Command
|
||||||
Files}, for more details about @value{GDBN} command files.
|
Files}, for more details about @value{GDBN} command files.
|
||||||
|
@ -23114,13 +23133,13 @@ debugging commands and scripts.
|
||||||
Auto-loading can be enabled or disabled.
|
Auto-loading can be enabled or disabled.
|
||||||
|
|
||||||
@table @code
|
@table @code
|
||||||
@kindex maint set python auto-load
|
@kindex set auto-load-scripts
|
||||||
@item maint set python auto-load [yes|no]
|
@item set auto-load-scripts [yes|no]
|
||||||
Enable or disable the Python auto-loading feature.
|
Enable or disable the auto-loading of Python scripts.
|
||||||
|
|
||||||
@kindex maint show python auto-load
|
@kindex show auto-load-scripts
|
||||||
@item maint show python auto-load
|
@item show auto-load-scripts
|
||||||
Show whether Python auto-loading is enabled or disabled.
|
Show whether auto-loading of Python scripts is enabled or disabled.
|
||||||
@end table
|
@end table
|
||||||
|
|
||||||
When reading an auto-loaded file, @value{GDBN} sets the
|
When reading an auto-loaded file, @value{GDBN} sets the
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
This is true if we should auto-load python code when an objfile is opened,
|
This is true if we should auto-load python code when an objfile is opened,
|
||||||
false otherwise.
|
false otherwise.
|
||||||
|
|
||||||
Both gdbpy_auto_load && gdbpy_global_auto_load must be true to enable
|
Both auto_load_scripts && gdbpy_global_auto_load must be true to enable
|
||||||
auto-loading.
|
auto-loading.
|
||||||
|
|
||||||
This flag exists to facilitate deferring auto-loading during start-up
|
This flag exists to facilitate deferring auto-loading during start-up
|
||||||
|
@ -82,10 +82,15 @@ struct loaded_script_entry
|
||||||
};
|
};
|
||||||
|
|
||||||
/* User-settable option to enable/disable auto-loading:
|
/* User-settable option to enable/disable auto-loading:
|
||||||
maint set python auto-load on|off
|
set auto-load-scripts on|off
|
||||||
This is true if we should auto-load python code when an objfile is opened,
|
This is true if we should auto-load associated scripts when an objfile
|
||||||
false otherwise. */
|
is opened, false otherwise.
|
||||||
static int gdbpy_auto_load = 1;
|
At the moment, this only affects python scripts, but there's no reason
|
||||||
|
one couldn't also have other kinds of auto-loaded scripts, and there's
|
||||||
|
no reason to have them each controlled by a separate flag.
|
||||||
|
So we elide "python" from the name here and in the option.
|
||||||
|
The fact that it lives here is just an implementation detail. */
|
||||||
|
static int auto_load_scripts = 1;
|
||||||
|
|
||||||
/* Per-program-space data key. */
|
/* Per-program-space data key. */
|
||||||
static const struct program_space_data *auto_load_pspace_data;
|
static const struct program_space_data *auto_load_pspace_data;
|
||||||
|
@ -404,7 +409,7 @@ auto_load_new_objfile (struct objfile *objfile)
|
||||||
void
|
void
|
||||||
load_auto_scripts_for_objfile (struct objfile *objfile)
|
load_auto_scripts_for_objfile (struct objfile *objfile)
|
||||||
{
|
{
|
||||||
if (gdbpy_auto_load && gdbpy_global_auto_load)
|
if (auto_load_scripts && gdbpy_global_auto_load)
|
||||||
{
|
{
|
||||||
auto_load_objfile_script (objfile, GDBPY_AUTO_FILE_NAME);
|
auto_load_objfile_script (objfile, GDBPY_AUTO_FILE_NAME);
|
||||||
auto_load_section_scripts (objfile, GDBPY_AUTO_SECTION_NAME);
|
auto_load_section_scripts (objfile, GDBPY_AUTO_SECTION_NAME);
|
||||||
|
@ -471,14 +476,15 @@ gdbpy_initialize_auto_load (void)
|
||||||
|
|
||||||
observer_attach_new_objfile (auto_load_new_objfile);
|
observer_attach_new_objfile (auto_load_new_objfile);
|
||||||
|
|
||||||
add_setshow_boolean_cmd ("auto-load", class_maintenance,
|
add_setshow_boolean_cmd ("auto-load-scripts", class_support,
|
||||||
&gdbpy_auto_load, _("\
|
&auto_load_scripts, _("\
|
||||||
Enable or disable auto-loading of Python code when an object is opened."), _("\
|
Set the debugger's behaviour regarding auto-loaded scripts."), _("\
|
||||||
Show whether Python code will be auto-loaded when an object is opened."), _("\
|
Show the debugger's behaviour regarding auto-loaded scripts."), _("\
|
||||||
Enables or disables auto-loading of Python code when an object is opened."),
|
If enabled, auto-loaded scripts are loaded when the debugger reads\n\
|
||||||
|
an executable or shared library."),
|
||||||
NULL, NULL,
|
NULL, NULL,
|
||||||
&set_python_list,
|
&setlist,
|
||||||
&show_python_list);
|
&showlist);
|
||||||
|
|
||||||
add_cmd ("section-scripts", class_maintenance, maintenance_print_section_scripts,
|
add_cmd ("section-scripts", class_maintenance, maintenance_print_section_scripts,
|
||||||
_("Print dump of auto-loaded section scripts matching REGEXP."),
|
_("Print dump of auto-loaded section scripts matching REGEXP."),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue