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: [RFC 3/8] Add output styles to gdb


On 2018-10-06 3:06 p.m., Tom Tromey wrote:
>>>>>> "Simon" == Simon Marchi <simark@simark.ca> writes:
> 
> Simon> Could we pass an additional enum parameter to do_field_string to
> Simon> indicate the type of element this field represents?  If this
> Simon> parameter has a default value of "NOTHING", then we can add then
> Simon> incrementally.
> 
> Yes, either this or, as you mentioned in another note, passing the style
> directly, could be done.  I suppose I tend to lean more toward the
> semantic approach than the style approach, because maybe having some
> kind of "type" attached to a field could be useful in other situations.
> 
> Be sure to read this as well:
> 
> https://sourceware.org/ml/gdb-patches/2018-10/msg00107.html
> 
> It presents another alternative -- one I rejected but maybe it can be
> rehabilitated.

I guess you refer to Pedro's suggestion of having custom format strings.  I am not
against that, I am just afraid that because it's a lot more efforts than something
like you did, it would postpone the results indefinitely (unless somebody is super
motivated to do it right now).

Also, I think these custom format strings (LLVM uses its own style too, as mentioned)
need to bring significantly more value (in terms of code simplicity) than the other
alternatives, because they are harder to learn, modify and debug than simple function
calls.
> These questions about the overall approach and the API are the main
> things to resolve up front, since they have the highest cost to change.

Indeed, but at least it's not external API, so we have the option to change.

Simon


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