alan buckley wrote:
[snip details of C++ program crash]
Basically, the order of execution is:
1) UnixLib initialisation
2) Global object constructors called (IIRC, the order the constructors
are called is the same as the order they appear on the linker's command
line).
3) main() called.
I tried creating dummy global classes in the first and last object files on
the linker command line that just did a printf and I still got nothing in
my redirected output file.
Do you know if global objects in the libraries may be being created first?
A quick google, for example:
<http://www.parashift.com/c++-faq-lite/ctors.html#faq-10.12>
shows that it is impossible to create global static objects in a
specific order, so my memory in point 2 above was wrong. It may work one
day but not the next. It seems likely that the authors of wesnoth would
know this and avoid it, so perhaps that is not the problem.
[snip technique for disabling handlers]
I tried this and I now get:
Error: 8000005
Message: Internal error: branch through zero at 03813584
(addresses in hex)
Any clues on where I can go from here would be appreciated.
This looks like the result of calling a NULL function pointer. C++ uses
function pointers to implement things like virtual functions and
inheritance.
If you type *showregs (or use !Reporter) to display the registers, does
r14 give you a return address telling you what attempted to call the
function pointer? By disassembling the code around r14, you should see a
sequence similar to:
MOV r14,pc
MOV pc, r?
or:
MOV r14,pc
LDR pc, [?, ?]
immediately before the address in r14. You can then trace the code back
until you find the function signature of the caller.
Lee.
_______________________________________________
GCCSDK mailing list [email protected]
Bugzilla: http://www.riscos.info/bugzilla/index.cgi
List Info: http://www.riscos.info/mailman/listinfo/gcc
Main Page: http://www.riscos.info/index.php/GCCSDK