This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: [patch] add trace capabilities to arm sim



> > +       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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]