summaryrefslogtreecommitdiffstats
path: root/gdb
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2012-05-18 17:44:37 +0000
committerJan Kratochvil <jan.kratochvil@redhat.com>2012-05-18 17:44:37 +0000
commitf7bfa992dfca294af54332dc300691f20e184f69 (patch)
tree951c92c57d6c4d8c2887934595631e6770b78689 /gdb
parent3a11e31eb213f0202a02bba88ea39898db36c0b9 (diff)
downloadppe42-binutils-f7bfa992dfca294af54332dc300691f20e184f69.tar.gz
ppe42-binutils-f7bfa992dfca294af54332dc300691f20e184f69.zip
gdb/
* auto-load.c (show_auto_load_safe_path): Accept any combination of DIRNAME_SEPARATOR and IS_DIR_SEPARATOR for wild-match.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/auto-load.c10
2 files changed, 14 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 865b5bf264..7ea7194b88 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2012-05-18 Jan Kratochvil <jan.kratochvil@redhat.com>
+
+ * auto-load.c (show_auto_load_safe_path): Accept any combination of
+ DIRNAME_SEPARATOR and IS_DIR_SEPARATOR for wild-match.
+
2012-05-18 Tom Tromey <tromey@redhat.com>
PR exp/13907:
diff --git a/gdb/auto-load.c b/gdb/auto-load.c
index 5ee117f13d..462ee0609a 100644
--- a/gdb/auto-load.c
+++ b/gdb/auto-load.c
@@ -241,7 +241,15 @@ static void
show_auto_load_safe_path (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
{
- if (strcmp (value, "/") == 0)
+ const char *cs;
+
+ /* Check if user has entered either "/" or for example ":".
+ But while more complicate content like ":/foo" would still also
+ permit any location do not hide those. */
+
+ for (cs = value; *cs && (*cs == DIRNAME_SEPARATOR || IS_DIR_SEPARATOR (*cs));
+ cs++);
+ if (*cs == 0)
fprintf_filtered (file, _("Auto-load files are safe to load from any "
"directory.\n"));
else
OpenPOWER on IntegriCloud