[RFA] Show some tips when file cmd get bfd_error_file_ambiguously_recognized

Joel Brobecker brobecker@adacore.com
Fri Jan 29 03:51:00 GMT 2010


> > Rather than all the C strings manipulation fragile magic maybe one could
> > afford mem_fileopen with ui_file_xstrdup (as being done sometimes in GDB).
> 
> Fine with me.
> [I've always lamented the absence of such a facility in C itself.]

I made the very same suggestion when reviewing the patch for D support,
and Tom reminded us of of another option: libiberty/dyn-string.c
(looking at this code, the memory allocated is doubled every time
the buffer needs to be expanded, so it should be relatively efficient).

-- 
Joel



More information about the Gdb-patches mailing list