-/* Copyright (C) 1992-2014 Free Software Foundation, Inc.
+/* Copyright (C) 1992-2015 Free Software Foundation, Inc.
This file is part of GDB.
ada_get_task_number (ptid_t ptid)
{
int i;
- struct inferior *inf = find_inferior_pid (ptid_get_pid (ptid));
+ struct inferior *inf = find_inferior_ptid (ptid);
struct ada_tasks_inferior_data *data;
gdb_assert (inf != NULL);
struct symbol *atcb_sym =
lookup_symbol_in_language (atcb_name, NULL, STRUCT_DOMAIN,
- language_c, NULL);
+ language_c, NULL).symbol;
const struct symbol *common_atcb_sym =
lookup_symbol_in_language (common_atcb_name, NULL, STRUCT_DOMAIN,
- language_c, NULL);
+ language_c, NULL).symbol;
const struct symbol *private_data_sym =
lookup_symbol_in_language (private_data_name, NULL, STRUCT_DOMAIN,
- language_c, NULL);
+ language_c, NULL).symbol;
const struct symbol *entry_call_record_sym =
lookup_symbol_in_language (entry_call_record_name, NULL, STRUCT_DOMAIN,
- language_c, NULL);
+ language_c, NULL).symbol;
if (atcb_sym == NULL || atcb_sym->type == NULL)
{
/* In Ravenscar run-time libs, the ATCB does not have a dynamic
size, so the symbol name differs. */
atcb_sym = lookup_symbol_in_language (atcb_name_fixed, NULL,
- STRUCT_DOMAIN, language_c, NULL);
+ STRUCT_DOMAIN, language_c,
+ NULL).symbol;
if (atcb_sym == NULL || atcb_sym->type == NULL)
error (_("Cannot find Ada_Task_Control_Block type. Aborting"));
/* Try to get pointer type and array length from the symtab. */
sym = lookup_symbol_in_language (KNOWN_TASKS_NAME, NULL, VAR_DOMAIN,
- language_c, NULL);
+ language_c, NULL).symbol;
if (sym != NULL)
{
/* Validate. */
data->known_tasks_length = 1;
sym = lookup_symbol_in_language (KNOWN_TASKS_LIST, NULL, VAR_DOMAIN,
- language_c, NULL);
+ language_c, NULL).symbol;
if (sym != NULL && SYMBOL_VALUE_ADDRESS (sym) != 0)
{
/* Validate. */
take a --thread argument. However, in order to be able to
provide that thread ID, the thread list must be up to date
first. */
- target_find_new_threads ();
+ target_update_thread_list ();
data = get_ada_tasks_inferior_data (inf);
to the thread associated to our task if GDB does not know about
that thread, we need to make sure that any new threads gets added
to the thread list. */
- target_find_new_threads ();
+ target_update_thread_list ();
/* Verify that the ptid of the task we want to switch to is valid
(in other words, a ptid that GDB knows about). Otherwise, we will
Without argument, this command simply prints the current task ID"),
&cmdlist);
}
-