This is the mail archive of the insight-prs@sources.redhat.com mailing list for the Insight 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]

insight/185: Breaks at wrong functions up the stack


>Number:         185
>Category:       insight
>Synopsis:       Breaks at wrong functions up the stack
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Nov 05 19:23:00 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     Sunil Alankar
>Release:        Insight-5.2.1
>Organization:
>Environment:
Linux/ Redhat 7.3
>Description:
In the following test source, 
1. Set a break point at function f1() (or at line 5)
2. run the program
3. When stopped at the breakpoint, issue 'finish'
4. issue 'continue' ; now stops at f1()
5. issue continue again. now stops at f2(). This is wrong
   It must only stop at f1() as that is the only breakpoint

This error does not happen with bare gdb of the same version.



#include <stdio.h>

void f1()
{
        printf ("f1\n");
}

void f2()
{
        printf ("f2\n");
        f1();
}


int main()
{

 for (int i = 0; i < 20; i++)
 {

        f2();
 }

}
>How-To-Repeat:
Compile the test file t.cpp 
g++ -g t.cpp
gdb a.out

Follow the above steps
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="t.cpp"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="t.cpp"

I2luY2x1ZGUgPHN0ZGlvLmg+Cgp2b2lkIGYxKCkKewoJcHJpbnRmICgiZjFcbiIpOwp9Cgp2b2lk
IGYyKCkKewoJcHJpbnRmICgiZjJcbiIpOwoJZjEoKTsKfQoKCmludCBtYWluKCkKewoKIGZvciAo
aW50IGkgPSAwOyBpIDwgMjA7IGkrKykKIHsKCQoJZjIoKTsKIH0KCn0KCg==


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