From: Tom Tromey <tom@tromey.com>
To: Andrew Burgess via Gdb-patches <gdb-patches@sourceware.org>
Cc: Andrew Burgess <aburgess@redhat.com>, Simon Marchi <simark@simark.ca>
Subject: Re: [PATCH 1/4] gdb: fix printf of wchar_t early in a gdb session
Date: Fri, 02 Jun 2023 10:54:21 -0600 [thread overview]
Message-ID: <87wn0lu7nm.fsf@tromey.com> (raw)
In-Reply-To: <fcec99feb4d222965225d2c087b84e49dbb3cd40.1685611212.git.aburgess@redhat.com> (Andrew Burgess via Gdb-patches's message of "Thu, 1 Jun 2023 10:27:50 +0100")
>>>>> Andrew Burgess via Gdb-patches <gdb-patches@sourceware.org> writes:
> Initially I did fix this problem by adding a check_typedef call into
> printf_wide_c_string, but then I figured why not move the
> check_typedef call up into lookup_typename itself, that feels like it
> should be harmless when looking up a non-typedef type, but will avoid
> bugs like this when looking up a typedef. So that's what I did.
Makes sense to me.
It's pretty typical for a missing check_typedef to wind up being a bug
in some scenario. I think one of the dreams for method-izing struct
type is to make this impossible -- like having the various methods call
check_typedef themselves (if needed) before returning an answer.
Anyway, this looks good to me.
Reviewed-By: Tom Tromey <tom@tromey.com>
Tom
next prev parent reply other threads:[~2023-06-02 16:54 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-01 9:27 [PATCH 0/4] Some alloca removal and a printf bug fix Andrew Burgess
2023-06-01 9:27 ` [PATCH 1/4] gdb: fix printf of wchar_t early in a gdb session Andrew Burgess
2023-06-02 16:54 ` Tom Tromey [this message]
2023-06-01 9:27 ` [PATCH 2/4] gdb: remove two uses of alloca from printcmd.c Andrew Burgess
2023-06-01 9:27 ` [PATCH 3/4] gdb: remove last alloca call " Andrew Burgess
2023-06-01 9:27 ` [PATCH 4/4] gdb: check max-value-size when reading strings for printf Andrew Burgess
2023-06-02 17:05 ` Tom Tromey
2023-06-05 9:43 ` Andrew Burgess
2023-07-04 13:20 ` Andrew Burgess
2023-07-04 13:24 ` Eli Zaretskii
2023-06-02 17:06 ` [PATCH 0/4] Some alloca removal and a printf bug fix Tom Tromey
2023-07-07 14:34 ` Andrew Burgess
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=87wn0lu7nm.fsf@tromey.com \
--to=tom@tromey.com \
--cc=aburgess@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=simark@simark.ca \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).