From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1140 invoked by alias); 18 Jun 2013 18:33:43 -0000 Mailing-List: contact gdb-prs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-prs-owner@sourceware.org Received: (qmail 1118 invoked by uid 48); 18 Jun 2013 18:33:43 -0000 From: "simon.marchi at ericsson dot com" To: gdb-prs@sourceware.org Subject: [Bug gdb/15645] New: Setting a breakpoint in a function marked with __attribute__((always_inline)) with multiple locations only sets it at the first location Date: Tue, 18 Jun 2013 18:33:00 -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: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: simon.marchi at ericsson dot com X-Bugzilla-Status: NEW 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 attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2013-q2/txt/msg00440.txt.bz2 http://sourceware.org/bugzilla/show_bug.cgi?id=15645 Bug ID: 15645 Summary: Setting a breakpoint in a function marked with __attribute__((always_inline)) with multiple locations only sets it at the first location Product: gdb Version: HEAD Status: NEW Severity: normal Priority: P2 Component: gdb Assignee: unassigned at sourceware dot org Reporter: simon.marchi at ericsson dot com Created attachment 7084 --> http://sourceware.org/bugzilla/attachment.cgi?id=7084&action=edit Snippet to reproduce Steps to reproduce (see attached file): $ gcc inline.c -g $ gdb ./a.out Reading symbols from /home/simark/a.out...done. (gdb) break 5 Breakpoint 1 at 0x40053b: file inline.c, line 5. (gdb) break func Note: breakpoint 1 also set at pc 0x40053b. Breakpoint 2 at 0x40053b: func. (3 locations) (gdb) quit The function "func" is forced to be inline, and therefore its body appears 3 times directly in the main. The command "break 5" only sets a breakpoint at the first of these locations. The expected result is that it sets a breakpoint at all 3 locations. Note that doing "break func" puts a breakpoint in all 3 locations. >>From what I saw, when it is a function that is inlined but without ((always_inline)), the behaviour is correct. Maybe related, the output of "info breakpoints" is not ideal. 1 breakpoint keep y 1.1 y 0x000000000040053b in main at inline.c:5 1.2 y 0x0000000000400556 1.3 y 0x0000000000400571 For locations 2 and 3, we have , but it should be similar to location 1, "in main at inline.c:5. -- You are receiving this mail because: You are on the CC list for the bug.