-/* Copyright (C) 1992-1994, 1997-2000, 2003-2005, 2007-2012 Free
- Software Foundation, Inc.
+/* Copyright (C) 1992-2013 Free Software Foundation, Inc.
This file is part of GDB.
/* Extract LEN characters from the fat string. */
array_val = value_ind (value_field (val, array_fieldno));
- read_memory (value_address (array_val), dest, len);
+ read_memory (value_address (array_val), (gdb_byte *) dest, len);
/* Add the NUL character to close the string. */
dest[len] = '\0';
sizeof (task_info->name) - 1);
else
{
- struct minimal_symbol *msym;
+ struct bound_minimal_symbol msym;
msym = lookup_minimal_symbol_by_pc (task_id);
- if (msym)
+ if (msym.minsym)
{
- const char *full_name = SYMBOL_LINKAGE_NAME (msym);
+ const char *full_name = SYMBOL_LINKAGE_NAME (msym.minsym);
const char *task_name = full_name;
const char *p;
static void
ada_tasks_inferior_data_sniffer (struct ada_tasks_inferior_data *data)
{
- const char *name;
struct minimal_symbol *msym;
struct symbol *sym;
{
/* Validate. */
struct type *type = check_typedef (SYMBOL_TYPE (sym));
- struct type *eltype;
- struct type *idxtype;
-
- if (TYPE_CODE (type) == TYPE_CODE_ARRAY
- && (eltype = check_typedef (TYPE_TARGET_TYPE (type)))
- && TYPE_CODE (eltype) == TYPE_CODE_PTR
- && (idxtype = check_typedef (TYPE_INDEX_TYPE (type)))
+ struct type *eltype = NULL;
+ struct type *idxtype = NULL;
+
+ if (TYPE_CODE (type) == TYPE_CODE_ARRAY)
+ eltype = check_typedef (TYPE_TARGET_TYPE (type));
+ if (eltype != NULL
+ && TYPE_CODE (eltype) == TYPE_CODE_PTR)
+ idxtype = check_typedef (TYPE_INDEX_TYPE (type));
+ if (idxtype != NULL
&& !TYPE_LOW_BOUND_UNDEFINED (idxtype)
&& !TYPE_HIGH_BOUND_UNDEFINED (idxtype))
{
contains debug information on the task type (due to implicit with of
Ada.Tasking). */
data->known_tasks_element =
- builtin_type (target_gdbarch)->builtin_data_ptr;
+ builtin_type (target_gdbarch ())->builtin_data_ptr;
data->known_tasks_length = MAX_NUMBER_OF_KNOWN_TASKS;
return;
}
/* Fallback to default values. */
data->known_tasks_element =
- builtin_type (target_gdbarch)->builtin_data_ptr;
+ builtin_type (target_gdbarch ())->builtin_data_ptr;
data->known_tasks_length = 1;
return;
}
/* Print the Ada task ID. */
printf_filtered (_("Ada Task: %s\n"),
- paddress (target_gdbarch, task_info->task_id));
+ paddress (target_gdbarch (), task_info->task_id));
/* Print the name of the task. */
if (task_info->name[0] != '\0')
ada_find_printable_frame (get_selected_frame (NULL));
printf_filtered (_("[Switching to task %d]\n"), taskno);
print_stack_frame (get_selected_frame (NULL),
- frame_relative_level (get_selected_frame (NULL)), 1);
+ frame_relative_level (get_selected_frame (NULL)),
+ SRC_AND_LOC, 1);
}