diff options
author | Joel Brobecker <brobecker@gnat.com> | 2007-12-21 11:50:11 +0000 |
---|---|---|
committer | Joel Brobecker <brobecker@gnat.com> | 2007-12-21 11:50:11 +0000 |
commit | aeb5907d62fcf44215d7112b8623f889ef73b2dd (patch) | |
tree | b06cebbe9e21b56e1f9bcfd7bfe2a83b76fcfcd0 /gdb/ada-lang.h | |
parent | 27a98bd991f63159d01e6aa8213cebd8487c8802 (diff) | |
download | gdb-aeb5907d62fcf44215d7112b8623f889ef73b2dd.zip gdb-aeb5907d62fcf44215d7112b8623f889ef73b2dd.tar.gz gdb-aeb5907d62fcf44215d7112b8623f889ef73b2dd.tar.bz2 |
* 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.h | 35 |
1 files changed, 30 insertions, 5 deletions
diff --git a/gdb/ada-lang.h b/gdb/ada-lang.h index 307ca21..0bef685 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 *); |