diff options
author | Yao Qi <yao.qi@linaro.org> | 2015-10-21 15:50:55 +0100 |
---|---|---|
committer | Yao Qi <yao.qi@linaro.org> | 2015-10-23 09:23:22 +0100 |
commit | 034f1a812d8f5655d08e2bdeb5ec7d56caa40d41 (patch) | |
tree | d3105bad4cc2b03f80b7de609c7e74f5914949c5 | |
parent | e9f3d8639d088aae89f11c3f8a3197b92c6cb5f2 (diff) | |
download | gdb-034f1a812d8f5655d08e2bdeb5ec7d56caa40d41.zip gdb-034f1a812d8f5655d08e2bdeb5ec7d56caa40d41.tar.gz gdb-034f1a812d8f5655d08e2bdeb5ec7d56caa40d41.tar.bz2 |
Initialize field insn_count correctly
This patch initialize dsd.insn_count, otherwise, it triggers the assert
below on testings we did recently.
gdb:
2015-10-23 Yao Qi <yao.qi@linaro.org>
* aarch64-tdep.c (aarch64_displaced_step_copy_insn): Set
dsd.insn_count to zero.
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/aarch64-tdep.c | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 9e82e2f..295ad96 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2015-10-23 Yao Qi <yao.qi@linaro.org> + + * aarch64-tdep.c (aarch64_displaced_step_copy_insn): Set + dsd.insn_count to zero. + 2015-10-22 Pedro Alves <palves@redhat.com> * infrun.c (stop_after_trap): Delete. diff --git a/gdb/aarch64-tdep.c b/gdb/aarch64-tdep.c index 995cbcf..55c5fb8 100644 --- a/gdb/aarch64-tdep.c +++ b/gdb/aarch64-tdep.c @@ -2818,6 +2818,7 @@ aarch64_displaced_step_copy_insn (struct gdbarch *gdbarch, dsd.new_addr = to; dsd.regs = regs; dsd.dsc = dsc; + dsd.insn_count = 0; aarch64_relocate_instruction (insn, &visitor, (struct aarch64_insn_data *) &dsd); gdb_assert (dsd.insn_count <= DISPLACED_MODIFIED_INSNS); |