[PATCH 09/18] Include \0 in printable wide characters
Andrew Burgess
aburgess@redhat.com
Wed Feb 16 17:19:34 GMT 2022
* Tom Tromey <tom@tromey.com> [2022-02-16 06:55:09 -0700]:
> print_wchar can always display \0, so include it in the list of
maybe s/always/already/ ?
> "printable" characters in wchar_printable. This is useful in a coming
> patch to change Rust to use the generic character-printing code.
Otherwise, LGTM.
Thanks,
Andrew
> ---
> gdb/valprint.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/gdb/valprint.c b/gdb/valprint.c
> index 7e67cb953f4..dec1dce9d3c 100644
> --- a/gdb/valprint.c
> +++ b/gdb/valprint.c
> @@ -2160,7 +2160,7 @@ wchar_printable (gdb_wchar_t w)
> || w == LCST ('\a') || w == LCST ('\b')
> || w == LCST ('\f') || w == LCST ('\n')
> || w == LCST ('\r') || w == LCST ('\t')
> - || w == LCST ('\v'));
> + || w == LCST ('\v') || w == LCST ('\0'));
> }
>
> /* A helper function that converts the contents of STRING to wide
> --
> 2.31.1
>
More information about the Gdb-patches
mailing list