T
Tim
Please advise if you can.
Presumably initialisation of members in member initialisation lists is
perfomed by 'C' run-time startup. If the CRT was never started-up would
those members be garbage? Which of these fundamental language support
features could I expect to be absent (and anything else I might have
missed):
static data zeroing
global data zeroing
static data initialisation
constant data initialisation
global data initialisation
scoped satic data initialisation
static object construction
global object construction
scoped object construction
initialisation of members in member lists
new
delete
I'm having to fix an embedded PowerPC-based platform that I never worked on
and which has many thousands of lines of lamentable source; the only
function it calls from the assembly startup code is Init_CPP_Constructors
which, in-turn, calls each constructor in an array of constructors in a
'ctors' segment. I see no other CRT startup calls; in fact, I don't even
think this is CRT code; I think it's simply a hand-made 'bare-bones'
startup. If so, would I be correct in assuming that a hefty chunk of support
features will be absent? The firmware actually uses enums, not constant data
and only has a few static variables and global data. It also has one class
with members initialised in the list; the rest have members initialised in
the constructors. My assumption is that there are quite a few oppertunuties
for disaster here; would you agree?
If anyone's wondering why I don't simply have a look using a debugger...
there isn't one... nor any trace port; I't a question of downloading to
flash and using a red LED or a green LED for diagnostic 'messages'. However,
I've just got home so even that isn't an option right now. Your help will be
greatly appreciated; your sympathy more than welcome
Regards
Tim
Presumably initialisation of members in member initialisation lists is
perfomed by 'C' run-time startup. If the CRT was never started-up would
those members be garbage? Which of these fundamental language support
features could I expect to be absent (and anything else I might have
missed):
static data zeroing
global data zeroing
static data initialisation
constant data initialisation
global data initialisation
scoped satic data initialisation
static object construction
global object construction
scoped object construction
initialisation of members in member lists
new
delete
I'm having to fix an embedded PowerPC-based platform that I never worked on
and which has many thousands of lines of lamentable source; the only
function it calls from the assembly startup code is Init_CPP_Constructors
which, in-turn, calls each constructor in an array of constructors in a
'ctors' segment. I see no other CRT startup calls; in fact, I don't even
think this is CRT code; I think it's simply a hand-made 'bare-bones'
startup. If so, would I be correct in assuming that a hefty chunk of support
features will be absent? The firmware actually uses enums, not constant data
and only has a few static variables and global data. It also has one class
with members initialised in the list; the rest have members initialised in
the constructors. My assumption is that there are quite a few oppertunuties
for disaster here; would you agree?
If anyone's wondering why I don't simply have a look using a debugger...
there isn't one... nor any trace port; I't a question of downloading to
flash and using a red LED or a green LED for diagnostic 'messages'. However,
I've just got home so even that isn't an option right now. Your help will be
greatly appreciated; your sympathy more than welcome
Regards
Tim