This is the mail archive of the gdb-patches@sourceware.org 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/ada] Improve is_known_support_routine


> > The is_known_support_routine identifies any frame for which we cannot
> > find the source file. The check we currently have in place is a bit too
> > simplistic, so I replaced it with the function we use to locate source
> > files:
> > 
> > -  if (stat (sal.symtab->filename, &st))
> > +  if (symtab_to_fullname (sal.symtab) == NULL)
> 
> Fine with me, although I wonder if "the source is missing" is really
> the concept you want.  Why should whether source for the runtime
> library is present determine what we show?  That would make the
> feature more awkward to use for people who built their own libgnat and
> still have the build tree.

Actually, when I worked on cleaning up that routine, I found that
the attached comment was a bit incomplete. Here the new comment
explaining the main reason for discarding that frame:

   /* If there is a symtab, but the associated source file cannot be
      located, then assume this is not user code:  Selecting a frame
      for which we cannot display the code would not be very helpful
      for the user.  This should also take care of case such as VxWorks
      where the kernel has some debugging info provided for a few units.  */

   if (symtab_to_fullname (sal.symtab) == NULL)
     return 1;

In terms of the people building their own libgnat, it is true that
this might make it a bit more awkward for them. This is not necessarily
true that they would want in this case the debugger to select a frame
inside the runtime.  So we tried to find a compromise based on our own
usage and user feedback that was the most helpful in most cases.

-- 
Joel


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