fix objcopy of PE images with .buildid section
[binutils-gdb.git] / gdb / arm-linux-tdep.c
index b3ae04fb431fb3bd98219101a3d5d011f5b095d6..f60cb51763f1c5b14811494b646acf54b62d1f10 100644 (file)
@@ -1103,7 +1103,7 @@ arm_catch_kernel_helper_return (struct gdbarch *gdbarch, CORE_ADDR from,
    the program has stepped into a Linux kernel helper routine (which must be
    handled as a special case).  */
 
-static std::unique_ptr<displaced_step_closure>
+static displaced_step_closure_up
 arm_linux_displaced_step_copy_insn (struct gdbarch *gdbarch,
                                    CORE_ADDR from, CORE_ADDR to,
                                    struct regcache *regs)
@@ -1131,7 +1131,8 @@ arm_linux_displaced_step_copy_insn (struct gdbarch *gdbarch,
 
   arm_displaced_init_closure (gdbarch, from, to, dsc.get ());
 
-  return dsc;
+  /* This is a work around for a problem with g++ 4.8.  */
+  return displaced_step_closure_up (dsc.release ());
 }
 
 /* Implementation of `gdbarch_stap_is_single_operand', as defined in