From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joel Brobecker To: gdb-patches@sources.redhat.com Subject: Re: [RFA/RFC] New command: ``start'' Date: Wed, 19 May 2004 15:36:00 -0000 Message-id: <20040519153615.GD10684@gnat.com> References: <20040518024700.GV10684@gnat.com> <20040518214712.GD4036@nevyn.them.org> <20040518222740.GZ10684@gnat.com> <20040518224131.GA6026@nevyn.them.org> X-SW-Source: 2004-05/msg00572.html Hello Daniel, > > Also, the purpose of this function is slightly different from what > > I am trying to achieve with the language method: Despite the fact that > > most users see Ada programs starting at the begining of their main > > procedure, a closer approximation is that it starts inside procedure > > main() too. > > I would say that this was the meaning of main_name, rather than the > entry point. Global constructors for C++ traditionally happen before > the "main program" and don't appear on the backtrace; same seems > reasonable for Ada. Without "set backtrace past-main on" you can't see > the caller of the user's code; that seems reasonable for Ada also. Do > you need backtraces to continue to "main"? Your suggestion makes sense. > I don't want to proliferate mechanisms. It would be nice if the debug > readers could fill this in, and (if necessary, to support existing > tools) a language specific hook could be called as a fallback. So let's go for that route. How about: 1. I add the language-specific hook the way I designed it in my last patch. 2. Use that hook in main_name() when the debug info didn't provide the name of the main procedure. 3. Modify start_command to use main_name() instead of the language hook. Would that work for you? -- Joel