aboutsummaryrefslogtreecommitdiff
path: root/gdb/target.h
diff options
context:
space:
mode:
authorJoel Brobecker <brobecker@gnat.com>2008-10-22 19:45:05 +0000
committerJoel Brobecker <brobecker@gnat.com>2008-10-22 19:45:05 +0000
commit0ef643c89ca385cfed451d2135cbd4e4d10c46b7 (patch)
tree1873de06e0e1c39586bcdbe69b7a6e182757bb89 /gdb/target.h
parentc209f8472e7d7ea6abb109945f2c53a0b9a92d53 (diff)
downloadgdb-0ef643c89ca385cfed451d2135cbd4e4d10c46b7.zip
gdb-0ef643c89ca385cfed451d2135cbd4e4d10c46b7.tar.gz
gdb-0ef643c89ca385cfed451d2135cbd4e4d10c46b7.tar.bz2
* target.h (struct target_ops): Add new field to_get_ada_task_ptid.
(target_get_ada_task_ptid): New macro. * target.c (default_get_ada_task_ptid): New function. (update_current_target): Inherit field default_get_ada_task_ptid. (update_current_target): Make default_get_ada_task_ptid the default value for field to_get_ada_task_ptid. * ada-lang.h (struct task_control_block): Delete. Never used. (struct task_ptid, task_ptid_t, struct task_entry, task_list): Likewise. (struct ada_task_info): New. (ada_task_is_alive, ada_find_printable_frame) (ada_task_list_iterator_ftype, iterate_over_live_ada_tasks): Add declarations. (ada_build_task_list): Update prototype. (init_task_list, ada_is_exception_breakpoint): Remove prototypes. * ada-lang.c (ada_find_printable_frame): Make non-static. * ada-tasks.c: New file. * Makefile.in (SFILES): Add ada-tasks.c. (COMMON_OBS): Add ada-tasks.o. * linux-thread-db.c (thread_db_find_thread_from_tid) (thread_db_get_ada_task_ptid): New functions. (init_thread_db_ops): Set thread_db_ops.to_get_ada_task_ptid.
Diffstat (limited to 'gdb/target.h')
-rw-r--r--gdb/target.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/gdb/target.h b/gdb/target.h
index cdc898f..9ec8f5d 100644
--- a/gdb/target.h
+++ b/gdb/target.h
@@ -509,6 +509,12 @@ struct target_ops
was available. */
const struct target_desc *(*to_read_description) (struct target_ops *ops);
+ /* Build the PTID of the thread on which a given task is running,
+ based on LWP and THREAD. These values are extracted from the
+ task Private_Data section of the Ada Task Control Block, and
+ their interpretation depends on the target. */
+ ptid_t (*to_get_ada_task_ptid) (long lwp, long thread);
+
/* Read one auxv entry from *READPTR, not reading locations >= ENDPTR.
Return 0 if *READPTR is already at the end of the buffer.
Return -1 if there is insufficient buffer for a whole entry.
@@ -1141,6 +1147,9 @@ extern int target_stopped_data_address_p (struct target_ops *);
extern const struct target_desc *target_read_description (struct target_ops *);
+#define target_get_ada_task_ptid(lwp, tid) \
+ (*current_target.to_get_ada_task_ptid) (lwp,tid)
+
/* Utility implementation of searching memory. */
extern int simple_search_memory (struct target_ops* ops,
CORE_ADDR start_addr,