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: ui_out format strings for fields and styles (Re: [PATCH] Style "pwd" output)


On 6/7/19 7:27 PM, Tom Tromey wrote:
> Tom> My patch also removes (really just comments out) %pS and %pN in favor of
> Tom> requiring %ps.  Those could be restored with a bit of effort I guess.
> 
> I think we do need these.
> 
> I have been trying a patch to style gdb's meta-data output, stuff like
> <unavailable>.  There are cases where the <...> contains some other
> value, like:
> 
> 	  fprintf_filtered (stream, " <repeats %u times>", reps);
> 
> Here we want to rewrite as:
> 
> 	  fprintf_filtered (stream, " %pS<repeats %u times>%pN",
>                             metadata_style.style ().ptr (), reps, nullptr);
> 

Do you still see value in keeping %pN?  If we make nullptr mean
"keep the default", as you mentioned earlier, then the above can be
rewritten as:

	  fprintf_filtered (stream, " %pS<repeats %u times>%pS",
                            metadata_style.style ().ptr (), reps, nullptr);

Thanks,
Pedro Alves


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