aboutsummaryrefslogtreecommitdiff
path: root/sim/aarch64
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2015-12-27 01:41:27 -0500
committerMike Frysinger <vapier@gentoo.org>2015-12-27 01:44:37 -0500
commit5d01527536684c75235f2ed288b11d253572b570 (patch)
tree0962242a06fec9126bc3fc7657e59592dd4dbc6f /sim/aarch64
parent5e744ef887c1e879052cb30783638807190275f8 (diff)
downloadgdb-5d01527536684c75235f2ed288b11d253572b570.zip
gdb-5d01527536684c75235f2ed288b11d253572b570.tar.gz
gdb-5d01527536684c75235f2ed288b11d253572b570.tar.bz2
sim: aarch64/msp430: fix disassembler usage
The disasm framework reserves the private_data field for the disassemblers themselves, not for people who use the disassembler. Instead, there is an application_data field for callers such as the sim. Switch to it to avoid random corruption/crashes when the disassemblers use private_data.
Diffstat (limited to 'sim/aarch64')
-rw-r--r--sim/aarch64/ChangeLog5
-rw-r--r--sim/aarch64/interp.c4
2 files changed, 7 insertions, 2 deletions
diff --git a/sim/aarch64/ChangeLog b/sim/aarch64/ChangeLog
index 0afff0c..fbbf562 100644
--- a/sim/aarch64/ChangeLog
+++ b/sim/aarch64/ChangeLog
@@ -1,5 +1,10 @@
2015-12-27 Mike Frysinger <vapier@gentoo.org>
+ * interp.c (sim_dis_read): Change private_data to application_data.
+ (sim_create_inferior): Likewise.
+
+2015-12-27 Mike Frysinger <vapier@gentoo.org>
+
* Makefile.in (SIM_OBJS): Delete sim-hload.o.
2015-12-26 Mike Frysinger <vapier@gentoo.org>
diff --git a/sim/aarch64/interp.c b/sim/aarch64/interp.c
index d971039..b297460 100644
--- a/sim/aarch64/interp.c
+++ b/sim/aarch64/interp.c
@@ -85,7 +85,7 @@ sim_dis_read (bfd_vma memaddr,
unsigned int length,
struct disassemble_info * info)
{
- aarch64_get_mem_blk (info->private_data, memaddr, (char *) ptr, length);
+ aarch64_get_mem_blk (info->application_data, memaddr, (char *) ptr, length);
return 0;
}
@@ -207,7 +207,7 @@ sim_create_inferior (SIM_DESC sd, struct bfd *abfd, char **argv, char **env)
info.read_memory_func = sim_dis_read;
info.arch = bfd_get_arch (abfd);
info.mach = bfd_get_mach (abfd);
- info.private_data = cpu;
+ info.application_data = cpu;
if (info.mach == 0)
info.arch = bfd_arch_aarch64;
disassemble_init_for_target (& info);