aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbarch.h
diff options
context:
space:
mode:
authorSergio Durigan Junior <sergiodj@redhat.com>2013-02-04 18:40:41 +0000
committerSergio Durigan Junior <sergiodj@redhat.com>2013-02-04 18:40:41 +0000
commitb3ac9c77560a7a807c10af506cb478274d00cc97 (patch)
tree8208bbae33ce492b90b62cde3ac20690b55360ee /gdb/gdbarch.h
parent70a38d42c5b3fdc03acd4faef4149f5f2e8a0fb4 (diff)
downloadgdb-b3ac9c77560a7a807c10af506cb478274d00cc97.zip
gdb-b3ac9c77560a7a807c10af506cb478274d00cc97.tar.gz
gdb-b3ac9c77560a7a807c10af506cb478274d00cc97.tar.bz2
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 844653b..464c4b6 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);