This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [gold commit] Add --debug=plugin option to record plugin actions
- From: Alan Modra <amodra at gmail dot com>
- To: Cary Coutant <ccoutant at gmail dot com>
- Cc: Binutils <binutils at sourceware dot org>
- Date: Sat, 24 Mar 2018 12:54:29 +1030
- Subject: Re: [gold commit] Add --debug=plugin option to record plugin actions
- References: <CAJimCsEN6_GdeW3Nkix5gFsPH2F27So=4siD=TkWT+ntAp49nQ@mail.gmail.com>
On Fri, Mar 23, 2018 at 10:09:43AM -0700, Cary Coutant wrote:
> With --debug=plugin, gold will log all plugin actions to a log file,
> and make copies of plugin-supplied replacement files in a temporary
> directory created under the current working directory.
>
> -cary
>
> gold/
> * debug.h (DEBUG_PLUGIN): New constant.
> (DEBUG_ALL): Add DEBUG_PLUGIN.
> (debug_string_to_enum): Likewise.
> * plugin.cc (make_sized_plugin_object): Add filename parameter.
> (Plugin_recorder): New class.
> (Plugin_manager::~Plugin_manager): Delete recorder_.
> (Plugin_manager::load_plugins): Create and initialize recorder_.
> (Plugin_manager::claim_file): Record claimed and unclaimed files.
> (Plugin_manager::make_plugin_object): Use object name as name for
> plugin object, if available.
> (Plugin_manager::add_input_file): Record replacement files.
> (Sized_pluginobj::do_add_symbols): Record plugin symbols.
> (Plugin_finish::run): Call Plugin_recorder::finish().
> (make_sized_plugin_object): Add filename parameter and pass to
> Sized_pluginobj constructor.
> * plugin.h (Plugin::filename): New method.
> (Plugin::recorder): New method.
> (Plugin::recorder_): New data member.
No ChangeLog committed, and
/home/alan/src/binutils-gdb/gold/plugin.cc: In function ‘bool gold::link_or_copy_file(const char*, const char*)’:
/home/alan/src/binutils-gdb/gold/plugin.cc:583:5: error: ignoring return value of ‘ssize_t write(int, const void*, size_t)’, declared with attribute warn_unused_result [-Werror=unused-result]
static_cast<void>(::write(out, buf, len));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors
--
Alan Modra
Australia Development Lab, IBM