+2020-09-16 Andrew Burgess <andrew.burgess@embecosm.com>
+
+ * ada-lang.c (ada_language_data): Delete.
+ (ada_language): Remove references to ada_language_data.
+ * c-lang.c (c_language_data): Delete.
+ (c_language): Remove references to c_language_data.
+ (cplus_language_data): Delete.
+ (cplus_language): Remove references to cplus_language_data.
+ (asm_language_data): Delete.
+ (asm_language): Remove references to asm_language_data.
+ (minimal_language_data): Delete.
+ (minimal_language): Remove references to minimal_language_data.
+ * d-lang.c (d_language_data): Delete.
+ (d_language): Remove references to d_language_data.
+ * f-lang.c (f_language_data): Delete.
+ (f_language): Remove references to f_language_data.
+ * go-lang.c (go_language_data): Delete.
+ (go_language): Remove references to go_language_data.
+ * language.c (unknown_language_data): Delete.
+ (unknown_language): Remove references to unknown_language_data.
+ (auto_language_data): Delete.
+ (auto_language): Remove references to auto_language_data.
+ * language.h (language_data): Delete struct.
+ (language_defn): No longer inherit from language_data.
+ * m2-lang.c (m2_language_data): Delete.
+ (m2_language): Remove references to m2_language_data.
+ * objc-lang.c (objc_language_data): Delete.
+ (objc_language): Remove references to objc_language_data.
+ * opencl-lang.c (opencl_language_data): Delete.
+ (opencl_language): Remove references to opencl_language_data.
+ * p-lang.c (pascal_language_data): Delete.
+ (pascal_language): Remove references to pascal_language_data.
+ * rust-lang.c (rust_language_data): Delete.
+ (rust_language): Remove references to rust_language_data.
+
2020-09-16 Andrew Burgess <andrew.burgess@embecosm.com>
* ada-lang.c (ada_language_data): Remove la_op_print_tab
}
}
-/* Constant data that describes the Ada language. */
-
-extern const struct language_data ada_language_data =
-{
-};
-
/* Class representing the Ada language. */
class ada_language : public language_defn
{
public:
ada_language ()
- : language_defn (language_ada, ada_language_data)
+ : language_defn (language_ada)
{ /* Nothing. */ }
/* See language.h. */
evaluate_subexp_c
};
-/* Constant data that describes the C language. */
-
-extern const struct language_data c_language_data =
-{
-};
-
/* Class representing the C language. */
class c_language : public language_defn
{
public:
c_language ()
- : language_defn (language_c, c_language_data)
+ : language_defn (language_c)
{ /* Nothing. */ }
/* See language.h. */
nr_cplus_primitive_types
};
-/* Constant data that describes the C++ language. */
-
-extern const struct language_data cplus_language_data =
-{
-};
-
/* A class for the C++ language. */
class cplus_language : public language_defn
{
public:
cplus_language ()
- : language_defn (language_cplus, cplus_language_data)
+ : language_defn (language_cplus)
{ /* Nothing. */ }
/* See language.h. */
static cplus_language cplus_language_defn;
-/* Constant data that describes the ASM language. */
-
-extern const struct language_data asm_language_data =
-{
-};
-
/* A class for the ASM language. */
class asm_language : public language_defn
{
public:
asm_language ()
- : language_defn (language_asm, asm_language_data)
+ : language_defn (language_asm)
{ /* Nothing. */ }
/* See language.h. */
/* The single instance of the ASM language class. */
static asm_language asm_language_defn;
-/* The following language_defn does not represent a real language.
- It just provides a minimal support a-la-C that should allow users
- to do some simple operations when debugging applications that use
+/* A class for the minimal language. This does not represent a real
+ language. It just provides a minimal support a-la-C that should allow
+ users to do some simple operations when debugging applications that use
a language currently not supported by GDB. */
-extern const struct language_data minimal_language_data =
-{
-};
-
-/* A class for the minimal language. */
-
class minimal_language : public language_defn
{
public:
minimal_language ()
- : language_defn (language_minimal, minimal_language_data)
+ : language_defn (language_minimal)
{ /* Nothing. */ }
/* See language.h. */
nr_d_primitive_types
};
-/* Constant data that describes the D language. */
-
-extern const struct language_data d_language_data =
-{
-};
-
/* Class representing the D language. */
class d_language : public language_defn
{
public:
d_language ()
- : language_defn (language_d, d_language_data)
+ : language_defn (language_d)
{ /* Nothing. */ }
/* See language.h. */
evaluate_subexp_f
};
-/* Constant data that describes the Fortran language. */
-
-extern const struct language_data f_language_data =
-{
-};
-
/* Class representing the Fortran language. */
class f_language : public language_defn
{
public:
f_language ()
- : language_defn (language_fortran, f_language_data)
+ : language_defn (language_fortran)
{ /* Nothing. */ }
/* See language.h. */
nr_go_primitive_types
};
-/* Constant data that describes the Go language. */
-
-extern const struct language_data go_language_data =
-{
-};
-
/* Class representing the Go language. */
class go_language : public language_defn
{
public:
go_language ()
- : language_defn (language_go, go_language_data)
+ : language_defn (language_go)
{ /* Nothing. */ }
/* See language.h. */
struct type *);
}
-/* Constant data that describes the unknown language. */
-
-extern const struct language_data unknown_language_data =
-{
-};
-
/* Class representing the unknown language. */
class unknown_language : public language_defn
{
public:
unknown_language ()
- : language_defn (language_unknown, unknown_language_data)
+ : language_defn (language_unknown)
{ /* Nothing. */ }
/* See language.h. */
static unknown_language unknown_language_defn;
-/* Constant data for the fake "auto" language. */
-
-extern const struct language_data auto_language_data =
-{
-};
-
/* Class representing the fake "auto" language. */
class auto_language : public language_defn
{
public:
auto_language ()
- : language_defn (language_auto, auto_language_data)
+ : language_defn (language_auto)
{ /* Nothing. */ }
/* See language.h. */
/* Splitting strings into words. */
extern const char *default_word_break_characters (void);
-/* Structure tying together assorted information about a language.
-
- As we move over from the old structure based languages to a class
- hierarchy of languages this structure will continue to contain a
- mixture of both data and function pointers.
-
- Once the class hierarchy of languages in place the first task is to
- remove the function pointers from this structure and convert them into
- member functions on the different language classes.
-
- The current plan it to keep the constant data that describes a language
- in this structure, and have each language pass in an instance of this
- structure at construction time. */
-
-struct language_data
- {
- };
-
/* Base class from which all other language classes derive. */
-struct language_defn : language_data
+struct language_defn
{
- language_defn (enum language lang, const language_data &init_data)
- : language_data (init_data),
- la_language (lang)
+ language_defn (enum language lang)
+ : la_language (lang)
{
/* We should only ever create one instance of each language. */
gdb_assert (languages[lang] == nullptr);
evaluate_subexp_modula2
};
-/* Constant data describing the M2 language. */
-
-extern const struct language_data m2_language_data =
-{
-};
-
/* Class representing the M2 language. */
class m2_language : public language_defn
{
public:
m2_language ()
- : language_defn (language_m2, m2_language_data)
+ : language_defn (language_m2)
{ /* Nothing. */ }
/* See language.h. */
{NULL, OP_NULL, PREC_NULL, 0}
};
-/* Constant data representing the Objective-C language. */
-
-extern const struct language_data objc_language_data =
-{
-};
-
/* Class representing the Objective-C language. */
class objc_language : public language_defn
{
public:
objc_language ()
- : language_defn (language_objc, objc_language_data)
+ : language_defn (language_objc)
{ /* Nothing. */ }
/* See language.h. */
evaluate_subexp_opencl
};
-/* Constant data representing the OpenCL language. */
-extern const struct language_data opencl_language_data =
-{
-};
-
/* Class representing the OpenCL language. */
class opencl_language : public language_defn
{
public:
opencl_language ()
- : language_defn (language_opencl, opencl_language_data)
+ : language_defn (language_opencl)
{ /* Nothing. */ }
/* See language.h. */
nr_pascal_primitive_types
};
-/* Constant data representing the Pascal language. */
-
-extern const struct language_data pascal_language_data =
-{
-};
-
/* Class representing the Pascal language. */
class pascal_language : public language_defn
{
public:
pascal_language ()
- : language_defn (language_pascal, pascal_language_data)
+ : language_defn (language_pascal)
{ /* Nothing. */ }
/* See language.h. */
rust_evaluate_subexp
};
-/* Constant data representing the Rust language. */
-
-extern const struct language_data rust_language_data =
-{
-};
-
/* Class representing the Rust language. */
class rust_language : public language_defn
{
public:
rust_language ()
- : language_defn (language_rust, rust_language_data)
+ : language_defn (language_rust)
{ /* Nothing. */ }
/* See language.h. */