This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] Make symbol completion language-specific
- From: Joel Brobecker <brobecker at adacore dot com>
- To: gdb-patches at sourceware dot org
- Date: Wed, 30 Jan 2008 12:31:39 -0800
- Subject: Re: [RFA] Make symbol completion language-specific
- References: <20071228122825.GC24450@adacore.com> <20080129172800.GA3773@caradoc.them.org>
> > 1. How does someone verify that a GDB command does not return
> > any output. Do we really have to do it "manually" (using
> > gdb_send et al)? Right now, there is a hole in my testcase
> > regarding this, and I need to fix it before I commit it.
>
> Pretty much, though I think you could do it with gdb_test_multiple;
> see how lib/mi-support.exp does it. MI tests are anchored by default.
> There may be more trouble doing it for the CLI, though, because
> readline puts extra stuff in the output sometimes.
Will take a look, thanks. I suggest we add a new routine inside gdb.exp
that does check that a given command doesn't return any output. Would
that be ok?
> Also see gdb_expect_list, which is similar. I think that the way
> you've written it lends to things being too far indented, which will
> be hard to read...
Thanks for the tip! I'll have a look as well.
> > +struct string_vector
> > +{
> > + char **array; /* The vector itself. */
> > + int index; /* Index of the next available element in the array. */
> > + size_t size; /* The number of entries allocated in the array. */
> > +};
>
> We have a generic VEC nowadays.
Argh, right. I will rewrite the patch to use a VEC, remove the FIXME,
and resubmit.
Thanks,
--
Joel