From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 41394 invoked by alias); 9 Mar 2015 09:26:54 -0000 Mailing-List: contact gdb-prs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-prs-owner@sourceware.org Received: (qmail 41367 invoked by uid 48); 9 Mar 2015 09:26:54 -0000 From: "rohitgangrade1 at gmail dot com" 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 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: breakpoints X-Bugzilla-Version: 7.7 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: rohitgangrade1 at gmail dot com X-Bugzilla-Status: WAITING X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-q1/txt/msg00405.txt.bz2 https://sourceware.org/bugzilla/show_bug.cgi?id=18095 --- Comment #2 from Rohit --- (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.