This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 1/4] Query supported notifications by qSupported
- From: Yao Qi <yao at codesourcery dot com>
- To: Pedro Alves <palves at redhat dot com>
- Cc: <gdb-patches at sourceware dot org>
- Date: Thu, 19 Dec 2013 15:20:53 +0800
- Subject: Re: [PATCH 1/4] Query supported notifications by qSupported
- Authentication-results: sourceware.org; auth=none
- References: <1386856184-16519-1-git-send-email-yao at codesourcery dot com> <1386856184-16519-2-git-send-email-yao at codesourcery dot com> <52B1ACFD dot 6020507 at redhat dot com>
On 12/18/2013 10:11 PM, Pedro Alves wrote:
> But is there any real benefit to the extra "Notifications="
> indirection, rather than just treat notifications as regular
> qSupported features? IOW, why not simply:
>
> --> qSupported:XXX;N1+;N2+;N3+;N2ext+;ultimatefeature+
>
> ?
>
> I.e., GDB supports XXX; N1 notifications; N2 notifications;
> N3 notifications; foo extension on N2 notifications;
> and the "ultimatefeature" feature, which actually
> implies support for 3 different notifications.)
This will simplify the parsing and checking a given notification
is supported or not. I didn't consider this approach when wrote
this patch.
Each notification doesn't look like a feature to me(, but some one
else may think notification is a feature). The only
benefit I can think of now is to avoid name clashes. A
third-party stub supports one notification Nfoo and GDB doesn't
have such feature or notification. During the development, we add
a new feature Nfoo in GDB, so "N1+;Nfoo+;" confuses GDB, but
"Notifications=N1,Nfoo" doesn't. On the other hand, it is better
to keep notification related code in remote-notif.c.
Again, I don't have a strong opinion on this.
--
Yao (éå)