Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8707423
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T03:52:03+00:00 2026-06-13T03:52:03+00:00

I try to debug my program with gdb and the step function. Everything works

  • 0

I try to debug my program with gdb and the step function.
Everything works fine as long as the functions are in the same file.

But if the function is outside, gdb will jump over it.

How can I solve that?

Note:

  • I compiled with -ggdb options
  • I’m using GNU gdb Red Hat Linux (6.7-1rh)
    (if that is possible, appeared in startfrequence of gdb)

Example:

#include "foo2.h"  // contains function foo2

void foo(void){ printf("hello"); }


void main (void){

  foo();    // debuggable -> jump into possible
  foo2();   // not debuggable 


}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T03:52:04+00:00Added an answer on June 13, 2026 at 3:52 am

    When debugging the application with gdb, use si (stepi) instead of ni (nexti). si will step into other functions, ni stays within the current function. Check the documentation at http://sourceware.org/gdb/current/onlinedocs/gdb/Continuing-and-Stepping.html#Continuing-and-Stepping for more (^F for nexti or stepi).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I try to debug a program in Visual Studio 10, but I have a
I work in C#, .Net 2.0. When I debug my code everything works fine.
I have a simple c++ program I am trying to debug, but gdb cannot
I try to debug a javascript function called from Generate Thumbnails plugin in Wordpress.
I try to use the winDBG to debug a dump file. When I run
i get the above error when i try to debug my program in vc
When I try running Debug on my Java program in eclipse, it loads up
When I try to debug my C++ application I get the error The program
I am running GDB 7.2 on Linux 64 bit machine. It all works fine
I am getting this error every time I try to debug my program: CS0246:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.