From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id F15883858C5E; Tue, 23 Jan 2024 15:21:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org F15883858C5E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1706023287; bh=4sMED1ZDZN5AEZcWX4e79g/GDyvUAPRnqnFTsaWtP2w=; h=From:To:Subject:Date:In-Reply-To:References:From; b=F03nlk8FBtDEdtqOicmoJ47eyqCQgowyHPOEmw1wWrC1PHHWDqNSXG/wh5Myyotu2 +Lhr6+1g52GBfXX51ICuVvXEk+fDJr4XZaIY0j5jnfRqch0Wu83j/rtBl7u+vdsFu2 vAr0yfOjFQFadpDwjvnpiPryUEmq4YqOuFkvyDJc= From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug debug/10466] Can't debug the first function in a C file that is included in another C file Date: Tue, 23 Jan 2024 15:21:27 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: debug X-Bugzilla-Version: 3.2.2 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: FIXED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: resolution bug_status Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D10466 Richard Biener changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|NEW |RESOLVED --- Comment #6 from Richard Biener --- Reading symbols from ./a.out... (gdb) b bar Breakpoint 1 at 0x400545: file b.c, line 4. (gdb) b bar2 Breakpoint 2 at 0x40055a: file b.c, line 12. (gdb) r Starting program: /tmp/a.out=20 Missing separate debuginfos, use: zypper install glibc-debuginfo-2.31-150300.63.1.x86_64 foo Breakpoint 1, bar () at b.c:4 4 printf( "bar\n" ); (gdb) l 1 int 2 bar() 3 { 4 printf( "bar\n" ); 5 6 return 0; 7 } 8 9 int 10 bar2() Works for me (named the file b.c), with both gcc 7.5 and gcc 13.2. I'm using quite recent gdb though, gdb 12.1 Either fixed or a gdb bug (which was also fixed meanwhile).=