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/18095] Break at every line in a specific function


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.


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