This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA/RFC] New command: ``start''


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]