has_more="0" with pretty-printer installed

Yao Qi <[email protected]>
Newsgroups gmane.comp.gdb.devel
Message-ID <[email protected]>
Hi,
I find the output of "-var-create" in gdb.python/py-mi.exp confuses me a 
little,

-var-create container @ c^M
^done,name="container",numchild="0",value="{...}",type="zzz_type",thread-id="1",dynamic="1",has_more="0"^M
                                                  ^^^^^^^^^^^^
(gdb) ^M
PASS: gdb.python/py-mi.exp: create container varobj

On this test, pretty-printer is installed, and 'c' is of type 'zzz_type',

struct container
{
   string name;
   int len;
   int *elements;
};

typedef struct container zzz_type;

IIUC, has_more should be 1 here, because c has three fields.  Am I 
missing something?  The minimum steps to reproduce this problem are:

$ ./gdb ./testsuite/gdb.python/py-mi
(gdb) b main
Breakpoint 1 at 0x80485ee: file 
../../../../git/gdb/testsuite/gdb.python/py-prettyprint.c, line 264.
(gdb) run
Starting program: 
/home/yao/Source/gnu/gdb/build-git/x86/gdb/testsuite/gdb.python/py-mi

Breakpoint 1, main () at 
../../../../git/gdb/testsuite/gdb.python/py-prettyprint.c:264
264       string x = make_string ("this is x");
(gdb) python exec (open 
('gdb/git/gdb/testsuite/gdb.python/py-prettyprint.py').read ())
(gdb) interpreter-exec mi "-enable-pretty-printing"
^done
(gdb) interpreter-exec mi "-var-create container @ c"
^done,name="container",numchild="0",value="{...}",type="zzz_type",thread-id="1",dynamic="1",has_more="1"
                                                  ^^^^^^^^^^^
// note: at this point, has_more is 1, which looks right to me

(gdb) b 329
Breakpoint 2 at 0x804871e: file 
../../../../git/gdb/testsuite/gdb.python/py-prettyprint.c, line 329.
(gdb) c
Continuing.

Breakpoint 2, main () at 
../../../../git/gdb/testsuite/gdb.python/py-prettyprint.c:329
329       add_item (&c, 23);            /* MI breakpoint here */
(gdb) interpreter-exec mi "-var-create container1 @ c"
^done,name="container1",numchild="0",value="{...}",type="zzz_type",thread-id="1",dynamic="1",has_more="0"
                                                  ^^^^^^^^^^^^

// has_more becomes 0.

-- 
Yao (齐尧)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.