aboutsummaryrefslogtreecommitdiff
path: root/gdb/arm-linux-tdep.c
diff options
context:
space:
mode:
authorBernd Edlinger <bernd.edlinger@hotmail.de>2020-02-16 21:43:33 +0100
committerBernd Edlinger <bernd.edlinger@hotmail.de>2020-02-18 22:22:56 +0100
commit6d0cf4464e0477db8c15b00a99df09d84d55cda4 (patch)
tree1c4427a4fd89b334768e87eebc002b6cdf0e4d63 /gdb/arm-linux-tdep.c
parent7001c1b7dcde6b0e8967652d18a7c1794d5faa78 (diff)
downloadfsf-binutils-gdb-6d0cf4464e0477db8c15b00a99df09d84d55cda4.zip
fsf-binutils-gdb-6d0cf4464e0477db8c15b00a99df09d84d55cda4.tar.gz
fsf-binutils-gdb-6d0cf4464e0477db8c15b00a99df09d84d55cda4.tar.bz2
Fix build with gcc-4.8.x
Use an explicit conversion from unique_ptr<T> to displaced_step_closure_up to avoid a compiler bug with gcc-4.8.4: ../../binutils-gdb/gdb/amd64-tdep.c:1514:10: error: cannot bind 'std::unique_ptr<amd64_displaced_step_closure>' lvalue to 'std::unique_ptr<amd64_displaced_step_closure>&&' gdb: 2020-02-18 Bernd Edlinger <bernd.edlinger@hotmail.de> * aarch64-tdep.c (aarch64_displaced_step_copy_insn): Use an explicit conversion. * amd64-tdep.c (amd64_displaced_step_copy_insn): Likewise. * arm-linux-tdep.c (arm_linux_displaced_step_copy_insn): Likewise. * i386-tdep.c (i386_displaced_step_copy_insn): Likewise. * rs6000-tdep.c (ppc_displaced_step_copy_insn): Likewise. * s390-tdep.c (s390_displaced_step_copy_insn): Likewise.
Diffstat (limited to 'gdb/arm-linux-tdep.c')
-rw-r--r--gdb/arm-linux-tdep.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gdb/arm-linux-tdep.c b/gdb/arm-linux-tdep.c
index ccb556b..f60cb51 100644
--- a/gdb/arm-linux-tdep.c
+++ b/gdb/arm-linux-tdep.c
@@ -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