[RFC,09/13] fbsd-tdep: Export fbsd_make_corefile_notes

Message ID 20231009183617.24862-10-jhb@FreeBSD.org
State New
Headers
Series Proposal for a new NT_X86_CPUID core dump note |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_gdb_build--master-aarch64 success Testing passed
linaro-tcwg-bot/tcwg_gdb_check--master-aarch64 success Testing passed
linaro-tcwg-bot/tcwg_gdb_build--master-arm success Testing passed
linaro-tcwg-bot/tcwg_gdb_check--master-arm success Testing passed

Commit Message

John Baldwin Oct. 9, 2023, 6:36 p.m. UTC
  This permits FreeBSD architectures to override the gdbarch
make_corefile_notes method to add architecture-specific notes.
---
 gdb/fbsd-tdep.c | 5 ++---
 gdb/fbsd-tdep.h | 7 +++++++
 2 files changed, 9 insertions(+), 3 deletions(-)
  

Patch

diff --git a/gdb/fbsd-tdep.c b/gdb/fbsd-tdep.c
index d166d785736..ef7ea7cf8c3 100644
--- a/gdb/fbsd-tdep.c
+++ b/gdb/fbsd-tdep.c
@@ -667,10 +667,9 @@  fbsd_make_note_desc (enum target_object object, uint32_t structsize)
   return desc;
 }
 
-/* Create appropriate note sections for a corefile, returning them in
-   allocated memory.  */
+/* See fbsd-tdep.h.  */
 
-static gdb::unique_xmalloc_ptr<char>
+gdb::unique_xmalloc_ptr<char>
 fbsd_make_corefile_notes (struct gdbarch *gdbarch, bfd *obfd, int *note_size)
 {
   gdb::unique_xmalloc_ptr<char> note_data;
diff --git a/gdb/fbsd-tdep.h b/gdb/fbsd-tdep.h
index 65541a01a01..b457925c8a3 100644
--- a/gdb/fbsd-tdep.h
+++ b/gdb/fbsd-tdep.h
@@ -76,4 +76,11 @@  extern CORE_ADDR fbsd_get_thread_local_address (struct gdbarch *gdbarch,
 extern CORE_ADDR fbsd_skip_solib_resolver (struct gdbarch *gdbarch,
 					   CORE_ADDR pc);
 
+
+/* Create appropriate note sections for a corefile, returning them in
+   allocated memory.  */
+
+extern gdb::unique_xmalloc_ptr<char> fbsd_make_corefile_notes
+(struct gdbarch *gdbarch, bfd *obfd, int *note_size);
+
 #endif /* fbsd-tdep.h */