+2020-09-16 Andrew Burgess <andrew.burgess@embecosm.com>
+
+ * ada-lang.c (ada_language_data): Remove la_macro_expansion
+ initializer.
+ * c-lang.c (c_language_data): Likewise.
+ (c_language::macro_expansion): New member function.
+ (cplus_language_data): Likewise.
+ (cplus_language::macro_expansion): New member function.
+ (asm_language_data): Likewise.
+ (asm_language::macro_expansion): New member function.
+ (minimal_language_data): Likewise.
+ (minimal_language::macro_expansion): New member function.
+ * d-lang.c (d_language_data): Remove la_macro_expansion
+ initializer.
+ * f-lang.c (f_language_data): Likewise.
+ * go-lang.c (go_language_data): Likewise.
+ * language.c (unknown_language_data): Likewise.
+ (auto_language_data): Likewise.
+ * language.h (language_data): Remove la_macro_expansion field.
+ (language_defn::macro_expansion): New member function.
+ * m2-lang.c (m2_language_data): Remove la_macro_expansion
+ initializer.
+ * objc-lang.c (objc_language_data): Likewise.
+ (objc_language::macro_expansion): New member function.
+ * opencl-lang.c (opencl_language_data): Likewise.
+ (opencl_language::macro_expansion): New member function.
+ * p-lang.c (pascal_language_data): Remove la_macro_expansion
+ initializer.
+ * rust-lang.c (rust_language_data): Likewise.
+ * symtab.c (default_collect_symbol_completion_matches_break_on):
+ Update call to macro_expansion.
+
2020-09-16 Andrew Burgess <andrew.burgess@embecosm.com>
* ada-lang.c (ada_language_data): Remove la_array_ordering
extern const struct language_data ada_language_data =
{
- macro_expansion_no,
&ada_exp_descriptor,
ada_op_print_tab, /* expression operators for printing */
&ada_varobj_ops,
extern const struct language_data c_language_data =
{
- macro_expansion_c,
&exp_descriptor_c,
c_op_print_tab, /* expression operators for printing */
&c_varobj_ops,
bool store_sym_names_in_linkage_form_p () const override
{ return true; }
+
+ /* See language.h. */
+
+ enum macro_expansion macro_expansion () const override
+ { return macro_expansion_c; }
};
/* Single instance of the C language class. */
extern const struct language_data cplus_language_data =
{
- macro_expansion_c,
&exp_descriptor_c,
c_op_print_tab, /* expression operators for printing */
&cplus_varobj_ops,
const char *name_of_this () const override
{ return "this"; }
+ /* See language.h. */
+
+ enum macro_expansion macro_expansion () const override
+ { return macro_expansion_c; }
+
protected:
/* See language.h. */
extern const struct language_data asm_language_data =
{
- macro_expansion_c,
&exp_descriptor_c,
c_op_print_tab, /* expression operators for printing */
&default_varobj_ops,
bool store_sym_names_in_linkage_form_p () const override
{ return true; }
+
+ /* See language.h. */
+
+ enum macro_expansion macro_expansion () const override
+ { return macro_expansion_c; }
};
/* The single instance of the ASM language class. */
extern const struct language_data minimal_language_data =
{
- macro_expansion_c,
&exp_descriptor_c,
c_op_print_tab, /* expression operators for printing */
&default_varobj_ops,
bool store_sym_names_in_linkage_form_p () const override
{ return true; }
+
+ /* See language.h. */
+
+ enum macro_expansion macro_expansion () const override
+ { return macro_expansion_c; }
};
/* The single instance of the minimal language class. */
extern const struct language_data d_language_data =
{
- macro_expansion_no,
&exp_descriptor_c,
d_op_print_tab, /* Expression operators for printing. */
&default_varobj_ops,
extern const struct language_data f_language_data =
{
- macro_expansion_no,
&exp_descriptor_f,
f_op_print_tab, /* expression operators for printing */
&default_varobj_ops,
extern const struct language_data go_language_data =
{
- macro_expansion_no,
&exp_descriptor_c,
go_op_print_tab, /* Expression operators for printing. */
&default_varobj_ops,
extern const struct language_data unknown_language_data =
{
- macro_expansion_no,
&exp_descriptor_standard,
unk_op_print_tab, /* expression operators for printing */
&default_varobj_ops,
extern const struct language_data auto_language_data =
{
- macro_expansion_no,
&exp_descriptor_standard,
unk_op_print_tab, /* expression operators for printing */
&default_varobj_ops,
struct language_data
{
- /* Style of macro expansion, if any, supported by this language. */
- enum macro_expansion la_macro_expansion;
-
/* Definitions related to expression printing, prefixifying, and
dumping. */
virtual enum array_ordering array_ordering () const
{ return array_row_major; }
+ /* Style of macro expansion, if any, supported by this language. The
+ default is no macro expansion. */
+
+ virtual enum macro_expansion macro_expansion () const
+ { return macro_expansion_no; }
+
protected:
/* This is the overridable part of the GET_SYMBOL_NAME_MATCHER method.
extern const struct language_data m2_language_data =
{
- macro_expansion_no,
&exp_descriptor_modula2,
m2_op_print_tab, /* expression operators for printing */
&default_varobj_ops,
extern const struct language_data objc_language_data =
{
- macro_expansion_c,
&exp_descriptor_standard,
objc_op_print_tab, /* Expression operators for printing */
&default_varobj_ops,
const char *name_of_this () const override
{ return "self"; }
+
+ /* See language.h. */
+
+ enum macro_expansion macro_expansion () const override
+ { return macro_expansion_c; }
};
/* Single instance of the class representing the Objective-C language. */
/* Constant data representing the OpenCL language. */
extern const struct language_data opencl_language_data =
{
- macro_expansion_c,
&exp_descriptor_opencl,
c_op_print_tab, /* expression operators for printing */
&default_varobj_ops,
c_print_type (type, varstring, stream, show, level, flags);
}
+
+ /* See language.h. */
+
+ enum macro_expansion macro_expansion () const override
+ { return macro_expansion_c; }
};
/* Single instance of the OpenCL language class. */
extern const struct language_data pascal_language_data =
{
- macro_expansion_no,
&exp_descriptor_standard,
pascal_op_print_tab, /* expression operators for printing */
&default_varobj_ops,
extern const struct language_data rust_language_data =
{
- macro_expansion_no,
&exp_descriptor_rust,
c_op_print_tab, /* expression operators for printing */
&default_varobj_ops,
/* Skip macros if we are completing a struct tag -- arguable but
usually what is expected. */
- if (current_language->la_macro_expansion == macro_expansion_c
+ if (current_language->macro_expansion () == macro_expansion_c
&& code == TYPE_CODE_UNDEF)
{
gdb::unique_xmalloc_ptr<struct macro_scope> scope;