aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorAndrew Burgess <andrew.burgess@embecosm.com>2020-11-13 11:03:05 +0000
committerAndrew Burgess <andrew.burgess@embecosm.com>2020-11-13 13:51:09 +0000
commit5a7cf52794e4284a9ab7ea1a8b6c6ae8de94a276 (patch)
tree6064e76fde2093b02b876342220e180a6bd388a5 /gdb
parent48f4d8ce966e20e1e759e29ca8cf05a5dd328883 (diff)
downloadgdb-5a7cf52794e4284a9ab7ea1a8b6c6ae8de94a276.zip
gdb-5a7cf52794e4284a9ab7ea1a8b6c6ae8de94a276.tar.gz
gdb-5a7cf52794e4284a9ab7ea1a8b6c6ae8de94a276.tar.bz2
gdb: delete a couple of declarations from f-lang.h
One declaration in f-lang.h is for a function that doesn't even exist, another is for a function that is only used within f-lang.c. One declaration is deleted, the other function I make static in f-lang.c. gdb/ChangeLog: * f-lang.c (fortran_argument_convert): Add declaration. Add header comment, taken from f-lang.h. Make static. * f-lang.h (f77_get_dynamic_array_length): Delete declaration. (fortran_argument_convert): Delete declaration.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog7
-rw-r--r--gdb/f-lang.c19
-rw-r--r--gdb/f-lang.h19
3 files changed, 24 insertions, 21 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 4ab4183..2d46ac9 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,10 @@
+2020-11-13 Andrew Burgess <andrew.burgess@embecosm.com>
+
+ * f-lang.c (fortran_argument_convert): Add declaration. Add
+ header comment, taken from f-lang.h. Make static.
+ * f-lang.h (f77_get_dynamic_array_length): Delete declaration.
+ (fortran_argument_convert): Delete declaration.
+
2020-11-12 Andrew Burgess <andrew.burgess@embecosm.com>
* ada-exp.y (find_primitive_type): Make parameter const.
diff --git a/gdb/f-lang.c b/gdb/f-lang.c
index 75cc05e..ec5d6d1 100644
--- a/gdb/f-lang.c
+++ b/gdb/f-lang.c
@@ -41,6 +41,9 @@
/* Local functions */
+static struct value *fortran_argument_convert (struct value *value,
+ bool is_artificial);
+
/* Return the encoding that should be used for the character type
TYPE. */
@@ -844,9 +847,21 @@ _initialize_f_language ()
f_type_data = gdbarch_data_register_post_init (build_fortran_types);
}
-/* See f-lang.h. */
+/* Ensures that function argument VALUE is in the appropriate form to
+ pass to a Fortran function. Returns a possibly new value that should
+ be used instead of VALUE.
+
+ When IS_ARTIFICIAL is true this indicates an artificial argument,
+ e.g. hidden string lengths which the GNU Fortran argument passing
+ convention specifies as being passed by value.
-struct value *
+ When IS_ARTIFICIAL is false, the argument is passed by pointer. If the
+ value is already in target memory then return a value that is a pointer
+ to VALUE. If VALUE is not in memory (e.g. an integer literal), allocate
+ space in the target, copy VALUE in, and return a pointer to the in
+ memory copy. */
+
+static struct value *
fortran_argument_convert (struct value *value, bool is_artificial)
{
if (!is_artificial)
diff --git a/gdb/f-lang.h b/gdb/f-lang.h
index e59fdef..8e693eb 100644
--- a/gdb/f-lang.h
+++ b/gdb/f-lang.h
@@ -312,8 +312,6 @@ extern LONGEST f77_get_upperbound (struct type *);
extern LONGEST f77_get_lowerbound (struct type *);
-extern void f77_get_dynamic_array_length (struct type *);
-
extern int calc_f77_array_dims (struct type *);
@@ -341,23 +339,6 @@ struct builtin_f_type
/* Return the Fortran type table for the specified architecture. */
extern const struct builtin_f_type *builtin_f_type (struct gdbarch *gdbarch);
-/* Ensures that function argument VALUE is in the appropriate form to
- pass to a Fortran function. Returns a possibly new value that should
- be used instead of VALUE.
-
- When IS_ARTIFICIAL is true this indicates an artificial argument,
- e.g. hidden string lengths which the GNU Fortran argument passing
- convention specifies as being passed by value.
-
- When IS_ARTIFICIAL is false, the argument is passed by pointer. If the
- value is already in target memory then return a value that is a pointer
- to VALUE. If VALUE is not in memory (e.g. an integer literal), allocate
- space in the target, copy VALUE in, and return a pointer to the in
- memory copy. */
-
-extern struct value *fortran_argument_convert (struct value *value,
- bool is_artificial);
-
/* Ensures that function argument TYPE is appropriate to inform the debugger
that ARG should be passed as a pointer. Returns the potentially updated
argument type.