Re: [RFA] Replace strdup with xstrdup in tic30-dis.c

David O'Brien
2002-11-27T19:37:43Z

On Wed, Nov 20, 2002 at 11:05:14AM -0500, Andrew Cagney wrote:
> >Another option would be to add a xmalloc_set_failure_handler() to
> >libiberty for use by GDB.
>
> Just FYI, GDB is currently intercepting the calls by implementing its
> own xmalloc() and having them linked in before libiberty. See utils.c.

This has also caused us problems in FreeBSD'ville as we share libiberty
with binutils and gdb. What about having a real handler that is
registered? Even using a function pointer XMALLOC in which it's main()'s
job to set to what ever malloc is desired would help.