[PATCH 2/3] sim: msp430: set initial PC to ELF entry if available
Mike Frysinger
vapier@gentoo.org
Mon Mar 10 22:28:00 GMT 2014
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20140310/c6975970/attachment.sig>
More information about the Gdb-patches
mailing list