remote: Fix indentation in remote_new_objfile.
[deliverable/binutils-gdb.git] / gdb / cp-support.c
index e152d12779f9cfb7a8404651fd06c454d14fa610..5bd8fd4e9408afe7c6c6c0d47b1c5d865cbec3d7 100644 (file)
@@ -1,5 +1,5 @@
 /* Helper routines for C++ support in GDB.
-   Copyright (C) 2002-2020 Free Software Foundation, Inc.
+   Copyright (C) 2002-2021 Free Software Foundation, Inc.
 
    Contributed by MontaVista Software.
 
@@ -1452,10 +1452,7 @@ add_symbol_overload_list_qualified (const char *func_name,
      matching FUNC_NAME.  Make sure we read that symbol table in.  */
 
   for (objfile *objf : current_program_space->objfiles ())
-    {
-      if (objf->sf)
-       objf->sf->qf->expand_symtabs_for_function (objf, func_name);
-    }
+    objf->expand_symtabs_for_function (func_name);
 
   /* Search upwards from currently selected frame (so that we can
      complete on local vars.  */
@@ -1615,11 +1612,10 @@ gdb_demangle (const char *name, int options)
   int crash_signal = 0;
 
 #ifdef HAVE_WORKING_FORK
-  scoped_restore restore_segv
-    = make_scoped_restore (&thread_local_segv_handler,
-                          catch_demangler_crashes
-                          ? gdb_demangle_signal_handler
-                          : nullptr);
+  scoped_segv_handler_restore restore_segv
+    (catch_demangler_crashes
+     ? gdb_demangle_signal_handler
+     : nullptr);
 
   bool core_dump_allowed = gdb_demangle_attempt_core_dump;
   SIGJMP_BUF jmp_buf;
@@ -2213,13 +2209,12 @@ void _initialize_cp_support ();
 void
 _initialize_cp_support ()
 {
-  add_basic_prefix_cmd ("cplus", class_maintenance,
-                       _("C++ maintenance commands."),
-                       &maint_cplus_cmd_list,
-                       "maintenance cplus ",
-                       0, &maintenancelist);
-  add_alias_cmd ("cp", "cplus",
-                class_maintenance, 1,
+  cmd_list_element *maintenance_cplus
+    = add_basic_prefix_cmd ("cplus", class_maintenance,
+                           _("C++ maintenance commands."),
+                           &maint_cplus_cmd_list,
+                           0, &maintenancelist);
+  add_alias_cmd ("cp", maintenance_cplus, class_maintenance, 1,
                 &maintenancelist);
 
   add_cmd ("first_component",
This page took 0.023473 seconds and 4 git commands to generate.