gcore, target: allow target to prepare/cleanup for/after core file generation
authorMarkus Metzger <markus.t.metzger@intel.com>
Tue, 20 May 2014 13:22:53 +0000 (15:22 +0200)
committerMarkus Metzger <markus.t.metzger@intel.com>
Wed, 25 Jun 2014 07:57:16 +0000 (09:57 +0200)
commit5fff78c4e0d938bb4fc1375792ffae02a134943c
tree21331de5e48cb6494002c76afa174a00051ea1ed
parent1d1f1ccb331f1fe9825c3bb6f6231a3aeb560d6f
gcore, target: allow target to prepare/cleanup for/after core file generation

Add new target functions to_prepare_to_generate_core and
to_done_generating_core that are called before and after generating a core
file, respectively.

This allows targets to prepare for core file generation and to clean up
afterwards.

gdb/
* target.h (target_ops) <to_prepare_to_generate_core>
<to_done_generating_core>: New.
(target_prepare_to_generate_core, target_done_generating_core): New.
* target.c (target_prepare_to_generate_core)
(target_done_generating_core): New.
* target-delegates.c: Regenerate.
* gcore.c: (write_gcore_file): Rename to ...
(write_gcore_file_1): ...this.
(write_gcore_file): Call target_prepare_to_generate_core
and target_done_generating_core.
gdb/ChangeLog
gdb/gcore.c
gdb/target-delegates.c
gdb/target.c
gdb/target.h