[PATCH v2] skip -gfile: call fnmatch without FNM_FILE_NAME
Eli Zaretskii
eliz@gnu.org
Mon Dec 30 19:32:49 GMT 2024
> From: Fangrui Song <maskray@sourceware.org>
> Cc: Eli Zaretskii <eliz@gnu.org>,
> Doug Evans <xdje42@gmail.com>,
> Justin Lebar <justin.lebar@gmail.com>,
> Fangrui Song <maskray@sourceware.org>
> Date: Mon, 30 Dec 2024 10:56:39 -0800
>
> fnmatch is called with the FNM_FILE_NAME flag so that `skip -gfi /usr/*`
> doesn't match /usr/include/*. This makes the file matching feature not
> useful for STL headers that reside in multiple directories. In
> addition, the user cannot use a single `*` to match multiple leading
> path components.
>
> Let's drop the FNM_FILE_NAME flag and remove the assertion from
> gdb_filename_fnmatch (originally for the auto-load feature).
>
> --
> Changes from v1
> (https://sourceware.org/pipermail/gdb-patches/2024-December/214406.html)
>
> * Adjust the comment of gdb_filename_fnmatch
> * Remove compare_glob_filenames_for_search
> * Update doc per Eli
> ---
> gdb/doc/gdb.texinfo | 4 +++-
> gdb/skip.c | 6 +++---
> gdb/symtab.c | 34 ----------------------------------
> gdb/utils.c | 6 ++----
> 4 files changed, 8 insertions(+), 42 deletions(-)
Thanks, the documentation part is approved.
Reviewed-By: Eli Zaretskii <eliz@gnu.org>
More information about the Gdb-patches
mailing list