* 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.
This commit is contained in:
parent
c209f8472e
commit
0ef643c89c
8 changed files with 1106 additions and 41 deletions
16
gdb/target.c
16
gdb/target.c
|
@ -351,6 +351,18 @@ kill_or_be_killed (int from_tty)
|
|||
tcomplain ();
|
||||
}
|
||||
|
||||
/* A default implementation for the to_get_ada_task_ptid target method.
|
||||
|
||||
This function builds the PTID by using both LWP and TID as part of
|
||||
the PTID lwp and tid elements. The pid used is the pid of the
|
||||
inferior_ptid. */
|
||||
|
||||
ptid_t
|
||||
default_get_ada_task_ptid (long lwp, long tid)
|
||||
{
|
||||
return ptid_build (ptid_get_pid (inferior_ptid), lwp, tid);
|
||||
}
|
||||
|
||||
/* Go through the target stack from top to bottom, copying over zero
|
||||
entries in current_target, then filling in still empty entries. In
|
||||
effect, we are doing class inheritance through the pushed target
|
||||
|
@ -457,6 +469,7 @@ update_current_target (void)
|
|||
INHERIT (to_get_thread_local_address, t);
|
||||
INHERIT (to_can_execute_reverse, t);
|
||||
/* Do not inherit to_read_description. */
|
||||
INHERIT (to_get_ada_task_ptid, t);
|
||||
/* Do not inherit to_search_memory. */
|
||||
INHERIT (to_magic, t);
|
||||
/* Do not inherit to_memory_map. */
|
||||
|
@ -622,6 +635,9 @@ update_current_target (void)
|
|||
(int (*) (int))
|
||||
return_one);
|
||||
current_target.to_read_description = NULL;
|
||||
de_fault (to_get_ada_task_ptid,
|
||||
(ptid_t (*) (long, long))
|
||||
default_get_ada_task_ptid);
|
||||
#undef de_fault
|
||||
|
||||
/* Finally, position the target-stack beneath the squashed
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue