Fix big-endian aggregate assignment in Ada
[deliverable/binutils-gdb.git] / gdb / breakpoint.c
index c74fc61ea42245112d1f8f40b3432dd976e45f63..f6d2f36d0a4020d81eb9b4e6ec350f796ebedb9d 100644 (file)
@@ -2545,9 +2545,9 @@ insert_bp_location (struct bp_location *bl,
              if (val)
                bp_excpt = gdb_exception {RETURN_ERROR, GENERIC_ERROR};
            }
-         catch (const gdb_exception &e)
+         catch (gdb_exception &e)
            {
-             bp_excpt = e;
+             bp_excpt = std::move (e);
            }
        }
       else
@@ -2584,9 +2584,9 @@ insert_bp_location (struct bp_location *bl,
                        bp_excpt
                          = gdb_exception {RETURN_ERROR, GENERIC_ERROR};
                    }
-                 catch (const gdb_exception &e)
+                 catch (gdb_exception &e)
                    {
-                     bp_excpt = e;
+                     bp_excpt = std::move (e);
                    }
 
                  if (bp_excpt.reason != 0)
@@ -2608,9 +2608,9 @@ insert_bp_location (struct bp_location *bl,
                  if (val)
                    bp_excpt = gdb_exception {RETURN_ERROR, GENERIC_ERROR};
                }
-             catch (const gdb_exception &e)
+             catch (gdb_exception &e)
                {
-                 bp_excpt = e;
+                 bp_excpt = std::move (e);
                }
            }
          else
@@ -13603,12 +13603,10 @@ location_to_sals (struct breakpoint *b, struct event_location *location,
     {
       sals = b->ops->decode_location (b, location, search_pspace);
     }
-  catch (const gdb_exception_error &e)
+  catch (gdb_exception_error &e)
     {
       int not_found_and_ok = 0;
 
-      exception = e;
-
       /* For pending breakpoints, it's expected that parsing will
         fail until the right shared library is loaded.  User has
         already told to create pending breakpoints and don't need
@@ -13637,6 +13635,8 @@ location_to_sals (struct breakpoint *b, struct event_location *location,
          b->enable_state = bp_disabled;
          throw;
        }
+
+      exception = std::move (e);
     }
 
   if (exception.reason == 0 || exception.error != NOT_FOUND_ERROR)
This page took 0.025677 seconds and 4 git commands to generate.