From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: Pedro Alves <palves@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: [patch] Cosmetic fix 'show auto-load safe-path' for ":" [Re: [patch 1/2] Provide $ddir substitution for --with-auto-load-safe-path]
Date: Fri, 11 May 2012 20:28:00 -0000 [thread overview]
Message-ID: <20120511202807.GA4333@host2.jankratochvil.net> (raw)
In-Reply-To: <20120511193353.GA23461@host2.jankratochvil.net>
On Fri, 11 May 2012 21:33:53 +0200, Jan Kratochvil wrote:
> On Fri, 11 May 2012 21:14:47 +0200, Pedro Alves wrote:
> > Looks like there is some special casing somewhere:
>
> True, I forgot and I agree. But it is only this "cosmetic" message, it has no
> functionality effect. I can fix this "any directory" message conditional.
Regards,
Jan
gdb/
2012-05-11 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.
diff --git a/gdb/auto-load.c b/gdb/auto-load.c
index 5ee117f..462ee06 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
next prev parent reply other threads:[~2012-05-11 20:28 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-09 15:47 [patch 1/2] Provide $ddir substitution for --with-auto-load-safe-path Jan Kratochvil
2012-05-09 17:43 ` Eli Zaretskii
2012-05-09 18:17 ` [obv doc] Fix too wide @smallexample [Re: [patch 1/2] Provide $ddir substitution for --with-auto-load-safe-path] Jan Kratochvil
2012-05-09 18:48 ` Eli Zaretskii
2012-05-09 18:59 ` [patch 1/2] Provide $ddir substitution for --with-auto-load-safe-path Jan Kratochvil
2012-05-09 20:08 ` Joel Brobecker
2012-05-11 16:46 ` Jan Kratochvil
2012-05-11 17:29 ` Joel Brobecker
2012-05-11 18:15 ` Jan Kratochvil
2012-05-11 18:13 ` Pedro Alves
2012-05-11 18:17 ` Jan Kratochvil
2012-05-11 18:59 ` Pedro Alves
2012-05-11 19:05 ` Jan Kratochvil
2012-05-11 19:15 ` Pedro Alves
2012-05-11 19:34 ` Jan Kratochvil
2012-05-11 20:28 ` Jan Kratochvil [this message]
2012-05-18 17:45 ` [commit] [patch] Cosmetic fix 'show auto-load safe-path' for ":" Jan Kratochvil
2012-05-11 18:19 ` [patch 1/2] Provide $ddir substitution for --with-auto-load-safe-path Joel Brobecker
2012-05-11 18:30 ` Jan Kratochvil
2012-05-11 19:38 ` Joel Brobecker
2012-05-11 19:54 ` Jan Kratochvil
2012-05-14 14:50 ` Joel Brobecker
2012-05-14 14:57 ` Jan Kratochvil
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120511202807.GA4333@host2.jankratochvil.net \
--to=jan.kratochvil@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=palves@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox