This is the mail archive of the gdb@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: -stack-list-locals and children


On Mon, Jun 29, 2009 at 07:25, Vladimir Prus<vladimir@codesourcery.com> wrote:
> Niko Sams wrote:
>
>> On Sun, Jun 28, 2009 at 21:31, Vladimir Prus<vladimir@codesourcery.com> wrote:
>>> Niko Sams wrote:
>>>
>>>> Hi,
>>>>
>>>> -stack-list-locals doesn't return an numchild element. How can the IDE
>>>> know if a local
>>>> is has children?
>>>>
>>>> If there are children, they are listed in value:
>>>> ^done,locals=[{name="list",value="QList = {[0] = \"hello\"}"}]
>>>>
>>>> Is it a good idea to parse the value with an regular expression to
>>>> find out if there are children?
>>>>
>>>> Or is there a better way to get numchild?
>>>
>>> I think the right approach is a command that creates and returns varobjs
>>> for locals.
>> I thought a large number of -var-create commands could be omitted when using
>> the value we already get.
>> Basic tests showed me that -var-create is relatively slow for large lists.
>
> How slow and how did you measure this? I would not expect variable objects to
> be considerably slower than printing the value in any other way.
I measured using -enable-timings. I did -var-create for a QStringList
with 1000 items, took 0.6sec.

Niko


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