This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug gdb/9585] GNU/Linux x86, gdb freezes after fork wit detach-on-fork off and follow-fork-mode child


------- Additional Comments From pedro at codesourcery dot com  2010-04-07 23:33 -------
> My problem appears to be that a forked (notice that I don't really not what
syscall it uses) process doesn't freeze execution. 

Why would it?  Did you have "catch fork"/"catch vfork" set?

> If I Ctrl+C I can change
> inferiors and invoke 'continue'. Then this process forks another process,
again I Ctrl+C and change the inferior,

Did you mean to use "set schedule-multiple on" to have all inferiors
running simultaneously?

> then when I run it it seems to finish and gets
> listed as 'null' in the inferior list.

If the inferior exited, then it will have no process id, hence <null>.

> gdb says they have no threads.

If the program isn't running anymore, it can't have any threads.

I think most of your problems will go away with "set schedule-multiple on".

(gdb) help set schedule-multiple
Set mode for resuming threads of all processes.
When on, execution commands (such as 'continue' or 'next') resume all
threads of all processes.  When off (which is the default), execution
commands only resume the threads of the current process.  The set of
threads that are resumed is further refined by the scheduler-locking
mode (see help set scheduler-locking).


-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=9585

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]