diff options
author | Mike Frysinger <vapier@gentoo.org> | 2015-12-27 01:41:27 -0500 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2015-12-27 01:44:37 -0500 |
commit | 5d01527536684c75235f2ed288b11d253572b570 (patch) | |
tree | 0962242a06fec9126bc3fc7657e59592dd4dbc6f /sim/msp430 | |
parent | 5e744ef887c1e879052cb30783638807190275f8 (diff) | |
download | gdb-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/msp430')
-rw-r--r-- | sim/msp430/ChangeLog | 5 | ||||
-rw-r--r-- | sim/msp430/msp430-sim.c | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/sim/msp430/ChangeLog b/sim/msp430/ChangeLog index f790a66..dd9aad0 100644 --- a/sim/msp430/ChangeLog +++ b/sim/msp430/ChangeLog @@ -1,5 +1,10 @@ 2015-12-27 Mike Frysinger <vapier@gentoo.org> + * msp430-sim.c (sim_dis_read): Change private_data to application_data. + (msp430_step_once): 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/msp430/msp430-sim.c b/sim/msp430/msp430-sim.c index 6711858..ce29fb1 100644 --- a/sim/msp430/msp430-sim.c +++ b/sim/msp430/msp430-sim.c @@ -882,7 +882,7 @@ msp430_dis_read (bfd_vma memaddr, unsigned int length, struct disassemble_info *dinfo) { - SIM_DESC sd = dinfo->private_data; + SIM_DESC sd = dinfo->application_data; sim_core_read_buffer (sd, MSP430_CPU (sd), 0, myaddr, memaddr, length); return 0; } @@ -1154,7 +1154,7 @@ msp430_step_once (SIM_DESC sd) sim_core_read_buffer (sd, MSP430_CPU (sd), 0, b, opcode_pc, opsize); init_disassemble_info (&info, stderr, (fprintf_ftype) fprintf); - info.private_data = sd; + info.application_data = sd; info.read_memory_func = msp430_dis_read; fprintf (stderr, "%#8x ", opcode_pc); |