* corelow.c (core_close): Don't hardcode the core's pid.
[deliverable/binutils-gdb.git] / gdb / ada-lang.h
index 307ca21664019933a3b810aaed217dd6c616268d..c7cc62a48d33a7fc68cfb1aecef30b6b3f84fea1 100644 (file)
@@ -1,7 +1,7 @@
 /* Ada language support definitions for GDB, the GNU debugger.
 
    Copyright (C) 1992, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
-   2007 Free Software Foundation, Inc.
+   2007, 2008, 2009 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -165,56 +165,68 @@ enum ada_operator
     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;
 };
 
-/* Ada task structures.  */
+/* Denotes a type of renaming symbol (see ada_parse_renaming).  */
+enum ada_renaming_category
+  {
+    /* Indicates a symbol that does not encode a renaming.  */
+    ADA_NOT_RENAMING,
+
+    /* For symbols declared
+         Foo : TYPE renamed OBJECT;  */
+    ADA_OBJECT_RENAMING,
+
+    /* For symbols declared
+         Foo : exception renames EXCEPTION;  */
+    ADA_EXCEPTION_RENAMING,
+    /* For packages declared
+          package Foo renames PACKAGE; */
+    ADA_PACKAGE_RENAMING,
+    /* For subprograms declared
+          SUBPROGRAM_SPEC renames SUBPROGRAM;
+       (Currently not used).  */
+    ADA_SUBPROGRAM_RENAMING
+  };
 
-/* Ada task control block, as defined in the GNAT runt-time library.  */
+/* Ada task structures.  */
 
-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. */
@@ -237,27 +249,25 @@ extern void ada_print_type (struct type *, char *, struct ui_file *, int,
                             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 *);
 
-extern void ada_convert_actuals (struct value *, int, struct value **,
-                                 CORE_ADDR *);
+struct value *ada_convert_actual (struct value *actual,
+                                  struct type *formal_type0,
+                                  CORE_ADDR *sp);
 
 extern struct value *ada_value_subscript (struct value *, int,
                                           struct value **);
@@ -289,17 +299,17 @@ extern enum language ada_update_initial_language (enum language,
 
 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 **);
 
 extern struct minimal_symbol *ada_lookup_simple_minsym (const char *);
 
@@ -394,7 +404,8 @@ extern int ada_which_variant_applies (struct type *, struct type *,
                                      const gdb_byte *);
 
 extern struct type *ada_to_fixed_type (struct type *, const gdb_byte *,
-                                      CORE_ADDR, struct value *);
+                                      CORE_ADDR, struct value *,
+                                       int check_tag);
 
 extern struct type *ada_template_to_fixed_record_type_1 (struct type *type,
                                                         const gdb_byte *valaddr,
@@ -438,11 +449,11 @@ extern void ada_print_scalar (struct type *, LONGEST, struct ui_file *);
 
 extern int ada_is_range_type_name (const char *);
 
-extern const char *ada_renaming_type (struct type *);
-
-extern int ada_is_object_renaming (struct symbol *);
+extern enum ada_renaming_category ada_parse_renaming (struct symbol *,
+                                                     const char **,
+                                                     int *, const char **);
 
-extern char *ada_simple_renamed_entity (struct symbol *);
+extern void ada_find_printable_frame (struct frame_info *fi);
 
 extern char *ada_breakpoint_rewrite (char *, int *);
 
@@ -452,9 +463,9 @@ 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);
 
@@ -470,7 +481,7 @@ extern void ada_print_exception_breakpoint_task (struct breakpoint *);
 
 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);
   
This page took 0.026718 seconds and 4 git commands to generate.