aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbarch.h
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2009-02-16 03:16:24 +0000
committerPedro Alves <palves@redhat.com>2009-02-16 03:16:24 +0000
commit959b87241d85b42da82c45ecc4bc904895092730 (patch)
tree2907c74deb6dcb97ec313592635b253a0098f7a6 /gdb/gdbarch.h
parentd0a63aa7a17ac9f0b3281c5f09f4ece637639141 (diff)
downloadgdb-959b87241d85b42da82c45ecc4bc904895092730.zip
gdb-959b87241d85b42da82c45ecc4bc904895092730.tar.gz
gdb-959b87241d85b42da82c45ecc4bc904895092730.tar.bz2
* corelow.c (core_close): Don't hardcode the core's pid.
(core_open): Find core threads before calling post_create_inferior. (add_to_thread_list, get_core_register_section): Take into account systems where the regset section names encode the pid of the inferior. * gdbarch.sh (core_reg_section_encodes_pid): New gdbarch setting. * gdbarch.h, gdbarch.c: Regenerate. * amd64-sol2-tdep.c (amd64_sol2_init_abi): Set it. * i386-sol2-tdep.c (i386_sol2_init_abi): Set it. * sparc-sol2-tdep.c (sparc32_sol2_init_abi): Set it. * sparc64-sol2-tdep.c (sparc64_sol2_init_abi): Set it.
Diffstat (limited to 'gdb/gdbarch.h')
-rw-r--r--gdb/gdbarch.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h
index 4f6db30..2774966d 100644
--- a/gdb/gdbarch.h
+++ b/gdb/gdbarch.h
@@ -638,6 +638,15 @@ typedef const struct regset * (gdbarch_regset_from_core_section_ftype) (struct g
extern const struct regset * gdbarch_regset_from_core_section (struct gdbarch *gdbarch, const char *sect_name, size_t sect_size);
extern void set_gdbarch_regset_from_core_section (struct gdbarch *gdbarch, gdbarch_regset_from_core_section_ftype *regset_from_core_section);
+/* When creating core dumps, some systems encode the PID in addition
+ to the LWP id in core file register section names. In those cases, the
+ "XXX" in ".reg/XXX" is encoded as [LWPID << 16 | PID]. This setting
+ is set to true for such architectures; false if "XXX" represents an LWP
+ or thread id with no special encoding. */
+
+extern int gdbarch_core_reg_section_encodes_pid (struct gdbarch *gdbarch);
+extern void set_gdbarch_core_reg_section_encodes_pid (struct gdbarch *gdbarch, int core_reg_section_encodes_pid);
+
/* Supported register notes in a core file. */
extern struct core_regset_section * gdbarch_core_regset_sections (struct gdbarch *gdbarch);
@@ -804,7 +813,7 @@ extern int gdbarch_target_signal_to_host (struct gdbarch *gdbarch, enum target_s
extern void set_gdbarch_target_signal_to_host (struct gdbarch *gdbarch, gdbarch_target_signal_to_host_ftype *target_signal_to_host);
/* Extra signal info inspection.
-
+
Return a type suitable to inspect extra signal information. */
extern int gdbarch_get_siginfo_type_p (struct gdbarch *gdbarch);