]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - gdb/gcore-elf.h
Automatic Copyright Year update after running gdb/copyright.py
[thirdparty/binutils-gdb.git] / gdb / gcore-elf.h
1 /* Copyright (C) 2021-2022 Free Software Foundation, Inc.
2
3 This file is part of GDB.
4
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.
9
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.
14
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/>. */
17
18 /* This file contains generic functions for writing ELF based core files. */
19
20 #if !defined (GCORE_ELF_H)
21 #define GCORE_ELF_H 1
22
23 #include "gdb_bfd.h"
24 #include "gdbsupport/gdb_signals.h"
25 #include "gcore.h"
26
27 struct gdbarch;
28 struct thread_info;
29
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. */
34
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);
38
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
42 set to nullptr. */
43
44 extern void gcore_elf_make_tdesc_note
45 (bfd *obfd, gdb::unique_xmalloc_ptr<char> *note_data, int *note_size);
46
47 #endif /* GCORE_ELF_H */