diff options
Diffstat (limited to 'gdb/compile')
-rw-r--r-- | gdb/compile/compile-c-support.c | 8 | ||||
-rw-r--r-- | gdb/compile/compile-cplus-types.c | 4 | ||||
-rw-r--r-- | gdb/compile/compile.c | 4 |
3 files changed, 6 insertions, 10 deletions
diff --git a/gdb/compile/compile-c-support.c b/gdb/compile/compile-c-support.c index 0d32350..ac8888f 100644 --- a/gdb/compile/compile-c-support.c +++ b/gdb/compile/compile-c-support.c @@ -185,18 +185,18 @@ static void write_macro_definitions (const struct block *block, CORE_ADDR pc, struct ui_file *file) { - gdb::unique_xmalloc_ptr<struct macro_scope> scope; + macro_scope scope; if (block != NULL) scope = sal_macro_scope (find_pc_line (pc, 0)); else scope = default_macro_scope (); - if (scope == NULL) + if (!scope.is_valid ()) scope = user_macro_scope (); - if (scope != NULL && scope->file != NULL && scope->file->table != NULL) + if (scope.is_valid () && scope.file->table != nullptr) { - macro_for_each_in_scope (scope->file, scope->line, + macro_for_each_in_scope (scope.file, scope.line, [&] (const char *name, const macro_definition *macro, macro_source_file *source, diff --git a/gdb/compile/compile-cplus-types.c b/gdb/compile/compile-cplus-types.c index 56ef033..cf70fe4 100644 --- a/gdb/compile/compile-cplus-types.c +++ b/gdb/compile/compile-cplus-types.c @@ -1395,9 +1395,7 @@ gcc_cp_plugin::pop_binding_level (const char *debug_name) return pop_binding_level (); } -void _initialize_compile_cplus_types (); -void -_initialize_compile_cplus_types () +INIT_GDB_FILE (compile_cplus_types) { add_setshow_boolean_cmd ("compile-cplus-types", no_class, &debug_compile_cplus_types, _("\ diff --git a/gdb/compile/compile.c b/gdb/compile/compile.c index ab4cb0b..229e155 100644 --- a/gdb/compile/compile.c +++ b/gdb/compile/compile.c @@ -868,9 +868,7 @@ compile_command (const char *args, int from_tty) /* See compile.h. */ cmd_list_element *compile_cmd_element = nullptr; -void _initialize_compile (); -void -_initialize_compile () +INIT_GDB_FILE (compile) { compile_cmd_element = add_prefix_cmd ("compile", class_obscure, compile_command, |