aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Brobecker <brobecker@gnat.com>2012-02-29 19:50:22 +0000
committerJoel Brobecker <brobecker@gnat.com>2012-02-29 19:50:22 +0000
commit852dff6c6724a3a578e9aad70c2185f7f279782f (patch)
treef9bc924390ed3b41f68ff5c9642f530401d4064f
parent1b61134393256db280b968d24ddf7bb22b6aabcc (diff)
downloadgdb-852dff6c6724a3a578e9aad70c2185f7f279782f.zip
gdb-852dff6c6724a3a578e9aad70c2185f7f279782f.tar.gz
gdb-852dff6c6724a3a578e9aad70c2185f7f279782f.tar.bz2
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.
-rw-r--r--gdb/ChangeLog11
-rw-r--r--gdb/ada-lang.c16
-rw-r--r--gdb/ada-lang.h4
3 files changed, 20 insertions, 11 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 2681f17..ad316c6 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,16 @@
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.
(ada_get_tsd_type): Function body moved up in source file.
(ada_tag_name_1, ada_tag_name_2): Delete.
diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c
index 1b46778..c5d5ff7 100644
--- a/gdb/ada-lang.c
+++ b/gdb/ada-lang.c
@@ -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
diff --git a/gdb/ada-lang.h b/gdb/ada-lang.h
index d11a624..abf9c53 100644
--- a/gdb/ada-lang.h
+++ b/gdb/ada-lang.h
@@ -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);