From mboxrd@z Thu Jan 1 00:00:00 1970 From: DJ Delorie To: Richard.Earnshaw@arm.com Cc: gdb-patches@sources.redhat.com Subject: Re: [patch] add trace capabilities to arm sim Date: Mon, 26 Feb 2001 10:57:00 -0000 Message-id: <200102261856.NAA01929@greed.delorie.com> References: <200102261840.SAA17450@cam-mail2.cambridge.arm.com> X-SW-Source: 2001-02/msg00467.html > > + sim_trace_one_arm_insn (pc, instr); > > This will bump up the cost of simulating each instruction by the overhead > of this call plus any code within that always gets executed. OK, I hadn't looked at the state->Exception check as a generic "check things" but that makes sense. > > + if (insn == 0) > > + { > > + state->Emulate = STOP; > > why should executing the (legal) instruction > > andeq r0, r0, r0 > > cause the simulation to halt (OK, it's not very useful, but it is a valid > NOP)? I took that from a commented out debug check in the emulator. The idea was to trap when the thread of execution left the code space and either hit zeros in the data space, or left RAM completely. I'll take it out now that I know it's a valid opcode. > > + if (!do_tracing) > > + return; > > Shouldn't this be the first thing you check? Either way worked for me, but I can make it first.