new plugin bfd_target breaks gdb with --enable-targets=all

Rafael Espindola espindola@google.com
Wed May 27 12:53:00 GMT 2009


> I would prefer that.  We do the similar thing for
> libiberty's xmalloc (xmalloc_set_program_name).  Could
> also be new bfd_set_program_name|bfd_get_program_name pair, the
> former called even if not supporting plugins, but I'm not a
> binutils maintainer, so that's just a suggestion.

I did the plugin specific version. So far it is the only thing in bfd
that uses the program name.

bfd/
2009-05-27  Rafael Avila de Espindola  <espindola@google.com>

	* plugin.c (program_name): Remove.
	(plugin_program_name): New.
	(bfd_plugin_set_program_name): New.
	(try_load_plugin): Use plugin_program_name.
	* plugin.h (bfd_plugin_set_program_name): New.

binutils/
2009-05-27  Rafael Avila de Espindola  <espindola@google.com>

	* ar.c (main): Call bfd_plugin_set_program_name.
	* nm.c (main): Call bfd_plugin_set_program_name.

>> The plugin is just a strange target. That is why it is included in
>> --enable-targets=all.
>
> :-) That's not an explanation, but I guess it's fine to have it
> included in --enable-targets=all as long as it doesn't try
> to get built on non -dl capable hosts.

I actually think that building the plugin target is correct if given
--enable-targets=all. I read that option as "support as many files
types as possible". Adding plugin adds at least one more file type
(llvm bitcode).

It looks like the patch that was committed was a slightly old version
where --enable-plugins in not the same as adding plugins to targets.
Nick, any reason why you committed that one?

> --
> Pedro Alves
>

Cheers,
-- 
Rafael Avila de Espindola

Google | Gordon House | Barrow Street | Dublin 4 | Ireland
Registered in Dublin, Ireland | Registration Number: 368047
-------------- next part --------------
A non-text attachment was scrubbed...
Name: program_name.patch
Type: text/x-diff
Size: 1809 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20090527/fa4c8be9/attachment.bin>


More information about the Binutils mailing list