binutils-gdb/gdb/gcore.h
Andrew Burgess 03642b7189 gdb: revert "gdb: unify parts of the Linux and FreeBSD core dumping code"
This reverts commit 82a1fd3a49.

It was pointed out:

  https://sourceware.org/pipermail/gdb-patches/2021-February/175750.html

that commit 82a1fd3a49 caused GDB to have an unconditional
dependency on ELF specific parts of BFD.  What this means is that if
GDB and BFD are built for a non-elf target then there will be
undefined symbol references within GDB.

The right solution isn't immediately obvious.  So rather than rush a
fix in I'm reverting this commit for now, and will bring it back once
I have a good solution.

gdb/ChangeLog:

	* gcore.c (struct gcore_collect_regset_section_cb_data): Delete.
	(gcore_collect_regset_section_cb): Delete.
	(gcore_collect_thread_registers): Delete.
	(gcore_build_thread_register_notes): Delete.
	(gcore_find_signalled_thread): Delete.
	* gcore.h: Remove 'gdbsupport/gdb_signals.h' include and delete
	'gdbarch' and 'thread_info' declarations.
	(gcore_build_thread_register_notes): Delete declaration.
	(gcore_find_signalled_thread): Likewise.
	* fbsd-tdep.c: Remove 'gcore.h' include.
	(struct fbsd_collect_regset_section_cb_data): New struct.
	(fbsd_collect_regset_section_cb): New function.
	(fbsd_collect_thread_registers): New function.
	(struct fbsd_corefile_thread_data): New struct.
	(fbsd_corefile_thread): New function.
	(fbsd_make_corefile_notes): Call FreeBSD specific code.
	* linux-tdep.c: Remove 'gcore.h' include.
	(struct linux_collect_regset_section_cb_data): New struct.
	(linux_collect_regset_section_cb): New function.
	(linux_collect_thread_registers): New function.
	(linux_corefile_thread): Call Linux specific code.
	(find_signalled_thread): New function.
	(linux_make_corefile_notes): Call find_signalled_thread.
2021-02-09 21:46:12 +00:00

32 lines
1.1 KiB
C

/* Support for reading/writing gcore files.
Copyright (C) 2009-2021 Free Software Foundation, Inc.
This file is part of GDB.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#if !defined (GCORE_H)
#define GCORE_H 1
#include "gdb_bfd.h"
extern gdb_bfd_ref_ptr create_gcore_bfd (const char *filename);
extern void write_gcore_file (bfd *obfd);
extern int objfile_find_memory_regions (struct target_ops *self,
find_memory_region_ftype func,
void *obfd);
#endif /* GCORE_H */