From: Pedro Alves <pedro@palves.net>
To: Christina Schimpe <christina.schimpe@intel.com>,
gdb-patches@sourceware.org
Cc: tom@tromey.com, aburgess@redhat.com, eliz@gnu.org
Subject: Re: [PATCH v4 2/3] gdb: Add per-remote target variables for memory read and write config
Date: Mon, 23 Jan 2023 17:43:34 +0000 [thread overview]
Message-ID: <3f2945d9-bcdf-0f32-d2ce-84c2be9361a6@palves.net> (raw)
In-Reply-To: <20221221133958.2111768-3-christina.schimpe@intel.com>
On 2022-12-21 1:39 p.m., Christina Schimpe wrote:
> +/* User configurable variables for the number of characters in a
> + memory read/write packet. MIN (rsa->remote_packet_size,
> + rsa->sizeof_g_packet) is the default. Some targets need smaller
> + values (fifo overruns, et.al.) and some users need larger values
> + (speed up transfers). The variables ``preferred_*'' (the user
> + request), ``current_*'' (what was actually set) and ``forced_*''
> + (Positive - a soft limit, negative - a hard limit). */
> +
> +struct memory_packet_config
> +{
> + const char *name;
> + long size;
> + int fixed_p;
> +};
It seems like this struct would better be split in two like in patch #1, as
we don't really need to store a name per remote connection, as it'll always
be the same for all connections.
However, I don't want to block your patch further, so I'm OK with merging as is.
> @@ -2037,31 +2057,49 @@ set_memory_packet_size (const char *args, struct memory_packet_config *config)
...
> /* Update the config. */
> config->fixed_p = fixed_p;
> config->size = size;
> +
> + const char* target_type = get_target_type_name (target_connected);
Formatting:
"const char *target_type"
> + gdb_printf (_("The %s %s is set to \"%s\".\n"), config->name, target_type,
> + args);
> +
> }
>
> +/* Show the memory-read or write-packet size configuration CONFIG of the
> + target REMOTE. If REMOTE is nullptr, the default configuration for future
> + remote targets should be passed in CONFIG. */
> +
> static void
> -show_memory_packet_size (struct memory_packet_config *config)
> +show_memory_packet_size (memory_packet_config *config, remote_target *remote)
> {
> + const char* target_type = get_target_type_name (remote != nullptr);
Ditto.
OK with the formatting nits fixed.
Pedro Alves
next prev parent reply other threads:[~2023-01-23 17:43 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-21 13:39 [PATCH v4 0/3] Apply fixme notes for multi-target support Christina Schimpe
2022-12-21 13:39 ` [PATCH v4 1/3] gdb: Make global feature array a per-remote target array Christina Schimpe
2022-12-21 14:08 ` Eli Zaretskii
2023-01-23 17:42 ` Pedro Alves
2023-01-30 14:34 ` Schimpe, Christina
2022-12-21 13:39 ` [PATCH v4 2/3] gdb: Add per-remote target variables for memory read and write config Christina Schimpe
2022-12-21 14:13 ` Eli Zaretskii
2023-01-23 17:43 ` Pedro Alves [this message]
2023-01-30 14:34 ` Schimpe, Christina
2022-12-21 13:39 ` [PATCH v4 3/3] gdb: Remove workaround for the vCont packet Christina Schimpe
2023-01-23 17:46 ` Pedro Alves
2023-01-30 14:35 ` Schimpe, Christina
2023-01-16 8:58 ` [PING][PATCH v4 0/3] Apply fixme notes for multi-target support Schimpe, Christina
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=3f2945d9-bcdf-0f32-d2ce-84c2be9361a6@palves.net \
--to=pedro@palves.net \
--cc=aburgess@redhat.com \
--cc=christina.schimpe@intel.com \
--cc=eliz@gnu.org \
--cc=gdb-patches@sourceware.org \
--cc=tom@tromey.com \
/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).