diff options
Diffstat (limited to 'gdb/ada-tasks.c')
-rw-r--r-- | gdb/ada-tasks.c | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/gdb/ada-tasks.c b/gdb/ada-tasks.c index 83059d7..5f4eceb 100644 --- a/gdb/ada-tasks.c +++ b/gdb/ada-tasks.c @@ -266,7 +266,7 @@ struct ada_tasks_inferior_data reference it - this number is printed beside each task in the tasks info listing displayed by "info tasks". This number is equal to its index in the vector + 1. Reciprocally, to compute the index - of a task in the vector, we need to substract 1 from its number. */ + of a task in the vector, we need to subtract 1 from its number. */ std::vector<ada_task_info> task_list; }; @@ -600,7 +600,7 @@ ada_get_tcb_types_info (void) /* Check for the CPU offset. */ bound_minimal_symbol first_id_sym - = lookup_bound_minimal_symbol ("__gnat_gdb_cpu_first_id"); + = lookup_minimal_symbol (current_program_space, "__gnat_gdb_cpu_first_id"); unsigned int first_id = 0; if (first_id_sym.minsym != nullptr) { @@ -712,9 +712,7 @@ read_atcb (CORE_ADDR task_id, struct ada_task_info *task_info) sizeof (task_info->name) - 1); else { - struct bound_minimal_symbol msym; - - msym = lookup_minimal_symbol_by_pc (task_id); + bound_minimal_symbol msym = lookup_minimal_symbol_by_pc (task_id); if (msym.minsym) { const char *full_name = msym.minsym->linkage_name (); @@ -914,7 +912,6 @@ read_known_tasks_list (struct ada_tasks_inferior_data *data) static void ada_tasks_inferior_data_sniffer (struct ada_tasks_inferior_data *data) { - struct bound_minimal_symbol msym; struct symbol *sym; /* Return now if already set. */ @@ -923,7 +920,8 @@ ada_tasks_inferior_data_sniffer (struct ada_tasks_inferior_data *data) /* Try array. */ - msym = lookup_minimal_symbol (KNOWN_TASKS_NAME, NULL, NULL); + bound_minimal_symbol msym + = lookup_minimal_symbol (current_program_space, KNOWN_TASKS_NAME); if (msym.minsym != NULL) { data->known_tasks_kind = ADA_TASKS_ARRAY; @@ -970,7 +968,7 @@ ada_tasks_inferior_data_sniffer (struct ada_tasks_inferior_data *data) /* Try list. */ - msym = lookup_minimal_symbol (KNOWN_TASKS_LIST, NULL, NULL); + msym = lookup_minimal_symbol (current_program_space, KNOWN_TASKS_LIST); if (msym.minsym != NULL) { data->known_tasks_kind = ADA_TASKS_LIST; @@ -1449,7 +1447,7 @@ ada_task_list_changed (struct inferior *inf) static void ada_tasks_invalidate_pspace_data (struct program_space *pspace) { - get_ada_tasks_pspace_data (pspace)->initialized_p = 0; + ada_tasks_pspace_data_handle.clear (pspace); } /* Invalidate the per-inferior data. */ @@ -1457,10 +1455,7 @@ ada_tasks_invalidate_pspace_data (struct program_space *pspace) static void ada_tasks_invalidate_inferior_data (struct inferior *inf) { - struct ada_tasks_inferior_data *data = get_ada_tasks_inferior_data (inf); - - data->known_tasks_kind = ADA_TASKS_UNKNOWN; - data->task_list_valid_p = false; + ada_tasks_inferior_data_handle.clear (inf); } /* The 'normal_stop' observer notification callback. */ @@ -1495,7 +1490,7 @@ ada_tasks_clear_pspace_data (program_space *pspace) static void ada_tasks_new_objfile_observer (objfile *objfile) { - ada_tasks_clear_pspace_data (objfile->pspace); + ada_tasks_clear_pspace_data (objfile->pspace ()); } /* The qcs command line flags for the "task apply" commands. Keep |