From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 1499B3851C39; Sat, 30 May 2020 17:03:12 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1499B3851C39 From: "tankut.baris.aktemur at intel dot com" To: gdb-prs@sourceware.org Subject: [Bug symtab/26061] Wrong debug info for argc at -O2 Date: Sat, 30 May 2020 17:03:11 +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: tankut.baris.aktemur at intel dot com 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: Sat, 30 May 2020 17:03:12 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D26061 --- Comment #1 from Baris Aktemur -= -- 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. My initial guess is that it's related to the debug info. I'd suggest printi= ng the value of argc in hex (e.g. `(gdb) p/x -8454` gives 0xffffdefa) and also printing the address of local variables, in particular `buf`. Also, doing s= tepi multiple times and checking the values each time an instruction is stepped = may help narrow down the problem. Judging from the title, I conclude you also think that the problem is relat= ed to the debug info. In that case, I believe it would fit better to report th= is to gcc, rather than gdb. PS: Just out of curiosity, I wonder why you CC'ed me to this bug report. Thanks. --=20 You are receiving this mail because: You are on the CC list for the bug.=