This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug breakpoints/12501] New: Doesn't set pending breakpoint oninlined function


http://sourceware.org/bugzilla/show_bug.cgi?id=12501

           Summary: Doesn't set pending breakpoint on inlined function
           Product: gdb
           Version: 7.2
            Status: NEW
          Severity: normal
          Priority: P2
         Component: breakpoints
        AssignedTo: unassigned@sourceware.org
        ReportedBy: fuscated@gmail.com


Here are two simplified test files:

***header.h
inline int func1()
{
    return 1000;
}
inline int func2()
{
    return 10;
}
***main.cpp
#include "header.h"
int main()
{
    func1();
    return 0;
}

To reproduce the bug execute the following commands:
g++ -g main.cpp -o test_break
gdb ./test_break
(gdb) break header.h:7

The result of the last command is "No line 7 in file "header.h"."

GDB thinks the code is unused, because the func2 is not used in the current
symbols. This might not be the case if a shared library which uses func2 is
loaded in the future, therefore GDB should not refuse to set a pending
breakpoint.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]