From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 129761 invoked by alias); 5 Jun 2018 09:49:54 -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 129750 invoked by uid 89); 5 Jun 2018 09:49:54 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-4.1 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=HTo:U*gdb, displayed, H*r:sk:gdb@sou X-HELO: smtp.eu.adacore.com Received: from mel.act-europe.fr (HELO smtp.eu.adacore.com) (194.98.77.210) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 05 Jun 2018 09:49:52 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id 5F56B8139E for ; Tue, 5 Jun 2018 11:49:50 +0200 (CEST) Received: from smtp.eu.adacore.com ([127.0.0.1]) by localhost (smtp.eu.adacore.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id gaWGqyzOlhlL for ; Tue, 5 Jun 2018 11:49:50 +0200 (CEST) Received: from Xaviers-MacBook-Pro.local (unknown [46.18.100.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.eu.adacore.com (Postfix) with ESMTPSA id 3132281398 for ; Tue, 5 Jun 2018 11:49:50 +0200 (CEST) Subject: variable displayed twice when using GDB/MI To: gdb@sourceware.org References: <20180601140130.GA296965@host1.jankratochvil.net> From: Xavier Roirand Message-ID: <4370e1fc-ec28-0889-85fa-28706ce38630@adacore.com> Date: Tue, 05 Jun 2018 09:49:00 -0000 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2018-06/txt/msg00005.txt.bz2 Hello, I'm using a simple C program: void main() { int i=0; } When debugging with MI interpreter, I want to display variable i: (gdb) -break-insert main ^done,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="0x000000000040049b",func="main",file="foo.c",fullname="/tmp/foo.c",line="2",thread-groups=["i1"],times="0",original-location="main"} (gdb) -exec-run [...] display i &"display i\n" ~"1: i = 0" ~"\n" ^done (gdb) If I do a 'next': (gdb) n &"n\n" ^running *running,thread-id="all" (gdb) ~"1: i = 0" ~"\n" ~"3\t}\n" ~"1: i = 0" ~"\n" [...] (gdb) The variable i is displayed twice, is it expected ? Using CLI interpreter it's displayed only once so I'm wondering if this is expected or not ? Regards.