Make exception handling more efficient
[deliverable/binutils-gdb.git] / gdb / python / py-breakpoint.c
index dfc30f70bb28552ff7304eabf2afeeb5528e66f6..fc9543eba0e1720f6584d15d71281f2d3f5c89d4 100644 (file)
@@ -469,9 +469,9 @@ bppy_set_condition (PyObject *self, PyObject *newvalue, void *closure)
     {
       set_breakpoint_condition (self_bp->bp, exp, 0);
     }
-  catch (const gdb_exception &ex)
+  catch (gdb_exception &ex)
     {
-      except = ex;
+      except = std::move (ex);
     }
 
   GDB_PY_SET_HANDLE_EXCEPTION (except);
@@ -540,9 +540,9 @@ bppy_set_commands (PyObject *self, PyObject *newvalue, void *closure)
       counted_command_line lines = read_command_lines_1 (reader, 1, nullptr);
       breakpoint_set_commands (self_bp->bp, std::move (lines));
     }
-  catch (const gdb_exception &ex)
+  catch (gdb_exception &ex)
     {
-      except = ex;
+      except = std::move (ex);
     }
 
   GDB_PY_SET_HANDLE_EXCEPTION (except);
This page took 0.025833 seconds and 4 git commands to generate.