This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: gdb.mi/mi-cli.exp failures
- From: Ian Lance Taylor <ian at airs dot com>
- To: Hans-Peter Nilsson <hp at bitrange dot com>
- Cc: Andrew Cagney <ac131313 at redhat dot com>, David Carlton <carlton at math dot stanford dot edu>, gdb <gdb at sources dot redhat dot com>, <binutils at sources dot redhat dot com>
- Date: 31 Mar 2003 17:38:48 -0800
- Subject: Re: gdb.mi/mi-cli.exp failures
- References: <Pine.BSF.4.44.0303312003040.58143-100000@dair.pair.com>
Hans-Peter Nilsson <hp at bitrange dot com> writes:
> On Mon, 31 Mar 2003, Andrew Cagney wrote:
> > And this:
> >
> > > - return concat (filename);
> > > + return filename;
> >
> > (remembering that the patch is backwards) doesn't look so good. It
> > should be:
> >
> > concat (filename, NULL);
> >
> > perhaps
> >
> > xstrdup (filename)
> >
> > would be easier to read :-)
>
> \begin{chant} There must be no xstrdup calls in bfd. BFD must
> not abort; it's a library and the caller must handle allocation
> failures. There may be xstrdup calls in bfd already, but please
> don't add new ones. \end{chant}
Could use strdup, though, not that I know the context here.
Ian