From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 44E48395307B; Mon, 9 Mar 2020 22:45:56 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 44E48395307B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1583793956; bh=NMBPNb1i+0uMfwEp1OHjWIIr9cLDiGn0TNKQVM0O2Xk=; h=From:To:Subject:Date:From; b=DVCk1PGZOO0HxxEfoGh38UfMKm5bZYk51bGyhy9rRAEIlInnu4e9ERE8jbN8ggzMV wD1ZlBllc36VeM2LY6/UEmhClWtNeEa76McsKULexkTpka99PUaiVvbbB/HEUxOPfV cgP75/t9L4Z9h7mwgVZU1kVtBeVlL9EkfFavyOI8= From: "sergiodj at redhat dot com" To: gdb-prs@sourceware.org Subject: [Bug gdb/25650] New: GDB can't 'printf' a convenience variable holding an inferior address Date: Mon, 09 Mar 2020 22:45:56 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: gdb X-Bugzilla-Version: 9.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: sergiodj at redhat dot com X-Bugzilla-Status: NEW 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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: 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: Mon, 09 Mar 2020 22:45:56 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D25650 Bug ID: 25650 Summary: GDB can't 'printf' a convenience variable holding an inferior address Product: gdb Version: 9.1 Status: NEW Severity: normal Priority: P2 Component: gdb Assignee: unassigned at sourceware dot org Reporter: sergiodj at redhat dot com Target Milestone: --- This is a regression from 8.3. When assigning an inferior address to a convenience variable, GDB is unable= to print it correctly. It's possible to reproduce this bug by doing: $ echo -e 'int main(){const char a[]=3D"test";return 0;}' | gcc -x c - -O0-= g3 $ ./gdb/gdb --data-directory ./gdb/data-directory -q ./a.out -ex 'start' -ex 'set $x =3D (const char *) (&a[0] + 2)' -ex 'printf "%s\n", $x' This has been fixed upstream; I'm creating this bug to backport the fix to = the 9.1 branch. --=20 You are receiving this mail because: You are on the CC list for the bug.=