summaryrefslogtreecommitdiff
path: root/gdb/gdbarch.h
diff options
context:
space:
mode:
authorsergiodj <sergiodj>2013-02-04 18:40:33 +0000
committersergiodj <sergiodj>2013-02-04 18:40:33 +0000
commitdcde314799fec449a1f0da09922550e1269a1df7 (patch)
tree90e73fac29d3fdce470a9217854d131c1d5cab5f /gdb/gdbarch.h
parent8600d0076846de363e7a4a545b7b0a236ea9a8be (diff)
downloadgdb-dcde314799fec449a1f0da09922550e1269a1df7.tar.gz
2013-02-04 Sergio Durigan Junior <sergiodj@redhat.com>
Denys Vlasenko <dvlasenk@redhat.com> Pedro Alves <palves@redhat.com> * gdbarch.sh (elfcore_write_linux_prpsinfo): New F hook. (struct elf_internal_linux_prpsinfo): Forward declare. * gdbarch.h, gdbarch.c: Regenerate. * linux-tdep.c: Include `cli/cli-utils.h'. (linux_fill_prpsinfo): New function. (linux_make_corefile_notes): Use linux_fill_prpsinfo. If there's an elfcore_write_linux_prpsinfo hook, use it, otherwise, use elfcore_write_linux_prpsinfo32 or elfcore_write_linux_prpsinfo64 depending on gdbarch pointer bitness. * ppc-linux-tdep.c: Include elf-bfd.h. (ppc_linux_init_abi): Hook in elfcore_write_ppc_linux_prpsinfo32 on 32-bit.
Diffstat (limited to 'gdb/gdbarch.h')
-rw-r--r--gdb/gdbarch.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h
index 844653b4006..464c4b6848e 100644
--- a/gdb/gdbarch.h
+++ b/gdb/gdbarch.h
@@ -57,6 +57,7 @@ struct agent_expr;
struct axs_value;
struct stap_parse_info;
struct ravenscar_arch_ops;
+struct elf_internal_linux_prpsinfo;
/* The architecture associated with the inferior through the
connection to the target.
@@ -736,6 +737,18 @@ typedef char * (gdbarch_make_corefile_notes_ftype) (struct gdbarch *gdbarch, bfd
extern char * gdbarch_make_corefile_notes (struct gdbarch *gdbarch, bfd *obfd, int *note_size);
extern void set_gdbarch_make_corefile_notes (struct gdbarch *gdbarch, gdbarch_make_corefile_notes_ftype *make_corefile_notes);
+/* The elfcore writer hook to use to write Linux prpsinfo notes to core
+ files. Most Linux architectures use the same prpsinfo32 or
+ prpsinfo64 layouts, and so won't need to provide this hook, as we
+ call the Linux generic routines in bfd to write prpsinfo notes by
+ default. */
+
+extern int gdbarch_elfcore_write_linux_prpsinfo_p (struct gdbarch *gdbarch);
+
+typedef char * (gdbarch_elfcore_write_linux_prpsinfo_ftype) (bfd *obfd, char *note_data, int *note_size, const struct elf_internal_linux_prpsinfo *info);
+extern char * gdbarch_elfcore_write_linux_prpsinfo (struct gdbarch *gdbarch, bfd *obfd, char *note_data, int *note_size, const struct elf_internal_linux_prpsinfo *info);
+extern void set_gdbarch_elfcore_write_linux_prpsinfo (struct gdbarch *gdbarch, gdbarch_elfcore_write_linux_prpsinfo_ftype *elfcore_write_linux_prpsinfo);
+
/* Find core file memory regions */
extern int gdbarch_find_memory_regions_p (struct gdbarch *gdbarch);