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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T19:11:30+00:00 2026-05-15T19:11:30+00:00

I have a program that depends on an external shared library, but after a

  • 0

I have a program that depends on an external shared library, but after a function inside the library gets executed I lose the ability to use breakpoints.

I can break and step like normal up until I execute this function, but afterwards it is finished it never breaks. It won’t even break on main if I try and use start for the second time executing the program. It’s not an inlined function problem, because I’ve broken on these functions before and when I comment out this particular function everything starts to work again.

Has anyone ever encountered anything like this before? What can I do?

Using gdb 7.1 with gcc 3.2.3

Edit:
After some hints from users I figured out that the process is forking inside the library call. I’m not sure what it’s doing (and I really don’t care). Can I somehow compensate for this? I’ve been experimenting with the follow-fork-mode as child, but I’m really confused what happens once it forks and I can’t seem to figure out how to continue execution or do anything of use.

Edit:
Further investigation. The nearest I can tell, gdb is losing all its symbol information somewhere. After the 2nd run, all symbols resolve to the @plt address and not to the actual address that they resolved to on the first run. Like somehow the second loading of the process loses all the info it gained the first time around and refuses to reload it. I’m so confused!!

Edit:
So I traced down the problem to the vfork of a popen call. Apparently gdb doesn’t play nice with popen? As soon as I detach from the popen’d vforked process, I lose all my symbols. I’ve read some reports online about this as well. Is there any hope?

  • 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-15T19:11:31+00:00Added an answer on May 15, 2026 at 7:11 pm

    It’s the combination of vfork(2) and exec(2) that’s messing things up. Quoting from gdb manual (debugging forks):

    On some systems, when a child process is spawned by vfork, you cannot debug the child or parent until an exec call completes.
    …

    By default, after an exec call executes, gdb discards the symbols of the previous executable image. You can change this behaviour with the set follow-exec-mode command.

    Keep follow-fork-mode set to parent and set follow-exec-mode to same.

    Alternatively, if your installation supports multi-process debugging (it should, since your gdb version is 7.1), try using info inferiors to find your original process and switching to it with inferior <num>.

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

Sidebar

Related Questions

I have a Java program which depends on a native library that crashes randomly
I have program that requires Python 3, but I develop Django and it uses
I have a program that gets a JSON from the server using getJSON and
I have a program that encrypts files, but adds the extension .safe to the
I have a program that is developed in MVC 3 Razor Syntax but whenever
I have a program that depends on a configuration file for three settings. I
I have an AS3 program that calls a function multiple times. The function must
I have a little problem. I have a program that will draw wave function
I have program that has a variable that should never change. However, somehow, it
I have program that runs fast enough. I want to see the number of

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.