summaryrefslogtreecommitdiff
path: root/gdb/ada-lang.h
diff options
context:
space:
mode:
authorJoel Brobecker <brobecker@gnat.com>2007-12-21 11:50:11 +0000
committerJoel Brobecker <brobecker@gnat.com>2007-12-21 11:50:11 +0000
commit2fb79178de05ef1a3888471b0c321da5d825cb91 (patch)
tree4374bd8139cc3ad1024527f393794732e69e08b3 /gdb/ada-lang.h
parenteb912de1f90f146b309f41cbc89fa735e7bad20d (diff)
downloadgdb-2fb79178de05ef1a3888471b0c321da5d825cb91.tar.gz
* ada-lang.h (ada_renaming_category): New enumerated type.
(ada_lookup_encoded_symbol): Declare. (ada_parse_renaming): Declare. (ada_renaming_type,ada_is_object_renaming) (ada_simple_renamed_entity): Delete declarations. * ada-lang.c (ada_parse_renaming): New function to concentrate extraction of information from renaming symbols. (parse_old_style_renaming): New function to concentrate extraction of old-style (purely type-based) renaming information. (renaming_is_visible): Rename to... (old_renaming_is_invisible): Rename and change sense of renaming_is_visible. (remove_out_of_scope_renamings): Rename to... (remove_irrelevant_renamings): Renames remove_out_of_scope_renamings and augments with additional logic to handle cases where the same object renaming is encoded both as a reference variable and an encoded renaming. (ada_renaming_type,ada_is_object_renaming) (ada_simple_renamed_entity): Delete definitions. (ada_lookup_encoded_symbol): New function factored out of ada_lookup_symbol. (ada_lookup_symbol): Reimplement to call ada_lookup_encoded_symbol. (wild_match): Don't reject perfect match of prefix. (ada_find_renaming_symbol): Factor old-style renaming logic into find_old_style_renaming_symbol. (find_old_style_renaming_symbol): New name for content of old ada_find_renaming_symbol. (ada_prefer_type): Reimplement not to use ada_renaming_type. * ada-exp.y (write_object_renaming): Change interface. Reimplement to use new arguments and ada_parse_renaming. Correct blocks used to find array index. (write_var_or_type): Reimplement to use ada_parse_renaming.
Diffstat (limited to 'gdb/ada-lang.h')
-rw-r--r--gdb/ada-lang.h35
1 files changed, 30 insertions, 5 deletions
diff --git a/gdb/ada-lang.h b/gdb/ada-lang.h
index 307ca216640..0bef685d7a4 100644
--- a/gdb/ada-lang.h
+++ b/gdb/ada-lang.h
@@ -173,6 +173,28 @@ struct ada_symbol_info {
struct symtab* symtab;
};
+/* 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 structures. */
/* Ada task control block, as defined in the GNAT runt-time library. */
@@ -301,6 +323,11 @@ extern struct symbol *ada_lookup_symbol (const char *, const struct block *,
domain_enum, int *,
struct symtab **);
+extern struct symbol *
+ada_lookup_encoded_symbol (const char *, const struct block *,
+ domain_enum namespace,
+ struct block **, struct symtab **);
+
extern struct minimal_symbol *ada_lookup_simple_minsym (const char *);
extern void ada_fill_in_ada_prototype (struct symbol *);
@@ -438,11 +465,9 @@ 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 char *ada_simple_renamed_entity (struct symbol *);
+extern enum ada_renaming_category ada_parse_renaming (struct symbol *,
+ const char **,
+ int *, const char **);
extern char *ada_breakpoint_rewrite (char *, int *);