/* Ada language support definitions for GDB, the GNU debugger.
Copyright (C) 1992, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
- 2007, 2008 Free Software Foundation, Inc.
+ 2007, 2008, 2009 Free Software Foundation, Inc.
This file is part of GDB.
OP_ADA_LAST
};
-/* A triple, (symbol, block, symtab), representing one instance of a
+/* A tuple, (symbol, block), representing one instance of a
* symbol-lookup operation. */
struct ada_symbol_info {
struct symbol* sym;
struct block* block;
- struct symtab* symtab;
};
/* Denotes a type of renaming symbol (see ada_parse_renaming). */
/* 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. */
int);
extern int ada_val_print (struct type *, const gdb_byte *, int, CORE_ADDR,
- struct ui_file *, int, int, int,
- enum val_prettyprint);
+ struct ui_file *, int,
+ const struct value_print_options *);
-extern int ada_value_print (struct value *, struct ui_file *, int,
- enum val_prettyprint);
+extern int ada_value_print (struct value *, struct ui_file *,
+ const struct value_print_options *);
/* Defined in ada-lang.c */
-extern struct value *value_from_contents_and_address (struct type *,
- const gdb_byte *,
- CORE_ADDR);
-
extern void ada_emit_char (int, struct ui_file *, int, int);
extern void ada_printchar (int, struct ui_file *);
extern void ada_printstr (struct ui_file *, const gdb_byte *,
- unsigned int, int, int);
+ unsigned int, int, int,
+ const struct value_print_options *);
struct value *ada_convert_actual (struct value *actual,
struct type *formal_type0,
extern void clear_ada_sym_cache (void);
-extern char **ada_make_symbol_completion_list (const char *text0,
- const char *word);
-
extern int ada_lookup_symbol_list (const char *, const struct block *,
domain_enum, struct ada_symbol_info**);
extern char *ada_fold_name (const char *);
extern struct symbol *ada_lookup_symbol (const char *, const struct block *,
- domain_enum, int *,
- struct symtab **);
+ domain_enum, int *);
extern struct symbol *
ada_lookup_encoded_symbol (const char *, const struct block *,
- domain_enum namespace,
- struct block **, struct symtab **);
+ domain_enum namespace, struct block **);
extern struct minimal_symbol *ada_lookup_simple_minsym (const char *);
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);
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);
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);