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: [RFAv2 1/3] Use function_name_style to print Ada and C function names


On Sat, 2019-01-26 at 10:21 +0400, Joel Brobecker wrote:
> > > Philippe> Note that ada-typeprint.c print_func_type is called with
> > > Philippe> types representing functions and is also called to print
> > > Philippe> a function NAME and its type.  In such a case, the function
> > > Philippe> name will be printed using function name style.
> > > 
> > > In this particular spot it still isn't clear to me if this will
> > > sometimes style a type name.  So, I'm going to defer to Joel on the Ada
> > > bits.
> > 
> > Would be nice to have Joel confirming, but I am quite confident that
> > this will only style function names and not type names.
> 
> I reviewed the situation, and I think Philippe is right in the sense
> that when this function is called with a name, it's an actual function's
> name.
> 
> When one declares a function type in Ada, it has to be an access
> type (the Ada equivalent of a pointer). And the target (function)
> declaration is anonymous. This is what it looks like:
> 
>    type FA is access procedure (A : System.Address);
Yes, effectively, that is the reasoning.

> With all that, I'm wondering if Philippe had other examples
> where he can demonstrate the usefulness of this patch.
> At the moment, if the maintenance command is the only case,
> knowing that the output gets sent to a file, rather than
> stdout, and thus should not be stylized, are there other
> situations I couldn't think of where this patch would be
> useful?

This part of the patch ensures that the function names in the output of
  'info functions [-q] [-t TYPEREGEXP] [NAMEREGEXP]'
are stylized.

Thanks

Philippe



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