This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 04/16 v2] Determine supported extended-remote features
- From: Pedro Alves <palves at redhat dot com>
- To: Don Breazeal <donb at codesourcery dot com>, gdb-patches at sourceware dot org
- Date: Wed, 15 Oct 2014 17:17:13 +0100
- Subject: Re: [PATCH 04/16 v2] Determine supported extended-remote features
- Authentication-results: sourceware.org; auth=none
- References: <1407434395-19089-1-git-send-email-donb at codesourcery dot com> <1408580964-27916-5-git-send-email-donb at codesourcery dot com>
On 08/21/2014 01:29 AM, Don Breazeal wrote:
> This patch implements a mechanism for GDB to ask gdbserver what
> extended-mode features are enabled.
>
> The problems that are solved include:
>
> 1) A mechanism other than the qSupported RSP packet is needed for
> gdbserver to inform GDB about the list of extended mode features that
> are supported.
Sorry, this doesn't really make sense to me.
>
> In the existing implementation most of the information about
> supported gdbserver features is sent to GDB in response to a
> qSupported RSP message. This exchange occurs prior to GDB
> sending the "!" packet to enable extended mode. So as-is this
> message doesn't work for features that are dependent on extended-
> mode.
The differences between extended and non-extended modes are very
few, and I'd rather have fewer -- eventually merge them -- not
more.
I don't understand what motivated this. What's wrong with
just reporting the features as supported in qSupported, and
then have GDB decide whether to make use the features or not?
> Also, the qSupported exchange is intended to inform GDB about which
> packets are supported, and most of the extended mode features do not
> have associated packets. There are some features included in the
> qSupported response that do not have associated RSP messages, but the
> code comments make it clear that this practice is not acceptable for new
> packets.
Which comments?
>
> 2) A mechanism is needed to enable extended mode features when GDB
> tells gdbserver to use extended mode.
>
> The existing implementation checks for ptrace extended events
> (just PTRACE_O_TRACELONE) and enables them immediately after checking.
> This is done when the first event occurs as the program is loaded, which
> can occur before GDB has connected to gdbserver and told it whether or
> not to use extended mode.
Thanks,
Pedro Alves