From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 69843385DC34; Tue, 7 Apr 2020 15:22:06 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 69843385DC34 From: "ssbssa at sourceware dot org" To: gdb-prs@sourceware.org Subject: [Bug gdb/21341] C++ vector elements wrongly evaluated with MI2 Date: Tue, 07 Apr 2020 15:22:06 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: gdb X-Bugzilla-Version: 7.12.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: ssbssa at sourceware dot org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gdb-prs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-prs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Apr 2020 15:22:06 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D21341 Hannes Domani changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ssbssa at sourceware dot o= rg --- Comment #1 from Hannes Domani --- (In reply to Vedran Ljubovic from comment #0) > Notice the line: > ^done,value=3D"@0x603014" > expected result should be: > ^done,value=3D"2" That's because in function mi_cmd_data_evaluate_expression the option to dereference references is disabled: opts.deref_ref =3D 0; I made a quick test and enabled this option in the debugger, then the result looks like this: (gdb) interpreter-exec mi2 '-data-evaluate-expression v[1]' ^done,value=3D"@0x3c20d4: 2" Not sure why it is like this, but this might be intentional. --=20 You are receiving this mail because: You are on the CC list for the bug.=