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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T23:29:53+00:00 2026-06-05T23:29:53+00:00

Currently GDB has an issue following child processes after a fork. A work around

  • 0

Currently GDB has an issue following child processes after a fork. A work around I saw online is to use patch the following instruction :-

call 0x8048740 <fork@plt>

as follows :-

gdb$ set *(0x08048d1f+1)=0x90909090
gdb$ set *(0x08048d1f)=0x9090c033

Doing this sets the instructions as :-

xor    eax,eax
nop    
nop    
nop

As a result the code supposed to be executed as the child is executed by the parent, and im able to debug it. However, typing out the two step statements every time I have to debug the process is too tedious. Is there any way I can instruct gdb to patch those instructions everytime I attach to the process? Some kind of automation, limited as it may be?

  • 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-05T23:29:56+00:00Added an answer on June 5, 2026 at 11:29 pm

    There are several ways to extend you GDB command list, using gdb extensions. Python scripts support is the latest development in GDB since 7.1 release. However looking at your requirement you don’t need much scripting. You can use the simplest define command.

    I had answered a similar question some time back, you could use the same approach.

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

Sidebar

Related Questions

I'm currently writing a Python GDB script. The problem is that it has to
I am currently trying to make use of gdb to disassemble an exe, and
I'm using GDB to debug some of my C applications. What I currently do
I use GDB to debug C/C++ programs very often, and I'm reasonably knowledgeable with
I am getting error code like follows (gdb) continue Current language: auto; currently objective-c
I am currently working with NS-2(A network Simulator) and I wanted to use the
I work on an iPad application that has a sync process that uses web
I am currently running gdb version 6.7.1 on Ubuntu Linux, and working in a
I use a debugging script that runs several related processes in succession with the
I'm following the CUDA-GDB guide (page 10, getting started) on Ubuntu Linux and got

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.