X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=gdb%2Fauto-load.c;h=c152778a6b886e4770a5e2af2f35879f4969b189;hb=003ea5a89ab7e9eaa65cb158a953d63dac2612c6;hp=1112ef242f395575eed837a9c388b314078f97df;hpb=a0eaec95753c0f093f5cb80080ef423030d35edd;p=platform%2Fupstream%2Fgdb.git diff --git a/gdb/auto-load.c b/gdb/auto-load.c index 1112ef2..c152778 100644 --- a/gdb/auto-load.c +++ b/gdb/auto-load.c @@ -1,6 +1,6 @@ /* GDB routines for supporting auto-loaded scripts. - Copyright (C) 2012-2014 Free Software Foundation, Inc. + Copyright (C) 2012-2015 Free Software Foundation, Inc. This file is part of GDB. @@ -26,7 +26,6 @@ #include "command.h" #include "observer.h" #include "objfiles.h" -#include "exceptions.h" #include "cli/cli-script.h" #include "gdbcmd.h" #include "cli/cli-cmds.h" @@ -318,6 +317,22 @@ Use 'set auto-load safe-path /' for disabling the auto-load safe-path security.\ auto_load_safe_path_vec_update (); } +/* "add-auto-load-scripts-directory" command for the auto_load_dir configuration + variable. */ + +static void +add_auto_load_dir (char *args, int from_tty) +{ + char *s; + + if (args == NULL || *args == 0) + error (_("Directory argument required.")); + + s = xstrprintf ("%s%c%s", auto_load_dir, DIRNAME_SEPARATOR, args); + xfree (auto_load_dir); + auto_load_dir = s; +} + /* Implementation for filename_is_in_pattern overwriting the caller's FILENAME and PATTERN. */ @@ -1527,6 +1542,15 @@ access the current full list setting."), &cmdlist); set_cmd_completer (cmd, filename_completer); + cmd = add_cmd ("add-auto-load-scripts-directory", class_support, + add_auto_load_dir, + _("Add entries to the list of directories from which to load " + "auto-loaded scripts.\n\ +See the commands 'set auto-load scripts-directory' and\n\ +'show auto-load scripts-directory' to access the current full list setting."), + &cmdlist); + set_cmd_completer (cmd, filename_completer); + add_setshow_boolean_cmd ("auto-load", class_maintenance, &debug_auto_load, _("\ Set auto-load verifications debugging."), _("\