| OLD | NEW |
| 1 /* Ada language support definitions for GDB, the GNU debugger. | 1 /* Ada language support definitions for GDB, the GNU debugger. |
| 2 | 2 |
| 3 Copyright (C) 1992, 1997-2005, 2007-2012 Free Software Foundation, | 3 Copyright (C) 1992-2013 Free Software Foundation, Inc. |
| 4 Inc. | |
| 5 | 4 |
| 6 This file is part of GDB. | 5 This file is part of GDB. |
| 7 | 6 |
| 8 This program is free software; you can redistribute it and/or modify | 7 This program is free software; you can redistribute it and/or modify |
| 9 it under the terms of the GNU General Public License as published by | 8 it under the terms of the GNU General Public License as published by |
| 10 the Free Software Foundation; either version 3 of the License, or | 9 the Free Software Foundation; either version 3 of the License, or |
| 11 (at your option) any later version. | 10 (at your option) any later version. |
| 12 | 11 |
| 13 This program is distributed in the hope that it will be useful, | 12 This program is distributed in the hope that it will be useful, |
| 14 but WITHOUT ANY WARRANTY; without even the implied warranty of | 13 but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 16 GNU General Public License for more details. | 15 GNU General Public License for more details. |
| 17 | 16 |
| 18 You should have received a copy of the GNU General Public License | 17 You should have received a copy of the GNU General Public License |
| 19 along with this program. If not, see <http://www.gnu.org/licenses/>. */ | 18 along with this program. If not, see <http://www.gnu.org/licenses/>. */ |
| 20 | 19 |
| 21 #if !defined (ADA_LANG_H) | 20 #if !defined (ADA_LANG_H) |
| 22 #define ADA_LANG_H 1 | 21 #define ADA_LANG_H 1 |
| 23 | 22 |
| 24 struct frame_info; | 23 struct frame_info; |
| 25 struct inferior; | 24 struct inferior; |
| 25 struct type_print_options; |
| 26 | 26 |
| 27 #include "value.h" | 27 #include "value.h" |
| 28 #include "gdbtypes.h" | 28 #include "gdbtypes.h" |
| 29 #include "breakpoint.h" | 29 #include "breakpoint.h" |
| 30 #include "vec.h" |
| 30 | 31 |
| 31 /* Names of specific files known to be part of the runtime | 32 /* Names of specific files known to be part of the runtime |
| 32 system and that might consider (confusing) debugging information. | 33 system and that might consider (confusing) debugging information. |
| 33 Each name (a basic regular expression string) is followed by a | 34 Each name (a basic regular expression string) is followed by a |
| 34 comma. FIXME: Should be part of a configuration file. */ | 35 comma. FIXME: Should be part of a configuration file. */ |
| 35 #if defined(__alpha__) && defined(__osf__) | 36 #if defined(__alpha__) && defined(__osf__) |
| 36 #define ADA_KNOWN_RUNTIME_FILE_NAME_PATTERNS \ | 37 #define ADA_KNOWN_RUNTIME_FILE_NAME_PATTERNS \ |
| 37 "^[agis]-.*\\.ad[bs]$", \ | 38 "^[agis]-.*\\.ad[bs]$", \ |
| 38 "/usr/shlib/libpthread\\.so", | 39 "/usr/shlib/libpthread\\.so", |
| 39 #elif defined (__linux__) | 40 #elif defined (__linux__) |
| 40 #define ADA_KNOWN_RUNTIME_FILE_NAME_PATTERNS \ | 41 #define ADA_KNOWN_RUNTIME_FILE_NAME_PATTERNS \ |
| 41 "^[agis]-.*\\.ad[bs]$", \ | 42 "^[agis]-.*\\.ad[bs]$", \ |
| 42 "/lib.*/libpthread\\.so[.0-9]*$", "/lib.*/libpthread\\.a$", \ | 43 "/lib.*/libpthread\\.so[.0-9]*$", "/lib.*/libpthread\\.a$", \ |
| 43 "/lib.*/libc\\.so[.0-9]*$", "/lib.*/libc\\.a$", | 44 "/lib.*/libc\\.so[.0-9]*$", "/lib.*/libc\\.a$", |
| 44 #endif | 45 #endif |
| 45 | 46 |
| 46 #if !defined (ADA_KNOWN_RUNTIME_FILE_NAME_PATTERNS) | 47 #if !defined (ADA_KNOWN_RUNTIME_FILE_NAME_PATTERNS) |
| 47 #define ADA_KNOWN_RUNTIME_FILE_NAME_PATTERNS \ | 48 #define ADA_KNOWN_RUNTIME_FILE_NAME_PATTERNS \ |
| 49 "^unwind-seh.c$", \ |
| 48 "^[agis]-.*\\.ad[bs]$", | 50 "^[agis]-.*\\.ad[bs]$", |
| 49 #endif | 51 #endif |
| 50 | 52 |
| 51 /* Names of compiler-generated auxiliary functions probably of no | 53 /* Names of compiler-generated auxiliary functions probably of no |
| 52 interest to users. Each name (a basic regular expression string) | 54 interest to users. Each name (a basic regular expression string) |
| 53 is followed by a comma. */ | 55 is followed by a comma. */ |
| 54 #define ADA_KNOWN_AUXILIARY_FUNCTION_NAME_PATTERNS \ | 56 #define ADA_KNOWN_AUXILIARY_FUNCTION_NAME_PATTERNS \ |
| 55 "___clean[.$a-zA-Z0-9_]*$", \ | 57 "___clean[.$a-zA-Z0-9_]*$", \ |
| 56 "___finalizer[.$a-zA-Z0-9_]*$", | 58 "___finalizer[.$a-zA-Z0-9_]*$", |
| 57 | 59 |
| (...skipping 23 matching lines...) Expand all Loading... |
| 81 extern const struct ada_opname_map ada_opname_table[]; | 83 extern const struct ada_opname_map ada_opname_table[]; |
| 82 | 84 |
| 83 /* A tuple representing one instance of a symbol-lookup operation. */ | 85 /* A tuple representing one instance of a symbol-lookup operation. */ |
| 84 | 86 |
| 85 struct ada_symbol_info | 87 struct ada_symbol_info |
| 86 { | 88 { |
| 87 /* The symbol that was found. */ | 89 /* The symbol that was found. */ |
| 88 struct symbol *sym; | 90 struct symbol *sym; |
| 89 | 91 |
| 90 /* The block where the symbol was found. */ | 92 /* The block where the symbol was found. */ |
| 91 struct block *block; | 93 const struct block *block; |
| 92 }; | 94 }; |
| 93 | 95 |
| 94 /* Denotes a type of renaming symbol (see ada_parse_renaming). */ | 96 /* Denotes a type of renaming symbol (see ada_parse_renaming). */ |
| 95 enum ada_renaming_category | 97 enum ada_renaming_category |
| 96 { | 98 { |
| 97 /* Indicates a symbol that does not encode a renaming. */ | 99 /* Indicates a symbol that does not encode a renaming. */ |
| 98 ADA_NOT_RENAMING, | 100 ADA_NOT_RENAMING, |
| 99 | 101 |
| 100 /* For symbols declared | 102 /* For symbols declared |
| 101 Foo : TYPE renamed OBJECT; */ | 103 Foo : TYPE renamed OBJECT; */ |
| 102 ADA_OBJECT_RENAMING, | 104 ADA_OBJECT_RENAMING, |
| 103 | 105 |
| 104 /* For symbols declared | 106 /* For symbols declared |
| 105 Foo : exception renames EXCEPTION; */ | 107 Foo : exception renames EXCEPTION; */ |
| 106 ADA_EXCEPTION_RENAMING, | 108 ADA_EXCEPTION_RENAMING, |
| 107 /* For packages declared | 109 /* For packages declared |
| 108 package Foo renames PACKAGE; */ | 110 package Foo renames PACKAGE; */ |
| 109 ADA_PACKAGE_RENAMING, | 111 ADA_PACKAGE_RENAMING, |
| 110 /* For subprograms declared | 112 /* For subprograms declared |
| 111 SUBPROGRAM_SPEC renames SUBPROGRAM; | 113 SUBPROGRAM_SPEC renames SUBPROGRAM; |
| 112 (Currently not used). */ | 114 (Currently not used). */ |
| 113 ADA_SUBPROGRAM_RENAMING | 115 ADA_SUBPROGRAM_RENAMING |
| 114 }; | 116 }; |
| 115 | 117 |
| 118 /* The different types of catchpoints that we introduced for catching |
| 119 Ada exceptions. */ |
| 120 |
| 121 enum ada_exception_catchpoint_kind |
| 122 { |
| 123 ada_catch_exception, |
| 124 ada_catch_exception_unhandled, |
| 125 ada_catch_assert |
| 126 }; |
| 127 |
| 116 /* Ada task structures. */ | 128 /* Ada task structures. */ |
| 117 | 129 |
| 118 struct ada_task_info | 130 struct ada_task_info |
| 119 { | 131 { |
| 120 /* The PTID of the thread that this task runs on. This ptid is computed | 132 /* The PTID of the thread that this task runs on. This ptid is computed |
| 121 in a target-dependent way from the associated Task Control Block. */ | 133 in a target-dependent way from the associated Task Control Block. */ |
| 122 ptid_t ptid; | 134 ptid_t ptid; |
| 123 | 135 |
| 124 /* The ID of the task. */ | 136 /* The ID of the task. */ |
| 125 CORE_ADDR task_id; | 137 CORE_ADDR task_id; |
| (...skipping 30 matching lines...) Expand all Loading... |
| 156 extern int ada_get_field_index (const struct type *type, | 168 extern int ada_get_field_index (const struct type *type, |
| 157 const char *field_name, | 169 const char *field_name, |
| 158 int maybe_missing); | 170 int maybe_missing); |
| 159 | 171 |
| 160 extern int ada_parse (void); /* Defined in ada-exp.y */ | 172 extern int ada_parse (void); /* Defined in ada-exp.y */ |
| 161 | 173 |
| 162 extern void ada_error (char *); /* Defined in ada-exp.y */ | 174 extern void ada_error (char *); /* Defined in ada-exp.y */ |
| 163 | 175 |
| 164 /* Defined in ada-typeprint.c */ | 176 /* Defined in ada-typeprint.c */ |
| 165 extern void ada_print_type (struct type *, const char *, struct ui_file *, int, | 177 extern void ada_print_type (struct type *, const char *, struct ui_file *, int, |
| 166 int); | 178 int, const struct type_print_options *); |
| 167 | 179 |
| 168 extern void ada_print_typedef (struct type *type, struct symbol *new_symbol, | 180 extern void ada_print_typedef (struct type *type, struct symbol *new_symbol, |
| 169 struct ui_file *stream); | 181 struct ui_file *stream); |
| 170 | 182 |
| 171 extern void ada_val_print (struct type *, const gdb_byte *, int, CORE_ADDR, | 183 extern void ada_val_print (struct type *, const gdb_byte *, int, CORE_ADDR, |
| 172 struct ui_file *, int, | 184 struct ui_file *, int, |
| 173 const struct value *, | 185 const struct value *, |
| 174 const struct value_print_options *); | 186 const struct value_print_options *); |
| 175 | 187 |
| 176 extern void ada_value_print (struct value *, struct ui_file *, | 188 extern void ada_value_print (struct value *, struct ui_file *, |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 211 extern int ada_is_bogus_array_descriptor (struct type *); | 223 extern int ada_is_bogus_array_descriptor (struct type *); |
| 212 | 224 |
| 213 extern LONGEST ada_discrete_type_low_bound (struct type *); | 225 extern LONGEST ada_discrete_type_low_bound (struct type *); |
| 214 | 226 |
| 215 extern LONGEST ada_discrete_type_high_bound (struct type *); | 227 extern LONGEST ada_discrete_type_high_bound (struct type *); |
| 216 | 228 |
| 217 extern struct value *ada_get_decoded_value (struct value *value); | 229 extern struct value *ada_get_decoded_value (struct value *value); |
| 218 | 230 |
| 219 extern struct type *ada_get_decoded_type (struct type *type); | 231 extern struct type *ada_get_decoded_type (struct type *type); |
| 220 | 232 |
| 221 extern char *ada_decode_symbol (const struct general_symbol_info*); | 233 extern const char *ada_decode_symbol (const struct general_symbol_info *); |
| 222 | 234 |
| 223 extern const char *ada_decode (const char*); | 235 extern const char *ada_decode (const char*); |
| 224 | 236 |
| 225 extern enum language ada_update_initial_language (enum language); | 237 extern enum language ada_update_initial_language (enum language); |
| 226 | 238 |
| 227 extern void clear_ada_sym_cache (void); | 239 extern void clear_ada_sym_cache (void); |
| 228 | 240 |
| 229 extern int ada_lookup_symbol_list (const char *, const struct block *, | 241 extern int ada_lookup_symbol_list (const char *, const struct block *, |
| 230 domain_enum, struct ada_symbol_info**, | 242 domain_enum, struct ada_symbol_info**); |
| 231 » » » » int); | |
| 232 | 243 |
| 233 extern char *ada_fold_name (const char *); | 244 extern char *ada_fold_name (const char *); |
| 234 | 245 |
| 235 extern struct symbol *ada_lookup_symbol (const char *, const struct block *, | 246 extern struct symbol *ada_lookup_symbol (const char *, const struct block *, |
| 236 domain_enum, int *); | 247 domain_enum, int *); |
| 237 | 248 |
| 238 extern void ada_lookup_encoded_symbol | 249 extern void ada_lookup_encoded_symbol |
| 239 (const char *name, const struct block *block, domain_enum namespace, | 250 (const char *name, const struct block *block, domain_enum namespace, |
| 240 struct ada_symbol_info *symbol_info); | 251 struct ada_symbol_info *symbol_info); |
| 241 | 252 |
| 242 extern struct minimal_symbol *ada_lookup_simple_minsym (const char *); | 253 extern struct bound_minimal_symbol ada_lookup_simple_minsym (const char *); |
| 243 | 254 |
| 244 extern void ada_fill_in_ada_prototype (struct symbol *); | 255 extern void ada_fill_in_ada_prototype (struct symbol *); |
| 245 | 256 |
| 246 extern int user_select_syms (struct ada_symbol_info *, int, int); | 257 extern int user_select_syms (struct ada_symbol_info *, int, int); |
| 247 | 258 |
| 248 extern int get_selections (int *, int, int, int, char *); | 259 extern int get_selections (int *, int, int, int, char *); |
| 249 | 260 |
| 250 extern int ada_scan_number (const char *, int, LONGEST *, int *); | 261 extern int ada_scan_number (const char *, int, LONGEST *, int *); |
| 251 | 262 |
| 252 extern struct type *ada_parent_type (struct type *); | 263 extern struct type *ada_parent_type (struct type *); |
| (...skipping 16 matching lines...) Expand all Loading... |
| 269 extern int ada_is_tagged_type (struct type *, int); | 280 extern int ada_is_tagged_type (struct type *, int); |
| 270 | 281 |
| 271 extern int ada_is_tag_type (struct type *); | 282 extern int ada_is_tag_type (struct type *); |
| 272 | 283 |
| 273 extern struct type *ada_tag_type (struct value *); | 284 extern struct type *ada_tag_type (struct value *); |
| 274 | 285 |
| 275 extern struct value *ada_value_tag (struct value *); | 286 extern struct value *ada_value_tag (struct value *); |
| 276 | 287 |
| 277 extern const char *ada_tag_name (struct value *); | 288 extern const char *ada_tag_name (struct value *); |
| 278 | 289 |
| 290 extern struct value *ada_tag_value_at_base_address (struct value *obj); |
| 291 |
| 279 extern int ada_is_parent_field (struct type *, int); | 292 extern int ada_is_parent_field (struct type *, int); |
| 280 | 293 |
| 281 extern int ada_is_wrapper_field (struct type *, int); | 294 extern int ada_is_wrapper_field (struct type *, int); |
| 282 | 295 |
| 283 extern int ada_is_variant_part (struct type *, int); | 296 extern int ada_is_variant_part (struct type *, int); |
| 284 | 297 |
| 285 extern struct type *ada_variant_discrim_type (struct type *, struct type *); | 298 extern struct type *ada_variant_discrim_type (struct type *, struct type *); |
| 286 | 299 |
| 287 extern int ada_is_others_clause (struct type *, int); | 300 extern int ada_is_others_clause (struct type *, int); |
| 288 | 301 |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 331 extern int ada_name_prefix_len (const char *); | 344 extern int ada_name_prefix_len (const char *); |
| 332 | 345 |
| 333 extern const char *ada_type_name (struct type *); | 346 extern const char *ada_type_name (struct type *); |
| 334 | 347 |
| 335 extern struct type *ada_find_parallel_type (struct type *, | 348 extern struct type *ada_find_parallel_type (struct type *, |
| 336 const char *suffix); | 349 const char *suffix); |
| 337 | 350 |
| 338 extern LONGEST get_int_var_value (char *, int *); | 351 extern LONGEST get_int_var_value (char *, int *); |
| 339 | 352 |
| 340 extern struct symbol *ada_find_renaming_symbol (struct symbol *name_sym, | 353 extern struct symbol *ada_find_renaming_symbol (struct symbol *name_sym, |
| 341 struct block *block); | 354 const struct block *block); |
| 342 | 355 |
| 343 extern int ada_prefer_type (struct type *, struct type *); | 356 extern int ada_prefer_type (struct type *, struct type *); |
| 344 | 357 |
| 345 extern struct type *ada_get_base_type (struct type *); | 358 extern struct type *ada_get_base_type (struct type *); |
| 346 | 359 |
| 347 extern struct type *ada_check_typedef (struct type *); | 360 extern struct type *ada_check_typedef (struct type *); |
| 348 | 361 |
| 349 extern char *ada_encode (const char *); | 362 extern char *ada_encode (const char *); |
| 350 | 363 |
| 351 extern const char *ada_enum_name (const char *); | 364 extern const char *ada_enum_name (const char *); |
| (...skipping 13 matching lines...) Expand all Loading... |
| 365 int *, const char **); | 378 int *, const char **); |
| 366 | 379 |
| 367 extern void ada_find_printable_frame (struct frame_info *fi); | 380 extern void ada_find_printable_frame (struct frame_info *fi); |
| 368 | 381 |
| 369 extern char *ada_breakpoint_rewrite (char *, int *); | 382 extern char *ada_breakpoint_rewrite (char *, int *); |
| 370 | 383 |
| 371 extern char *ada_main_name (void); | 384 extern char *ada_main_name (void); |
| 372 | 385 |
| 373 extern char *ada_name_for_lookup (const char *name); | 386 extern char *ada_name_for_lookup (const char *name); |
| 374 | 387 |
| 388 extern void create_ada_exception_catchpoint |
| 389 (struct gdbarch *gdbarch, enum ada_exception_catchpoint_kind ex_kind, |
| 390 char *excep_string, char *cond_string, int tempflag, int disabled, |
| 391 int from_tty); |
| 392 |
| 393 /* Some information about a given Ada exception. */ |
| 394 |
| 395 typedef struct ada_exc_info |
| 396 { |
| 397 /* The name of the exception. */ |
| 398 const char *name; |
| 399 |
| 400 /* The address of the symbol corresponding to that exception. */ |
| 401 CORE_ADDR addr; |
| 402 } ada_exc_info; |
| 403 |
| 404 DEF_VEC_O(ada_exc_info); |
| 405 |
| 406 extern VEC(ada_exc_info) *ada_exceptions_list (const char *regexp); |
| 407 |
| 375 /* Tasking-related: ada-tasks.c */ | 408 /* Tasking-related: ada-tasks.c */ |
| 376 | 409 |
| 377 extern int valid_task_id (int); | 410 extern int valid_task_id (int); |
| 378 | 411 |
| 379 extern int ada_get_task_number (ptid_t); | 412 extern int ada_get_task_number (ptid_t); |
| 380 | 413 |
| 381 typedef void (ada_task_list_iterator_ftype) (struct ada_task_info *task); | 414 typedef void (ada_task_list_iterator_ftype) (struct ada_task_info *task); |
| 382 extern void iterate_over_live_ada_tasks | 415 extern void iterate_over_live_ada_tasks |
| 383 (ada_task_list_iterator_ftype *iterator); | 416 (ada_task_list_iterator_ftype *iterator); |
| 384 | 417 |
| 385 extern int ada_build_task_list (void); | 418 extern int ada_build_task_list (void); |
| 386 | 419 |
| 387 extern void print_ada_task_info (struct ui_out *uiout, | 420 extern void print_ada_task_info (struct ui_out *uiout, |
| 388 char *taskno_str, | 421 char *taskno_str, |
| 389 struct inferior *inf); | 422 struct inferior *inf); |
| 390 | 423 |
| 391 #endif | 424 #endif |
| OLD | NEW |