public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug build/18898] New: Cannot specify non-default list of directories as argument of --with-auto-load-dir on Windows
@ 2015-08-29 12:57 eliz at gnu dot org
2015-08-29 13:06 ` [Bug build/18898] " jan.kratochvil at redhat dot com
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: eliz at gnu dot org @ 2015-08-29 12:57 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=18898
Bug ID: 18898
Summary: Cannot specify non-default list of directories as
argument of --with-auto-load-dir on Windows
Product: gdb
Version: 7.10
Status: NEW
Severity: normal
Priority: P2
Component: build
Assignee: unassigned at sourceware dot org
Reporter: eliz at gnu dot org
Target Milestone: ---
An attempt to specify on MS-Windows non-default values for the GDB
configure-time options --with-auto-load-dir and --with-auto-load-safe-path
fails because everything after the first semi-colon is removed.
The semi-colon ';' is the directory separator character in PATH-style lists of
directories on MS-Windows. However, using it in the argument to these two
configure-time options, for example:
--with-auto-load-safe-path='$debugdir;$datadir/../auto-load'
causes this to be written to gdb/config.h:
#define AUTO_LOAD_SAFE_PATH "$debugdir"
where everything beyond the first semi-colon was removed, even though the whole
argument was quoted with '..', as shown above.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug build/18898] Cannot specify non-default list of directories as argument of --with-auto-load-dir on Windows
2015-08-29 12:57 [Bug build/18898] New: Cannot specify non-default list of directories as argument of --with-auto-load-dir on Windows eliz at gnu dot org
@ 2015-08-29 13:06 ` jan.kratochvil at redhat dot com
2023-10-26 11:55 ` eliz at gnu dot org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: jan.kratochvil at redhat dot com @ 2015-08-29 13:06 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=18898
Jan Kratochvil <jan.kratochvil at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jan.kratochvil at redhat dot com
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug build/18898] Cannot specify non-default list of directories as argument of --with-auto-load-dir on Windows
2015-08-29 12:57 [Bug build/18898] New: Cannot specify non-default list of directories as argument of --with-auto-load-dir on Windows eliz at gnu dot org
2015-08-29 13:06 ` [Bug build/18898] " jan.kratochvil at redhat dot com
@ 2023-10-26 11:55 ` eliz at gnu dot org
2023-10-27 0:07 ` thiago.bauermann at linaro dot org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: eliz at gnu dot org @ 2023-10-26 11:55 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=18898
--- Comment #1 from Eli Zaretskii <eliz at gnu dot org> ---
In https://sourceware.org/pipermail/gdb-patches/2023-October/203020.html Thiago
Jung Bauermann <thiago.bauermann@linaro.org> proposed a workaround, which was
found to work perfectly.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug build/18898] Cannot specify non-default list of directories as argument of --with-auto-load-dir on Windows
2015-08-29 12:57 [Bug build/18898] New: Cannot specify non-default list of directories as argument of --with-auto-load-dir on Windows eliz at gnu dot org
2015-08-29 13:06 ` [Bug build/18898] " jan.kratochvil at redhat dot com
2023-10-26 11:55 ` eliz at gnu dot org
@ 2023-10-27 0:07 ` thiago.bauermann at linaro dot org
2024-06-06 18:59 ` eliz at gnu dot org
2024-06-08 3:59 ` thiago.bauermann at linaro dot org
4 siblings, 0 replies; 6+ messages in thread
From: thiago.bauermann at linaro dot org @ 2023-10-27 0:07 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=18898
Thiago Jung Bauermann <thiago.bauermann at linaro dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |thiago.bauermann at linaro dot org
--- Comment #2 from Thiago Jung Bauermann <thiago.bauermann at linaro dot org> ---
I looked into this issue a bit more today. Here is my understanding of the
problem:
It happens because the AC_DEFINE_DIR macro calls eval twice on the value
provided via these configure options, causing the ';' to be interpreted by the
shell. E.g.,
$ ~/src/binutils-gdb/configure \
--disable-{binutils,ld,gold,gas,sim,gprof,gprofng} \
--with-auto-load-dir='foo;bar' && make
⋮
checking for default auto-load directory...
/home/bauermann/src/binutils-gdb/gdb/configure: line 18004: bar: command not
found
foo;bar
checking for default auto-load safe-path...
/home/bauermann/src/binutils-gdb/gdb/configure: line 18031: bar: command not
found
foo;bar
Line 18004 is:
ac_define_dir=`eval echo $escape_dir`
Line 18031 is identical.
With some escaping, it's possible to avoid the problem:
$ ~/src/binutils-gdb/configure \
--disable-{binutils,ld,gold,gas,sim,gprof,gprofng} \
--with-auto-load-dir='foo\\\;bar\\\;baz' && make
⋮
checking for default auto-load directory... foo\\\;bar\\\;baz
checking for default auto-load safe-path... foo\\\;bar\\\;baz
⋮
$ grep AUTO_LOAD gdb/config.h
#define AUTO_LOAD_DIR "foo;bar;baz"
#define AUTO_LOAD_SAFE_PATH "foo;bar;baz"
We provide the definition of AC_DEFINE_DIR in gdb/acinclude.m4 so the simplest
approach to fix this problem would be to remove the evals from the macro.
I don't know why they are there however, so a more conservative solution is to
make gdb/configure.ac automatically add those escaping characters to the values
of the options if the host OS is Windows.
I just posted a patch doing that:
https://inbox.sourceware.org/gdb-patches/20231026234013.937210-1-thiago.bauermann@linaro.org/
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug build/18898] Cannot specify non-default list of directories as argument of --with-auto-load-dir on Windows
2015-08-29 12:57 [Bug build/18898] New: Cannot specify non-default list of directories as argument of --with-auto-load-dir on Windows eliz at gnu dot org
` (2 preceding siblings ...)
2023-10-27 0:07 ` thiago.bauermann at linaro dot org
@ 2024-06-06 18:59 ` eliz at gnu dot org
2024-06-08 3:59 ` thiago.bauermann at linaro dot org
4 siblings, 0 replies; 6+ messages in thread
From: eliz at gnu dot org @ 2024-06-06 18:59 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=18898
--- Comment #3 from Eli Zaretskii <eliz at gnu dot org> ---
As of GDB 15, the patch proposed by Thiago is not yet in the GDB sources.
Could someone please install the patch, so that this nuisance could be avoided
once and for all??
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug build/18898] Cannot specify non-default list of directories as argument of --with-auto-load-dir on Windows
2015-08-29 12:57 [Bug build/18898] New: Cannot specify non-default list of directories as argument of --with-auto-load-dir on Windows eliz at gnu dot org
` (3 preceding siblings ...)
2024-06-06 18:59 ` eliz at gnu dot org
@ 2024-06-08 3:59 ` thiago.bauermann at linaro dot org
4 siblings, 0 replies; 6+ messages in thread
From: thiago.bauermann at linaro dot org @ 2024-06-08 3:59 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=18898
--- Comment #4 from Thiago Jung Bauermann <thiago.bauermann at linaro dot org> ---
I just verified that it still applies cleanly and works correctly, and pinged
the patch on the mailing list.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2024-06-08 3:59 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-29 12:57 [Bug build/18898] New: Cannot specify non-default list of directories as argument of --with-auto-load-dir on Windows eliz at gnu dot org
2015-08-29 13:06 ` [Bug build/18898] " jan.kratochvil at redhat dot com
2023-10-26 11:55 ` eliz at gnu dot org
2023-10-27 0:07 ` thiago.bauermann at linaro dot org
2024-06-06 18:59 ` eliz at gnu dot org
2024-06-08 3:59 ` thiago.bauermann at linaro dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).