LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 10-27-2011, 03:01 AM   #1
915086731
Member
 
Registered: Apr 2010
Posts: 144
Blog Entries: 6

Rep: Reputation: 2
How to step in one function after the function be executed in gdb?


In gdb, I can call one function with command "call", but how can I step in the function? I don't want to restart the program, but the function had been executed, gdb will execute next statement, and I don't know how to recall the function.
 
Old 10-27-2011, 04:26 AM   #2
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,790

Rep: Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653
On some platforms gdb supports reverse stepping (rsi) but if yours doesn't then you'll have to restart, using 'call' is not actually executing the program it's just allowing you to test the function.
 
1 members found this post helpful.
Old 10-27-2011, 05:15 AM   #3
nenpa8lo
Member
 
Registered: Oct 2008
Location: Ireland
Distribution: Slackware 13.0, Slackware 13.37
Posts: 68
Blog Entries: 2

Rep: Reputation: 18
I think the quickest workaround is just to implement a loop that calls your function, setup breakpoint at entry and then use 'step' to step through the code.
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Gdb did not step into function when "step" typed!!! 915086731 Programming 4 06-23-2010 09:44 AM
unable to step through function in shared object library using gdb markhod Programming 2 01-03-2009 02:00 AM
.bashrc function not executed in fc8 Callandor Linux - Software 1 02-23-2008 05:16 AM
poepn or system function call executed by a background process kshkid Programming 1 08-24-2006 03:04 AM
gdb won't single step thru the function frankie_DJ Programming 2 10-06-2004 05:50 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 04:38 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration