On 10/8/2010 6:47 PM, Denis Koroskin wrote:
On Sat, 09 Oct 2010 02:36:30 +0400, Austin Hastings <[email protected]> wrote:
object.Exception: Test
----------------
00 rtdmain2mainrunMain
01 rtdmain2mainrunAll
02 main
03 mainCRTStartup
04 RegisterWaitForInputIdle
Thanks for your help, Benjamin!
My next question would be, why does the stack trace look this way? I'm
throwing the exception from D's main. I assume that's entry #02. But
what are the other two entries, and why are they on the stack?
D main is not the true program entry point, there is a lot of
preparation done (gc_init(), module init, etc) before your main() takes
control, and these entries can be safely stripped since they are usually
not what you are looking for.
Denis,
Sure, there's stuff in assembly that calls main. What I'm asking about
is the stuff *inside* main that isn't in my code. As I see it, either:
1. The function I named "main" is at #02 on the above, in which case
there are two subroutines that I didn't call on the stack. Then I'd like
to know what they are, and whatever else anyone can tell me about them.
2. The function I named "main" is actually "rtdmain2mainrunMain", in
which case (a) why was it renamed this horrible value; and (b) what
other non-intuitive name manglings (!!) can I expect? (As if there was
such a thing as an intuitive name mangling. :-)
3. The function I named "main" is actually "RegisterWaitForInputIdle",
which will totally surprise me, in which case please explain why the
stack trace is upside down, and why that name was chosen?
=Austin