From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id B975E386F821; Sun, 31 May 2020 00:39:22 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B975E386F821 From: "yangyibiao at hust dot edu.cn" To: gdb-prs@sourceware.org Subject: [Bug symtab/26061] Wrong debug info for argc at -O2 Date: Sun, 31 May 2020 00:39:22 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: symtab X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: yangyibiao at hust dot edu.cn 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: 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: Sun, 31 May 2020 00:39:22 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D26061 --- Comment #2 from Yibiao Yang --- (In reply to Baris Aktemur from comment #1) > I used gcc-10 ((Ubuntu 10.1.0-2ubuntu1~18.04) 10.1.0) and gdb > (10.0.50.20200525-git), but the scenario did not reproduce. >=20 > My initial guess is that it's related to the debug info. I'd suggest > printing the value of argc in hex (e.g. `(gdb) p/x -8454` gives 0xffffdef= a) > and also printing the address of local variables, in particular `buf`. Al= so, > doing stepi multiple times and checking the values each time an instructi= on > is stepped may help narrow down the problem. >=20 > Judging from the title, I conclude you also think that the problem is > related to the debug info. In that case, I believe it would fit better to > report this to gcc, rather than gdb. >=20 > PS: Just out of curiosity, I wonder why you CC'ed me to this bug report. > Thanks. Thank you very much for your suggestion. I CC'ed it to you as I found you are mentioned in a prior bug relate to this one. --=20 You are receiving this mail because: You are on the CC list for the bug.=