From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16646 invoked by alias); 11 Nov 2013 07:26:41 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 16611 invoked by uid 89); 11 Nov 2013 07:26:40 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=1.7 required=5.0 tests=AWL,BAYES_00,GARBLED_BODY,RDNS_NONE,T_FROM_12LTRDOM autolearn=no version=3.3.2 X-HELO: relay1.mentorg.com Received: from Unknown (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 11 Nov 2013 07:26:39 +0000 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1Vflt9-0003xf-6n from Yao_Qi@mentor.com for gdb@sourceware.org; Sun, 10 Nov 2013 23:26:23 -0800 Received: from SVR-ORW-FEM-02.mgc.mentorg.com ([147.34.96.206]) by SVR-ORW-EXC-10.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Sun, 10 Nov 2013 23:26:23 -0800 Received: from qiyao.dyndns.org (147.34.91.1) by svr-orw-fem-02.mgc.mentorg.com (147.34.96.168) with Microsoft SMTP Server id 14.2.247.3; Sun, 10 Nov 2013 23:26:22 -0800 Message-ID: <5280864A.8020201@codesourcery.com> Date: Mon, 11 Nov 2013 07:26:00 -0000 From: Yao Qi User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130110 Thunderbird/17.0.2 MIME-Version: 1.0 To: "gdb@sourceware.org" Subject: has_more="0" with pretty-printer installed Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-IsSubscribed: yes X-SW-Source: 2013-11/txt/msg00035.txt.bz2 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 (齐尧)