Minor cleanup to a couple of functions in ada-lang.c.
gdb/ChangeLog: * ada-lang.h (ada_find_any_symbol, ada_find_any_type): Delete. * ada-lang.c (ada_find_any_type): Add advance declaration. Make static. Replace ada_find_any_symbol by ada_find_any_type_symbol. (ada_find_any_type_symbol): Renames ada_find_any_symbol. Improve function description. Make static. (ada_find_renaming_symbol, find_old_style_renaming_symbol): Replace ada_find_any_symbol by ada_find_any_type_symbol.
This commit is contained in:
parent
1b61134393
commit
852dff6c67
@ -1,3 +1,14 @@
|
||||
2012-02-29 Joel Brobecker <brobecker@adacore.com>
|
||||
|
||||
* ada-lang.h (ada_find_any_symbol, ada_find_any_type): Delete.
|
||||
* ada-lang.c (ada_find_any_type): Add advance declaration.
|
||||
Make static. Replace ada_find_any_symbol by
|
||||
ada_find_any_type_symbol.
|
||||
(ada_find_any_type_symbol): Renames ada_find_any_symbol.
|
||||
Improve function description. Make static.
|
||||
(ada_find_renaming_symbol, find_old_style_renaming_symbol):
|
||||
Replace ada_find_any_symbol by ada_find_any_type_symbol.
|
||||
|
||||
2012-02-29 Joel Brobecker <brobecker@adacore.com>
|
||||
|
||||
* ada-lang.c (struct tag_args): Delete.
|
||||
|
@ -271,6 +271,8 @@ static struct value *ada_evaluate_subexp (struct type *, struct expression *,
|
||||
|
||||
static void ada_forward_operator_length (struct expression *, int, int *,
|
||||
int *);
|
||||
|
||||
static struct type *ada_find_any_type (const char *name);
|
||||
|
||||
|
||||
|
||||
@ -7022,10 +7024,10 @@ field_alignment (struct type *type, int f)
|
||||
return atoi (name + align_offset) * TARGET_CHAR_BIT;
|
||||
}
|
||||
|
||||
/* Find a symbol named NAME. Ignores ambiguity. */
|
||||
/* Find a typedef or tag symbol named NAME. Ignores ambiguity. */
|
||||
|
||||
struct symbol *
|
||||
ada_find_any_symbol (const char *name)
|
||||
static struct symbol *
|
||||
ada_find_any_type_symbol (const char *name)
|
||||
{
|
||||
struct symbol *sym;
|
||||
|
||||
@ -7041,10 +7043,10 @@ ada_find_any_symbol (const char *name)
|
||||
solely for types defined by debug info, it will not search the GDB
|
||||
primitive types. */
|
||||
|
||||
struct type *
|
||||
static struct type *
|
||||
ada_find_any_type (const char *name)
|
||||
{
|
||||
struct symbol *sym = ada_find_any_symbol (name);
|
||||
struct symbol *sym = ada_find_any_type_symbol (name);
|
||||
|
||||
if (sym != NULL)
|
||||
return SYMBOL_TYPE (sym);
|
||||
@ -7068,7 +7070,7 @@ ada_find_renaming_symbol (const char *name, struct block *block)
|
||||
return sym;
|
||||
|
||||
/* Not right yet. FIXME pnh 7/20/2007. */
|
||||
sym = ada_find_any_symbol (name);
|
||||
sym = ada_find_any_type_symbol (name);
|
||||
if (sym != NULL && strstr (SYMBOL_LINKAGE_NAME (sym), "___XR") != NULL)
|
||||
return sym;
|
||||
else
|
||||
@ -7126,7 +7128,7 @@ find_old_style_renaming_symbol (const char *name, struct block *block)
|
||||
xsnprintf (rename, rename_len * sizeof (char), "%s___XR", name);
|
||||
}
|
||||
|
||||
return ada_find_any_symbol (rename);
|
||||
return ada_find_any_type_symbol (rename);
|
||||
}
|
||||
|
||||
/* Because of GNAT encoding conventions, several GDB symbols may match a
|
||||
|
@ -333,10 +333,6 @@ extern struct type *ada_find_parallel_type (struct type *,
|
||||
|
||||
extern LONGEST get_int_var_value (char *, int *);
|
||||
|
||||
extern struct symbol *ada_find_any_symbol (const char *name);
|
||||
|
||||
extern struct type *ada_find_any_type (const char *name);
|
||||
|
||||
extern struct symbol *ada_find_renaming_symbol (const char *name,
|
||||
struct block *block);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user