This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 4/9] Convert "remote:" sysroots to "target:" and remove "remote:"
- From: Pedro Alves <palves at redhat dot com>
- To: Gary Benson <gbenson at redhat dot com>, gdb-patches at sourceware dot org
- Date: Wed, 01 Apr 2015 13:13:53 +0100
- Subject: Re: [PATCH 4/9] Convert "remote:" sysroots to "target:" and remove "remote:"
- Authentication-results: sourceware.org; auth=none
- References: <1426870087-32654-1-git-send-email-gbenson at redhat dot com> <1426870087-32654-5-git-send-email-gbenson at redhat dot com>
Looks good.
On 03/20/2015 04:48 PM, Gary Benson wrote:
> +/* Wrapper for reload_shared_libraries that replaces "remote:"
> + at the start of gdb_sysroot with "target:". */
> +
> +static void
> +gdb_sysroot_changed (char *ignored, int from_tty,
> + struct cmd_list_element *e)
> +{
> + const char *old_prefix = "remote:";
> + const char *new_prefix = TARGET_SYSROOT_PREFIX;
> +
> + if (startswith (gdb_sysroot, old_prefix))
> + {
> + gdb_assert (strlen (old_prefix) == strlen (new_prefix));
> + memcpy (gdb_sysroot, new_prefix, strlen (new_prefix));
Should this output a warning (once per gdb invocation)?
> + }
> +
> + reload_shared_libraries (ignored, from_tty, e);
> +}
> +
Thanks,
Pedro Alves