From 739593e0ec988c02057a16da872b32faa992f657 Mon Sep 17 00:00:00 2001 From: Joel Brobecker Date: Wed, 29 Feb 2012 19:51:49 +0000 Subject: ada-lang.c:ada_find_renaming_symbol minor improvement. This is a minor improvement in ada_find_renaming_symbol: What we were doing was going from a symbol, get its name, and then search for renamings. But if the original symbol was already itself a renaming, then we'd look the symbol up again to return it. Since we had the symbol in the first place, we shouldn't need to look it up again. This is what this patch does: Modify ada_find_renaming_symbol to take a symbol instead of the symbol's (linkage) name, and then updates the one caller. gdb/ChangeLog: * ada-lang.h (ada_find_renaming_symbol): Replace parameter "name" with "struct symbol *name_sym". * ada-exp.y (write_var_or_type): Update call to ada_find_renaming_symbol. * ada-lang.c (ada_find_renaming_symbol): Replace parameter "name" with "struct symbol *name_sym". Adjust Implementation accordingly. Adjust the function documentation. --- gdb/ada-lang.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gdb/ada-lang.h') diff --git a/gdb/ada-lang.h b/gdb/ada-lang.h index abf9c53031a..fd7b0df44fc 100644 --- a/gdb/ada-lang.h +++ b/gdb/ada-lang.h @@ -333,7 +333,7 @@ extern struct type *ada_find_parallel_type (struct type *, extern LONGEST get_int_var_value (char *, int *); -extern struct symbol *ada_find_renaming_symbol (const char *name, +extern struct symbol *ada_find_renaming_symbol (struct symbol *name_sym, struct block *block); extern int ada_prefer_type (struct type *, struct type *); -- cgit v1.2.1