public inbox for insight-prs@sourceware.org
help / color / mirror / Atom feed
From: salankar@coware.com
To: insight-gnats@sources.redhat.com
Subject: insight/185: Breaks at wrong functions up the stack
Date: Tue, 05 Nov 2002 19:23:00 -0000	[thread overview]
Message-ID: <20021106031742.28172.qmail@sources.redhat.com> (raw)


>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==


             reply	other threads:[~2002-11-06  3:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-05 19:23 salankar [this message]
2002-11-06  6:25 kseitz
2002-11-06 10:13 Sunil Alankar
2002-11-19 20:09 kseitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20021106031742.28172.qmail@sources.redhat.com \
    --to=salankar@coware.com \
    --cc=insight-gnats@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).