diff options
author | Joel Brobecker <brobecker@gnat.com> | 2008-10-22 19:45:05 +0000 |
---|---|---|
committer | Joel Brobecker <brobecker@gnat.com> | 2008-10-22 19:45:05 +0000 |
commit | 0ef643c89ca385cfed451d2135cbd4e4d10c46b7 (patch) | |
tree | 1873de06e0e1c39586bcdbe69b7a6e182757bb89 /gdb/ada-lang.h | |
parent | c209f8472e7d7ea6abb109945f2c53a0b9a92d53 (diff) | |
download | gdb-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/ada-lang.h')
-rw-r--r-- | gdb/ada-lang.h | 69 |
1 files changed, 31 insertions, 38 deletions
diff --git a/gdb/ada-lang.h b/gdb/ada-lang.h index 2d13603..ce6be4b 100644 --- a/gdb/ada-lang.h +++ b/gdb/ada-lang.h @@ -196,46 +196,37 @@ enum ada_renaming_category /* Ada task structures. */ -/* Ada task control block, as defined in the GNAT runt-time library. */ - -struct task_control_block +struct ada_task_info { - char state; - CORE_ADDR parent; + /* The PTID of the thread that this task runs on. This ptid is computed + in a target-dependent way from the associated Task Control Block. */ + ptid_t ptid; + + /* The ID of the task. */ + CORE_ADDR task_id; + + /* The name of the task. */ + char name[257]; + + /* The current state of the task. */ + int state; + + /* The priority associated to the task. */ int priority; - char image [32]; - int image_len; /* This field is not always present in the ATCB. */ - CORE_ADDR call; - CORE_ADDR thread; - CORE_ADDR lwp; /* This field is not always present in the ATCB. */ - - /* If the task is waiting on a task entry, this field contains the - task_id of the other task. */ - CORE_ADDR called_task; -}; -struct task_ptid -{ - int pid; /* The Process id */ - long lwp; /* The Light Weight Process id */ - long tid; /* The Thread id */ -}; -typedef struct task_ptid task_ptid_t; + /* If non-zero, the task ID of the parent task. */ + CORE_ADDR parent; -struct task_entry -{ - CORE_ADDR task_id; - struct task_control_block atcb; - int task_num; - int known_tasks_index; - struct task_entry *next_task; - task_ptid_t task_ptid; - int stack_per; -}; + /* If the task is waiting on a task entry, this field contains + the ID of the other task. Zero otherwise. */ + CORE_ADDR called_task; -/* task entry list. */ -extern struct task_entry *task_list; + /* If the task is accepting a rendezvous with another task, this field + contains the ID of the calling task. Zero otherwise. */ + CORE_ADDR caller_task; +}; +int ada_task_is_alive (struct ada_task_info *task); /* Assuming V points to an array of S objects, make sure that it contains at least M objects, updating V and S as necessary. */ @@ -465,6 +456,8 @@ extern enum ada_renaming_category ada_parse_renaming (struct symbol *, const char **, int *, const char **); +extern void ada_find_printable_frame (struct frame_info *fi); + extern char *ada_breakpoint_rewrite (char *, int *); extern char *ada_main_name (void); @@ -473,9 +466,9 @@ extern char *ada_main_name (void); extern int valid_task_id (int); -extern void init_task_list (void); - -extern int ada_is_exception_breakpoint (bpstat bs); +typedef void (ada_task_list_iterator_ftype) (struct ada_task_info *task); +extern void iterate_over_live_ada_tasks + (ada_task_list_iterator_ftype *iterator); extern void ada_adjust_exception_stop (bpstat bs); @@ -491,7 +484,7 @@ extern void ada_print_exception_breakpoint_task (struct breakpoint *); extern void ada_reset_thread_registers (void); -extern int ada_build_task_list (void); +extern int ada_build_task_list (int warn_if_null); extern int ada_exception_catchpoint_p (struct breakpoint *b); |