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.


On Mon, Sep 10, 2012 at 8:34 AM, nick clifton wrote:
>>>    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.

well, you're talking about cycle accurate simulators vs functional
accurate simulators.  yes, many sims don't model down to the cache
level (although that functionality is available), nor things like the
pipeline, but at a functional level, those don't matter.  being able
to read/write/execute address 0 is a functional aspect.

i'm not against adding a flag to control this, but in general i don't
think completely blocking a functional aspect is correct ... although
DJ is the v850 guy, and i certainly won't force this policy on every
sim since not everyone uses the sim as a generically as i do.
-mike


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