aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbarch.h
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2016-01-18 09:49:23 -0800
committerJohn Baldwin <jhb@FreeBSD.org>2016-01-19 08:18:20 -0800
commit4dfc5dbc4e1b267d440dd515a42fe6fd96a8d860 (patch)
tree6cec1021e910abd6adbf097333c65669d188e0b9 /gdb/gdbarch.h
parent5b2c414df12bb61ab1e40099b92fc8f00983b930 (diff)
downloadgdb-4dfc5dbc4e1b267d440dd515a42fe6fd96a8d860.zip
gdb-4dfc5dbc4e1b267d440dd515a42fe6fd96a8d860.tar.gz
gdb-4dfc5dbc4e1b267d440dd515a42fe6fd96a8d860.tar.bz2
Add support for extracting thread names from cores.
Add a new gdbarch method to extract a thread name from a core for a given thread. Use this new method in core_thread_name to implement the to_thread_name target op. gdb/ChangeLog: * corelow.c (core_thread_name): New function. (init_core_ops): Use "core_thread_name" for the "to_thread_name" target op. * gdbarch.sh (core_thread_name): New gdbarch callback. * gdbarch.h: Re-generate. * gdbarch.c: Re-generate.
Diffstat (limited to 'gdb/gdbarch.h')
-rw-r--r--gdb/gdbarch.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h
index 3c16af2..3fadcd1 100644
--- a/gdb/gdbarch.h
+++ b/gdb/gdbarch.h
@@ -63,6 +63,7 @@ struct ravenscar_arch_ops;
struct elf_internal_linux_prpsinfo;
struct mem_range;
struct syscalls_info;
+struct thread_info;
#include "regcache.h"
@@ -866,6 +867,14 @@ typedef char * (gdbarch_core_pid_to_str_ftype) (struct gdbarch *gdbarch, ptid_t
extern char * gdbarch_core_pid_to_str (struct gdbarch *gdbarch, ptid_t ptid);
extern void set_gdbarch_core_pid_to_str (struct gdbarch *gdbarch, gdbarch_core_pid_to_str_ftype *core_pid_to_str);
+/* How the core target extracts the name of a thread from a core file. */
+
+extern int gdbarch_core_thread_name_p (struct gdbarch *gdbarch);
+
+typedef const char * (gdbarch_core_thread_name_ftype) (struct gdbarch *gdbarch, struct thread_info *thr);
+extern const char * gdbarch_core_thread_name (struct gdbarch *gdbarch, struct thread_info *thr);
+extern void set_gdbarch_core_thread_name (struct gdbarch *gdbarch, gdbarch_core_thread_name_ftype *core_thread_name);
+
/* BFD target to use when generating a core file. */
extern int gdbarch_gcore_bfd_target_p (struct gdbarch *gdbarch);