1 /* Copyright (C) 2021-2022 Free Software Foundation, Inc.
3 This file is part of GDB.
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 3 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>. */
18 /* This file contains generic functions for writing ELF based core files. */
20 #if !defined (GCORE_ELF_H)
24 #include "gdbsupport/gdb_signals.h"
30 /* Add content to *NOTE_DATA (and update *NOTE_SIZE) to describe the
31 registers of thread INFO. Report the thread as having stopped with
32 STOP_SIGNAL. The core file is being written to OBFD, and GDBARCH is the
33 architecture for which the core file is being generated. */
35 extern void gcore_elf_build_thread_register_notes
36 (struct gdbarch
*gdbarch
, struct thread_info
*info
, gdb_signal stop_signal
,
37 bfd
*obfd
, gdb::unique_xmalloc_ptr
<char> *note_data
, int *note_size
);
39 /* Add content to *NOTE_DATA (and update *NOTE_SIZE) to include a note
40 containing the current targtet's target description. The core file is
41 being written to OBFD. If something goes wrong then *NOTE_DATA can be
44 extern void gcore_elf_make_tdesc_note
45 (bfd
*obfd
, gdb::unique_xmalloc_ptr
<char> *note_data
, int *note_size
);
47 #endif /* GCORE_ELF_H */