gcore-elf.h 1.8 KB

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