This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH v2 04/25] Introduce interpreter factories
- From: Yao Qi <qiyaoltc at gmail dot com>
- To: Pedro Alves <palves at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Tue, 22 Mar 2016 08:55:47 +0000
- Subject: Re: [PATCH v2 04/25] Introduce interpreter factories
- Authentication-results: sourceware.org; auth=none
- References: <1458573675-15478-1-git-send-email-palves at redhat dot com> <1458573675-15478-5-git-send-email-palves at redhat dot com>
Pedro Alves <palves@redhat.com> writes:
> +void
> +interp_factory_register (const char *name, interp_factory_func func)
> +{
> + struct interp_factory *f = XNEW (struct interp_factory);
> +
> + f->name = name;
> + f->func = func;
> +
> + /* FIXME: assert that no factory for NAME is already registered. */
> + VEC_safe_push (interp_factory_p, interpreter_factories, f);
> +}
It shouldn't be hard to do the assert here, and get rid of the FIXME.
--
Yao (éå)