This is the mail archive of the gdb-patches@sourceware.cygnus.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: FYI: strdup() -> xstrdup()


"J.T. Conklin" wrote:
> 
> >>>>> "Andrew" == Andrew Cagney <ac131313@cygnus.com> writes:
> >> #define strdup dont_use_strdup__use_xstrdup_instead
> 

> 
> Andrew> I considered suggesting this but bit my lip :-)  Now that it is on the
> Andrew> table though, it's fine with me.
> 
> My concern about doing this is that there could be third party code
> (ui goo, simulators, target i/o libraries, etc.) that may be linked
> with GDB that uses strdup() directly.
> 
>         --jtc

Sorry, yes.
It's probably just as easy to add a testcase to the testsuite that fails
whenever someone adds strdup() to the code.

	Andrew

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]