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: [PATCH 2/3] sim: msp430: set initial PC to ELF entry if available


On Mon 10 Mar 2014 17:09:25 DJ Delorie wrote:
> In the case where there *is* a valid reset vector, I think it would be
> much better to honor it than to choose some other "arbitrary" (in
> terms of hardware simulation) entry point.

i'm fine with making the default virtual environment fallback to the entry 
point when the reset vector is 0.

> Just because the other simulators don't accurately simulate the
> hardware, doesn't mean they all shouldn't.

we're talking about the virtual environment here, not the operating 
environment.  seems a bit funny belittling other ports when the msp430 sim 
itself doesn't properly support simulating the hardware ;).  the few random 
hacks it has in place to try and emulate a few choice aspects of the hardware 
doesn't mean it accurately simulates things either.

> Also, the libgloss for msp430 always sets a valid reset vector, so all
> the "simple ELFs" you create should already work.

newlib/libgloss requires a compiler which isn't appropriate from most sim 
tests.  using C for higher level things is perfectly reasonable (especially 
when validating hardware peripheral simulation), but there should be pure 
assembly tests that focus on the ISA.

it's also how i tend to personally test things when it comes to the sim & low 
level hardware -- i use gas+ld only.  a C runtime is a luxury and just gets in 
the way :).
-mike

Attachment: signature.asc
Description: This is a digitally signed message part.


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