[PATCH] gdb: check for empty strings in get_standard_cache_dir/get_standard_config_dir

Sergio Durigan Junior sergiodj@sergiodj.net
Thu Jan 7 23:39:06 GMT 2021


On Thursday, January 07 2021, Simon Marchi via Gdb-patches wrote:

> Perhaps it's just a limitation of gdb_tilde_expand, and it should be
> changed to use something else than glob(3) in order to support
> non-existent paths.

Just to keep things in perspective and try to shed some light into why
things are the way they are:

Back when gdb_tilde_expand was implemented, I tried to find an
alternative to using glob.  Until that point, GDB was using readline's
tilde_expand, which does the job.  Unfortunately, due to the reason
that we needed to use gdb_tilde_expand on gdbserver as well (which
doesn't link against readline), and that gnulib doesn't support
wordexp(3), glob was the only viable alternative I found.

Cheers,

-- 
Sergio
GPG key ID: 237A 54B1 0287 28BF 00EF  31F4 D0EB 7628 65FC 5E36
Please send encrypted e-mail if possible
https://sergiodj.net/


More information about the Gdb-patches mailing list