public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug breakpoints/18095] New: Break at every line in a specific function
@ 2015-03-09  6:08 rohitgangrade1 at gmail dot com
  2015-03-09  9:02 ` [Bug breakpoints/18095] " rohitgangrade1 at gmail dot com
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: rohitgangrade1 at gmail dot com @ 2015-03-09  6:08 UTC (permalink / raw)
  To: gdb-prs

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

            Bug ID: 18095
           Summary: Break at every line in a specific function
           Product: gdb
           Version: 7.7
            Status: NEW
          Severity: normal
          Priority: P2
         Component: breakpoints
          Assignee: unassigned at sourceware dot org
          Reporter: rohitgangrade1 at gmail dot com

Say, I want to keep stepping only in the source code that I build that has
multiple functions, but going from one function to another is through standard
template library.

In that case, I don't want to step inside the STL source code and directly jump
to the call which executes from the middle of another function I created. One
option is to set breakpoints inside every function where I want to go, but that
is very cumbersome. Another option is to use next instead to step, but that
will again jump directly to next line in the same original function.

So, if there was some construct which facilitates breaking in only the source
file I mention, or which possibly adds the breakpoints at every line in the
specified functions, then I would be able to parse from one function to another
through standard template library without going into standard template library.

This is used extensively in SystemC which is a set of C++ libraries for
modelling hardware and execution address goes from one class to another in the
middle of function through Kernel which is implemented in standard template
library.

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug breakpoints/18095] Break at every line in a specific function
  2015-03-09  6:08 [Bug breakpoints/18095] New: Break at every line in a specific function rohitgangrade1 at gmail dot com
@ 2015-03-09  9:02 ` 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
  2 siblings, 0 replies; 4+ messages in thread
From: rohitgangrade1 at gmail dot com @ 2015-03-09  9:02 UTC (permalink / raw)
  To: gdb-prs

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

Rohit <rohitgangrade1 at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rohitgangrade1 at gmail dot com

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug breakpoints/18095] Break at every line in a specific function
  2015-03-09  6:08 [Bug breakpoints/18095] New: Break at every line in a specific function 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
  2 siblings, 0 replies; 4+ messages in thread
From: palves at redhat dot com @ 2015-03-09  9:26 UTC (permalink / raw)
  To: gdb-prs

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

Pedro Alves <palves at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |WAITING
                 CC|                            |palves at redhat dot com

--- Comment #1 from Pedro Alves <palves at redhat dot com> ---
Did you try the "skip" command?

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug breakpoints/18095] Break at every line in a specific function
  2015-03-09  6:08 [Bug breakpoints/18095] New: Break at every line in a specific function 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
  2 siblings, 0 replies; 4+ messages in thread
From: rohitgangrade1 at gmail dot com @ 2015-03-10  1:17 UTC (permalink / raw)
  To: gdb-prs

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.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-03-09  9:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-09  6:08 [Bug breakpoints/18095] New: Break at every line in a specific function 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 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).