gdb: Remove a non-const reference parameter
[deliverable/binutils-gdb.git] / gdb / exec.c
index 6a9f9194d005eb74e955e2ebd69097c3be9f18eb..3098fcaadd5c5ca5e8819d8ccbfcc57ec4a5765a 100644 (file)
@@ -45,7 +45,7 @@
 #include <sys/stat.h>
 #include "solist.h"
 #include <algorithm>
-#include "common/pathstuff.h"
+#include "gdbsupport/pathstuff.h"
 
 void (*deprecated_file_changed_hook) (const char *);
 
@@ -148,7 +148,7 @@ void
 try_open_exec_file (const char *exec_file_host, struct inferior *inf,
                    symfile_add_flags add_flags)
 {
-  struct gdb_exception prev_err = exception_none;
+  struct gdb_exception prev_err;
 
   /* exec_file_attach and symbol_file_add_main may throw an error if the file
      cannot be opened either locally or remotely.
@@ -167,12 +167,12 @@ try_open_exec_file (const char *exec_file_host, struct inferior *inf,
         exec_file_attach will clear state.  */
       exec_file_attach (exec_file_host, add_flags & SYMFILE_VERBOSE);
     }
-  catch (const gdb_exception_RETURN_MASK_ERROR &err)
+  catch (gdb_exception_error &err)
     {
       if (err.message != NULL)
        warning ("%s", err.what ());
 
-      prev_err = err;
+      prev_err = std::move (err);
     }
 
   if (exec_file_host != NULL)
@@ -181,7 +181,7 @@ try_open_exec_file (const char *exec_file_host, struct inferior *inf,
        {
          symbol_file_add_main (exec_file_host, add_flags);
        }
-      catch (const gdb_exception_RETURN_MASK_ERROR &err)
+      catch (const gdb_exception_error &err)
        {
          if (!exception_print_same (prev_err, err))
            warning ("%s", err.what ());
This page took 0.035303 seconds and 4 git commands to generate.