This is the mail archive of the gdb-patches@sourceware.org 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]
Other format: [Raw text]

Re: RFA: V850 sim: various fixes.


Hi Mike,

   It also adds a snippet of code to catch attempts to
   execute code via a NULL pointer.

usually the simulator represents the hardware. so if the hardware has memory at address 0 and someone were to load up an image with code there, there's nothing invalid when it comes to jumping there.

Personally I see the simulator as more of a testing and debugging tool. It does not try to be hardware accurate - it does not model the cache for example - so adding a feature that helps catch program errors, even if it not strictly modelling the hardware, seems OK to me.


what i do on the Blackfin side when it comes to testing is to have the
ELF manually pad the start with insns that'll trigger an exception
(just like it would on the hw).  then i set the entry point beyond
that.

Another fine approach. I'll see what DJ thinks, but I will be happy to remove the NULL trapping part of the patch if he does not like it.

Cheers
  Nick



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