mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-10-16 12:24:19 +08:00
* 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.
This commit is contained in:
@ -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 *);
|
||||
|
||||
|
Reference in New Issue
Block a user