public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "rohitgangrade1 at gmail dot com" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug breakpoints/18095] Break at every line in a specific function
Date: Tue, 10 Mar 2015 01:17:00 -0000	[thread overview]
Message-ID: <bug-18095-4717-wmhPb4U14H@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-18095-4717@http.sourceware.org/bugzilla/>

https://sourceware.org/bugzilla/show_bug.cgi?id=18095

--- Comment #2 from Rohit <rohitgangrade1 at gmail dot com> ---
(In reply to Pedro Alves from comment #1)
> Did you try the "skip" command?

Yes, I did and infact what skip does is that it skips everything inside that
function and it also skips all the other functions which are called inside the
function to be skipped.

Example.

main.cpp
F1(F2());

and F2 is defined in STL (some header file)
stl.cpp
F2() {
 F3()
}
main2.cpp
and F3() invokes my user defined source code F4()
F4 () {

}

Since F2 and F3 are implemented in STL, I would only want to debug F1 and F4
and the way it is visible to designer is that from F1, it will jump to F4.

It is not necessary that function may be invoked from the starting, as there
are wait() inside the threads which keep them halted for a fixed time and are
executed once simulation time is achieved.

Now, if we try skip command on F2(), while debugging I will directly come to
next line of main.cpp, but internally it might have executed F4 and I want to
go step by step in that code as well because I designed that.

I tried setting breakpoints at functions as well, but that only gives me
breakpoint at the start of the function and in this case, the function may be
halted in between and resumed someime after. So, this will work if function is
called first time, but won't work in most of the cases when function will
resume from between.

All I ask is that there should be some command in gdb to step only in the
source code file specified by user and not go step by step in STL library
functions.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


      parent reply	other threads:[~2015-03-09  9:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-09  6:08 [Bug breakpoints/18095] New: " rohitgangrade1 at gmail dot com
2015-03-09  9:02 ` [Bug breakpoints/18095] " rohitgangrade1 at gmail dot com
2015-03-09  9:26 ` palves at redhat dot com
2015-03-10  1:17 ` rohitgangrade1 at gmail dot com [this message]

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=bug-18095-4717-wmhPb4U14H@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=gdb-prs@sourceware.org \
    /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).