Hi Laurent,
The variables and expressions are evaluated lazily. At
least that's how it is supposed to work. If you can provide a simple test case
and submit it to bugzilla I can track the problem you are
seeing.
The evaluation of an _expression_ is different than of
a variable for a simple reason: the _expression_ is evaluated for all active
contexts (stack frames), variables only for the context they are created
in.
Regards,
Mikhail
Greetings.
I have
a pointer lcb (large control block) to a large structure, that contains
201 elements. I have a breakpoint on a function that takes lcb as a
parameter.
I have
two concerns (this is with CDI):
a) When
I stop at the breakpoint, even if lcb is collapsed, and (sometimes even if the
Variables view is not active), I see a ptype lcb request being sent on the MI
interface.
[1,239,842,202,394] 2761 ptype
lcb
[1,239,842,202,395] ~"ptype lcb\n"
[1,239,842,202,399] ~"type =
struct largedata_ {\n"
>>> followed by 201
elements.
My
concern is that the response generates a lot of traffic. Which can
introduce a significant delay on a slow interface.
If lcb
is also added to the Expressions view, I see two additional
ptypes
[1,239,852,566,876] 4066-var-create - *
lcb
[1,239,852,566,885]
4066^done,name="var139",numchild="201",type="largedata
*"
[1,239,852,566,885] (gdb)
[1,239,852,566,885] 4067 ptype largedata
*
[1,239,852,566,886] ~"ptype largedata *\n"
[1,239,852,566,891] ~"type
= struct largedata_ {\n"
skipped lines: 201
[1,239,852,568,439] ~"}
*\n"
[1,239,852,568,442] 4067^done
[1,239,852,568,442]
(gdb)
[1,239,852,568,443] 4068 ptype lcb
[1,239,852,568,444] ~"ptype
lcb\n"
[1,239,852,568,448] ~"type = struct largedata_ {\n"
skipped
lines: 201
[1,239,852,570,069] ~"} *\n"
It
looks like a lot of redundant traffic, the more if the pointer variable is
collapsed and I'm only interested in the pointer variable value. It's
also interesting the Variables view and the Expressions view have two
different behaviors.
These 2
ptypes are observed, even if the Expressions view is not active, or at least
sometimes.
b) When
lcb is added to the Expressions view, in addition to the two ptypes, if the
view is active, I will see ptypes for all unique element types in the
structure, even if lcb is collapsed. And for each single step, I see
a
[1,239,852,896,259] 4173-var-list-children
var139
[1,239,852,897,848]
4173^done,numchild="201",children=[child={name="var139.field1",exp="fiel\
skipped
lines: 157
So my two questions
are:
1) is
there a way to have a lazy evaluation, so that expressions or variables are
only evaluated on request. I see that partially, for instance for the
Variables view, I see a ptype, but no var-list-children - while the
Expressions view is more chatty. I'd like to defer all children
actions to when the variable is expanded. Or at a minimum, not to
request a var-list-children when the variable is
collapsed.
2) the
observed behavior is not consistent. Sometimes I see requests, even if
the view is not selected, other times I don't see them. So I wonder if
this is an issue that is already reported.
Thank
you
Laurent
--
IMPORTANT NOTICE: The contents of this email and any
attachments are confidential and may also be privileged. If you are not the
intended recipient, please notify the sender immediately and do not disclose
the contents to any other person, use it for any purpose, or store or copy the
information in any medium. Thank you.