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 6882489
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T05:15:34+00:00 2026-05-27T05:15:34+00:00

If I set up a break point and if GDB hits the break points,

  • 0

If I set up a break point and if GDB hits the break points, then it shows the line of the code. If I enter n or next, then GDB prints out the next line of the code.

I was wondering if there is a way I can trace the actual line of code being executed through GDB.

For example, if I enter n or next 100 times then I will get traces of 100 lines of code. I want to do this automatically not by entering n or next.

  • 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-05-27T05:15:35+00:00Added an answer on May 27, 2026 at 5:15 am

    Note that collecting next trace like you appear to desire is exceedingly unlikely to help you debug actual problem in any realistically sized program: most of the time programs spend in loops, and executing next repeatedly will just give you a never-ending stream of loop repetitions.

    That said, you can achieve what you want like this:

    (gdb) shell perl -e 'print "n\n" x 100' > gdb.cmd
    (gdb) source gdb.cmd
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How can I set a break point in a javascript function and have the
I have set break points on my attached properties SetXXX and GetXXX static methods.
How do you set a break points in server tags in .aspx pages. e.g.
I want to set a condition on a gdb breakpoint to only break if
I am running an application through gdb and I want to set a breakpoint
How can I set a breakpoint in gdb to stop program at every write
I can set a breakpoint in main and debug the code with the correct
Possible Duplicate: Can I set a breakpoint on 'memory access' in GDB? I have
Is there a way to set a breakpoint in GDB for when a particular
How can I set a breakpoint in C or C++ code programatically that will

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.