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: [PATCH:MI] Return a subset of a variable object's children


Andrà PÃnitz wrote:

> On Wednesday 30 April 2008 08:24:30 Vladimir Prus wrote:
>> Nick Roberts wrote:
>> > [...]
>> > I was thinking that only a small number of children would ever exist
>> > simultaneously.  Scrolling might make that a larger number but maybe
>> > it could be arranged to delete children that go out of view.
>> 
>> I wonder if deleting children that are not visible is possible/desirable.
> 
> Well, I would still prefer a simple toggle that would allow me to switch off
> any automatic creation of children

There's no automatic creation. Until you do -list-children, no child is created.

> and one-shot 'expression evaluation' and one-shot 'children listing'.

What is 'expression evaluation'. As for one-shot 'children listing' -- the
idea is that you can pass the number of children to create for -list-children,
and GDB won't do anything about children beyond this range.

> I would expect this to be much simpler to implement on the gdb side and
> gives all the flexibility needed (as far as I am concerned) on the
> frontend side.
> 
> Complex containers may do all kind of funny stuff behind the debugger's
> back (like reallocation, rebalancing, renumbering, moving stuff to and from
> secondary memory) which a frontend might want to handle transparently.
> I would not expect gdb to even be aware of that (let alone to handle(!) it).
> 
> Also, hard-wiring behaviour to certain types calls for trouble on the
> frontend side. E.g. if there's a std::string member somewhere I might want
> to see it as something "human readable" (-> 1 child), or a byte array
> (->lots of children), or maybe a structured view if it is XML (-> some children).
> So whatever behaviour is hard-wired will be wrong for  n - 1 use cases.

I'm afraid I don't get your point. If you want funny representations of
any type you can either:

1. Use Python visualizers (that can be switched on the fly)
2. Just get the raw data and show it as you see fit.

- Volodya


> 
> Regards,
> Andre'



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