This is the mail archive of the gdb-patches@sourceware.org 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]
Other format: [Raw text]

Re: [RFA] Show some tips when file cmd get bfd_error_file_ambiguously_recognized


> > 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


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