> On Feb 26, 2015, at 11:02 AM, Siva Chandra <sivachan...@google.com> wrote:
> 
> On Thu, Feb 26, 2015 at 10:55 AM,  <jing...@apple.com 
> <mailto:jing...@apple.com>> wrote:
>> 
>>> On Feb 26, 2015, at 10:46 AM, Siva Chandra <sivachan...@google.com> wrote:
>>> 
>>> Firstly, thanks for taking time to answer and respond to me.
>>> 
>>> I would like to present some historical context here wrt the "explore"
>>> command in GDB. Back when it was added, my use for it was to
>>> understand GCC's mega structs and unions. There was something like a
>>> flag typically which kind of specified how to interpret (for example,
>>> which field of a union is relevant) the rest of struct and union. So,
>>> it all made sense back then to have an interactive command in single
>>> session which helped me get to the relevant parts of a struct/union
>>> value. IMO, such a use case is still relevant. However, I will go with
>>> what your final take on this.
>> 
>> Note, in lldb you could do the same job you are describing here quite
>> handily by writing a synthetic child provider.  Since the Python data
>> formatters can do logic, it would be straight-forward to write one that
>> checks field A, and based on that decides which other fields to print.
>> The advantage of this is that then any expression that resolves to a
>> variable of that type will be printed appropriately without requiring any
>> special action on the user's part.
> 
> So, this means that one has to write data formatters (or,
> pretty-printers in GDB land) for the data structures in question. Can
> I take this as "we prefer data formatters over this explore command”?

I can’t speak for Jim (or for the broader “we”), but “I personally do prefer 
data formatters over this explore command”

> _______________________________________________
> lldb-dev mailing list
> lldb-dev@cs.uiuc.edu <mailto:lldb-dev@cs.uiuc.edu>
> http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev 
> <http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev>
Thanks,
- Enrico
📩 egranata@.com ☎️ 27683




_______________________________________________
lldb-dev mailing list
lldb-dev@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev

Reply via email to