GDB (xrefs)
|
#include "defs.h"
#include "observer.h"
#include "gdbcmd.h"
#include "target.h"
#include "ada-lang.h"
#include "gdbcore.h"
#include "inferior.h"
#include "gdbthread.h"
#include "progspace.h"
#include "objfiles.h"
Go to the source code of this file.
#define KNOWN_TASKS_LIST "system__tasking__debug__first_task" |
Definition at line 39 of file ada-tasks.c.
Referenced by ada_tasks_inferior_data_sniffer().
#define KNOWN_TASKS_NAME "system__tasking__debug__known_tasks" |
Definition at line 31 of file ada-tasks.c.
Referenced by ada_tasks_inferior_data_sniffer().
typedef struct ada_task_info ada_task_info_s |
Definition at line 163 of file ada-tasks.c.
enum ada_known_tasks_kind |
Definition at line 169 of file ada-tasks.c.
enum task_states |
Definition at line 41 of file ada-tasks.c.
void _initialize_tasks | ( | void | ) |
Definition at line 1435 of file ada-tasks.c.
References _, _initialize_tasks, ada_new_objfile_observer(), ada_normal_stop_observer(), ada_tasks_inferior_data_handle, ada_tasks_pspace_data_handle, add_cmd(), add_info(), class_run, cmdlist, info_tasks_command(), observer_attach_new_objfile(), observer_attach_normal_stop(), and task_command().
int ada_build_task_list | ( | void | ) |
Definition at line 981 of file ada-tasks.c.
References _, current_inferior(), error(), get_ada_tasks_inferior_data(), read_known_tasks(), target_has_stack, ada_tasks_inferior_data::task_list_valid_p, and VEC_length.
Referenced by info_task(), iterate_over_live_ada_tasks(), print_ada_task_info(), ravenscar_find_new_threads(), task_command(), and valid_task_id().
int ada_get_task_number | ( | ptid_t | ptid | ) |
Definition at line 292 of file ada-tasks.c.
References find_inferior_pid(), gdb_assert, get_ada_tasks_inferior_data(), ptid_equal(), ptid_get_pid(), VEC_index, and VEC_length.
Referenced by breakpoint_thread_match(), and display_current_task_id().
static void ada_new_objfile_observer | ( | struct objfile * | objfile | ) | [static] |
Definition at line 1398 of file ada-tasks.c.
References ada_tasks_invalidate_inferior_data(), ada_tasks_invalidate_pspace_data(), arm-linux::inf, inferior_list, program_space::next, inferior::next, program_spaces, objfile::pspace, and inferior::pspace.
Referenced by _initialize_tasks().
static void ada_normal_stop_observer | ( | struct bpstats * | unused_args, |
int | unused_args2 | ||
) | [static] |
Definition at line 1388 of file ada-tasks.c.
References ada_task_list_changed(), and current_inferior().
Referenced by _initialize_tasks().
static int ada_task_is_alive | ( | struct ada_task_info * | task_info | ) | [static] |
Definition at line 348 of file ada-tasks.c.
References ada_task_info::state, and Terminated.
Referenced by iterate_over_live_ada_tasks(), read_atcb(), and task_command_1().
static void ada_task_list_changed | ( | struct inferior * | inf | ) | [static] |
Definition at line 1359 of file ada-tasks.c.
References get_ada_tasks_inferior_data(), and ada_tasks_inferior_data::task_list_valid_p.
Referenced by ada_normal_stop_observer().
static void ada_tasks_inferior_data_sniffer | ( | struct ada_tasks_inferior_data * | data | ) | [static] |
Definition at line 847 of file ada-tasks.c.
References ADA_TASKS_ARRAY, ADA_TASKS_LIST, ADA_TASKS_NOT_FOUND, ADA_TASKS_UNKNOWN, builtin_type::builtin_data_ptr, builtin_type(), check_typedef(), ada_tasks_inferior_data::known_tasks_addr, ada_tasks_inferior_data::known_tasks_element, ada_tasks_inferior_data::known_tasks_kind, ada_tasks_inferior_data::known_tasks_length, KNOWN_TASKS_LIST, KNOWN_TASKS_NAME, language_c, lookup_minimal_symbol(), lookup_symbol_in_language(), MAX_NUMBER_OF_KNOWN_TASKS, SYMBOL_TYPE, SYMBOL_VALUE_ADDRESS, target_gdbarch(), type, TYPE_CODE, TYPE_CODE_ARRAY, TYPE_CODE_PTR, TYPE_HIGH_BOUND, TYPE_HIGH_BOUND_UNDEFINED, TYPE_INDEX_TYPE, TYPE_LOW_BOUND, TYPE_LOW_BOUND_UNDEFINED, TYPE_TARGET_TYPE, and VAR_DOMAIN.
Referenced by read_known_tasks().
static void ada_tasks_invalidate_inferior_data | ( | struct inferior * | inf | ) | [static] |
Definition at line 1377 of file ada-tasks.c.
References ADA_TASKS_UNKNOWN, get_ada_tasks_inferior_data(), ada_tasks_inferior_data::known_tasks_kind, and ada_tasks_inferior_data::task_list_valid_p.
Referenced by ada_new_objfile_observer().
static void ada_tasks_invalidate_pspace_data | ( | struct program_space * | pspace | ) | [static] |
Definition at line 1369 of file ada-tasks.c.
References get_ada_tasks_pspace_data(), and ada_tasks_pspace_data::initialized_p.
Referenced by ada_new_objfile_observer().
static void add_ada_task | ( | CORE_ADDR | task_id, |
struct inferior * | inf | ||
) | [static] |
Definition at line 769 of file ada-tasks.c.
References get_ada_tasks_inferior_data(), read_atcb(), and VEC_safe_push.
Referenced by read_known_tasks_array(), and read_known_tasks_list().
static void display_current_task_id | ( | void | ) | [static] |
Definition at line 1259 of file ada-tasks.c.
References _, ada_get_task_number(), inferior_ptid, and printf_filtered().
Referenced by task_command().
static struct ada_tasks_inferior_data* get_ada_tasks_inferior_data | ( | struct inferior * | inf | ) | [static, read] |
Definition at line 274 of file ada-tasks.c.
References ada_tasks_inferior_data_handle, and XZALLOC.
Referenced by ada_build_task_list(), ada_get_task_number(), ada_task_list_changed(), ada_tasks_invalidate_inferior_data(), add_ada_task(), get_task_number_from_id(), info_task(), iterate_over_live_ada_tasks(), print_ada_task_info(), read_known_tasks(), task_command_1(), and valid_task_id().
static struct ada_tasks_pspace_data* get_ada_tasks_pspace_data | ( | struct program_space * | pspace | ) | [static, read] |
Definition at line 247 of file ada-tasks.c.
References ada_tasks_pspace_data_handle, and XZALLOC.
Referenced by ada_tasks_invalidate_pspace_data(), get_tcb_types_info(), ptid_from_atcb_common(), read_atcb(), and read_known_tasks_list().
static int get_task_number_from_id | ( | CORE_ADDR | task_id, |
struct inferior * | inf | ||
) | [static] |
Definition at line 313 of file ada-tasks.c.
References get_ada_tasks_inferior_data(), ada_task_info::task_id, VEC_index, and VEC_length.
Referenced by info_task(), and print_ada_task_info().
static void get_tcb_types_info | ( | void | ) | [static] |
Definition at line 453 of file ada-tasks.c.
References _, atcb_fieldnos::activation_link, ada_get_field_index(), ada_template_to_fixed_record_type_1(), atcb_fieldnos::atc_nesting_level, ada_tasks_pspace_data::atcb_call_type, ada_tasks_pspace_data::atcb_common_type, ada_tasks_pspace_data::atcb_fieldno, ada_tasks_pspace_data::atcb_ll_type, ada_tasks_pspace_data::atcb_type, atcb_fieldnos::call, atcb_fieldnos::call_self, atcb_fieldnos::common, current_program_space, atcb_fieldnos::entry_calls, error(), get_ada_tasks_pspace_data(), atcb_fieldnos::image, atcb_fieldnos::image_len, ada_tasks_pspace_data::initialized_p, language_c, atcb_fieldnos::ll, atcb_fieldnos::ll_lwp, atcb_fieldnos::ll_thread, lookup_symbol_in_language(), atcb_fieldnos::parent, atcb_fieldnos::priority, atcb_fieldnos::state, type, symbol::type, and VAR_DOMAIN.
Referenced by read_atcb().
Definition at line 1154 of file ada-tasks.c.
References _, ada_build_task_list(), ada_task_info::called_task, ada_task_info::caller_task, Entry_Caller_Sleep, error(), get_ada_tasks_inferior_data(), get_task_number_from_id(), long_task_states, ada_task_info::name, paddress(), ada_task_info::parent, parse_and_eval(), printf_filtered(), ada_task_info::priority, ada_task_info::ptid, ptid_get_lwp(), ptid_get_tid(), ada_task_info::state, target_gdbarch(), ada_task_info::task_id, ui_out_message(), value_as_long(), VEC_index, and VEC_length.
Referenced by info_tasks_command().
static void info_tasks_command | ( | char * | arg, |
int | from_tty | ||
) | [static] |
Definition at line 1245 of file ada-tasks.c.
References current_inferior(), current_uiout, info_task(), and print_ada_task_info().
Referenced by _initialize_tasks().
void iterate_over_live_ada_tasks | ( | ada_task_list_iterator_ftype * | iterator | ) |
Definition at line 357 of file ada-tasks.c.
References ada_build_task_list(), ada_task_is_alive(), current_inferior(), get_ada_tasks_inferior_data(), VEC_index, and VEC_length.
Referenced by ravenscar_find_new_threads().
void print_ada_task_info | ( | struct ui_out * | uiout, |
char * | arg_str, | ||
struct inferior * | inf | ||
) |
Definition at line 1001 of file ada-tasks.c.
References _, ada_build_task_list(), ada_task_info::called_task, ada_task_info::caller_task, do_cleanups(), Entry_Caller_Sleep, gdb_assert, get_ada_tasks_inferior_data(), get_task_number_from_id(), inferior_ptid, make_cleanup_ui_out_table_begin_end(), make_cleanup_ui_out_tuple_begin_end(), ada_task_info::name, ada_task_info::parent, parse_and_eval(), pid_to_thread_id(), ada_task_info::priority, ada_task_info::ptid, ptid_equal(), ada_task_info::state, target_find_new_threads(), ada_task_info::task_id, ui_left, ui_noalign, ui_out_field_fmt(), ui_out_field_int(), ui_out_field_skip(), ui_out_field_string(), ui_out_is_mi_like_p(), ui_out_message(), ui_out_table_body(), ui_out_table_header(), ui_out_text(), ui_right, value_as_long(), VEC_index, and VEC_length.
Referenced by info_tasks_command(), and mi_cmd_ada_task_info().
static ptid_t ptid_from_atcb_common | ( | struct value * | common_value | ) | [static] |
Definition at line 564 of file ada-tasks.c.
References ada_tasks_pspace_data::atcb_fieldno, current_program_space, get_ada_tasks_pspace_data(), atcb_fieldnos::ll, atcb_fieldnos::ll_lwp, atcb_fieldnos::ll_thread, target_get_ada_task_ptid, value_as_address(), value_as_long(), and value_field().
Referenced by read_atcb().
static void read_atcb | ( | CORE_ADDR | task_id, |
struct ada_task_info * | task_info | ||
) | [static] |
Definition at line 591 of file ada-tasks.c.
References ada_coerce_to_simple_array_ptr(), ada_get_field_index(), ada_task_is_alive(), atcb_fieldnos::atc_nesting_level, ada_tasks_pspace_data::atcb_call_type, ada_tasks_pspace_data::atcb_fieldno, ada_tasks_pspace_data::atcb_type, atcb_fieldnos::call, atcb_fieldnos::call_self, ada_task_info::called_task, ada_task_info::caller_task, atcb_fieldnos::common, current_program_space, atcb_fieldnos::entry_calls, get_ada_tasks_pspace_data(), get_tcb_types_info(), atcb_fieldnos::image, atcb_fieldnos::image_len, ada_tasks_pspace_data::initialized_p, len, lookup_minimal_symbol_by_pc(), ada_task_info::name, null_ptid, p, atcb_fieldnos::parent, ada_task_info::parent, atcb_fieldnos::priority, ada_task_info::priority, ada_task_info::ptid, ptid_from_atcb_common(), read_fat_string_value(), atcb_fieldnos::state, ada_task_info::state, SYMBOL_LINKAGE_NAME, target_has_execution, ada_task_info::task_id, value_as_address(), value_as_long(), value_as_string(), value_field(), value_from_contents_and_address(), value_subscript(), and value_type().
Referenced by add_ada_task().
static void read_fat_string_value | ( | char * | dest, |
struct value * | val, | ||
int | max_len | ||
) | [static] |
Definition at line 392 of file ada-tasks.c.
References _, ada_get_field_index(), error(), len, read_memory(), TYPE_CODE, TYPE_CODE_PTR, TYPE_CODE_STRUCT, TYPE_FIELD_TYPE, TYPE_TARGET_TYPE, value_address(), value_as_long(), value_field(), value_ind(), and value_type().
Referenced by read_atcb().
static int read_known_tasks | ( | void | ) | [static] |
Definition at line 942 of file ada-tasks.c.
References ADA_TASKS_ARRAY, ada_tasks_inferior_data_sniffer(), ADA_TASKS_LIST, ADA_TASKS_NOT_FOUND, ADA_TASKS_UNKNOWN, current_inferior(), gdb_assert, get_ada_tasks_inferior_data(), ada_tasks_inferior_data::known_tasks_kind, read_known_tasks_array(), read_known_tasks_list(), ada_tasks_inferior_data::task_list_valid_p, and VEC_truncate.
Referenced by ada_build_task_list().
static int read_known_tasks_array | ( | struct ada_tasks_inferior_data * | data | ) | [static] |
Definition at line 782 of file ada-tasks.c.
References add_ada_task(), current_inferior(), extract_typed_address(), ada_tasks_inferior_data::known_tasks_addr, ada_tasks_inferior_data::known_tasks_element, ada_tasks_inferior_data::known_tasks_length, read_memory(), and TYPE_LENGTH.
Referenced by read_known_tasks().
static int read_known_tasks_list | ( | struct ada_tasks_inferior_data * | data | ) | [static] |
Definition at line 809 of file ada-tasks.c.
References atcb_fieldnos::activation_link, add_ada_task(), ada_tasks_pspace_data::atcb_fieldno, ada_tasks_pspace_data::atcb_type, atcb_fieldnos::common, current_inferior(), current_program_space, extract_typed_address(), get_ada_tasks_pspace_data(), ada_tasks_inferior_data::known_tasks_addr, ada_tasks_inferior_data::known_tasks_element, read_memory(), TYPE_LENGTH, value_as_address(), value_field(), and value_from_contents_and_address().
Referenced by read_known_tasks().
static void task_command | ( | char * | taskno_str, |
int | from_tty | ||
) | [static] |
Definition at line 1322 of file ada-tasks.c.
References _, ada_build_task_list(), current_inferior(), current_uiout, display_current_task_id(), error(), target_has_execution, task_command_1(), and ui_out_message().
Referenced by _initialize_tasks().
static void task_command_1 | ( | char * | taskno_str, |
int | from_tty, | ||
struct inferior * | inf | ||
) | [static] |
Definition at line 1273 of file ada-tasks.c.
References _, ada_find_printable_frame(), ada_task_is_alive(), error(), find_thread_ptid(), frame_relative_level(), get_ada_tasks_inferior_data(), get_selected_frame(), parse_and_eval(), print_stack_frame(), printf_filtered(), ada_task_info::ptid, SRC_AND_LOC, switch_to_thread(), target_find_new_threads(), value_as_long(), VEC_index, and VEC_length.
Referenced by task_command().
int valid_task_id | ( | int | task_num | ) |
Definition at line 334 of file ada-tasks.c.
References ada_build_task_list(), current_inferior(), get_ada_tasks_inferior_data(), and VEC_length.
Referenced by bppy_set_task(), and find_condition_and_thread().
static void value_as_string | ( | char * | dest, |
struct value * | val, | ||
int | length | ||
) | [static] |
Definition at line 380 of file ada-tasks.c.
References memcpy(), and value_contents().
Referenced by read_atcb().
Referenced by _initialize_tasks(), and initialize_all_files().
struct inferior_data* ada_tasks_inferior_data_handle [static] |
Definition at line 239 of file ada-tasks.c.
Referenced by _initialize_tasks(), and get_ada_tasks_inferior_data().
struct program_space_data* ada_tasks_pspace_data_handle [static] |
Definition at line 161 of file ada-tasks.c.
Referenced by _initialize_tasks(), and get_ada_tasks_pspace_data().
const char* long_task_states[] [static] |
{ N_("Unactivated"), N_("Runnable"), N_("Terminated"), N_("Waiting for child activation"), N_("Blocked in accept or select with terminate"), N_("Waiting on entry call"), N_("Asynchronous Selective Wait"), N_("Delay Sleep"), N_("Waiting for children termination"), N_("Waiting for children in terminate alternative"), "", "", "", "", N_("Asynchronous Hold"), "", N_("Activating"), }
Definition at line 86 of file ada-tasks.c.
Referenced by info_task().
const int MAX_NUMBER_OF_KNOWN_TASKS = 1000 [static] |
Definition at line 34 of file ada-tasks.c.
Referenced by ada_tasks_inferior_data_sniffer().
const char* task_states[] [static] |
{ N_("Unactivated"), N_("Runnable"), N_("Terminated"), N_("Child Activation Wait"), N_("Accept or Select Term"), N_("Waiting on entry call"), N_("Async Select Wait"), N_("Delay Sleep"), N_("Child Termination Wait"), N_("Wait Child in Term Alt"), "", "", "", "", N_("Asynchronous Hold"), "", N_("Activating"), }
Definition at line 64 of file ada-tasks.c.