From: Tom Tromey <tom@tromey.com>
To: Andrew Burgess <aburgess@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH 1/4] gdb/unittests: add extract_string_maybe_quoted self tests
Date: Thu, 08 Feb 2024 11:17:59 -0700 [thread overview]
Message-ID: <87cyt6akh4.fsf@tromey.com> (raw)
In-Reply-To: <694821ad9a09cabbc3fa3eccda73836fea550773.1707409662.git.aburgess@redhat.com> (Andrew Burgess's message of "Thu, 8 Feb 2024 16:28:40 +0000")
>>>>> "Andrew" == Andrew Burgess <aburgess@redhat.com> writes:
Andrew> This commit adds some self tests for the extract_string_maybe_quoted
Andrew> function. No functionality is changed in this commit.
Andrew> + test_def (const char *input,
Andrew> + const char *output,
Andrew> + size_t offset)
Andrew> + : m_input (input),
Andrew> + m_output (output),
Andrew> + m_offset (offset)
Andrew> + { /* Nothing. */ }
I wonder -- if this constructor was constexpr, would that create the
objects in the rodata section?
I don't really know how that works. However, making data read-only like
this is one of the advantages of...
Andrew> +test_def tests[] = {
Andrew> + { "abc def", "abc", 3 },
... making this kind of thing 'static const'.
Tom
next prev parent reply other threads:[~2024-02-08 18:18 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-08 16:28 [PATCH 0/4] Rewrite gdb_argv using extract_string_maybe_quoted Andrew Burgess
2024-02-08 16:28 ` [PATCH 1/4] gdb/unittests: add extract_string_maybe_quoted self tests Andrew Burgess
2024-02-08 18:17 ` Tom Tromey [this message]
2024-02-08 16:28 ` [PATCH 2/4] gdbsupport: allow for configuration of extract_string_maybe_quoted Andrew Burgess
2024-02-08 19:05 ` Tom Tromey
2024-02-08 16:28 ` [PATCH 3/4] gdb/unittests: additional tests for gdb_argv class Andrew Burgess
2024-02-08 16:28 ` [PATCH 4/4] gdbsupport: rewrite gdb_argv to use extract_string_maybe_quoted Andrew Burgess
2024-02-08 19:08 ` Tom Tromey
2024-02-09 16:46 ` Andrew Burgess
2024-02-09 17:22 ` Tom Tromey
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=87cyt6akh4.fsf@tromey.com \
--to=tom@tromey.com \
--cc=aburgess@redhat.com \
--cc=gdb-patches@sourceware.org \
/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).