Bug 235197 - FEAT: Always display: Detaching after fork from child process ...
Summary: FEAT: Always display: Detaching after fork from child process ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: gdb
Version: 5.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
: ---
Assignee: Jan Kratochvil
QA Contact:
URL:
Whiteboard:
Depends On: 234468
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-04-04 13:46 UTC by Jan Kratochvil
Modified: 2018-10-19 22:42 UTC (History)
3 users (show)

Fixed In Version: RHBA-2008-0332
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-05-21 16:55:01 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Trivial testcase. (472 bytes, text/plain)
2007-04-04 13:46 UTC, Jan Kratochvil
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2008:0332 0 normal SHIPPED_LIVE gdb bug fix and enhancement update 2008-05-20 17:58:35 UTC

Description Jan Kratochvil 2007-04-04 13:46:28 UTC
Description of problem:
Currently any fork(2)ed child processes get out of GDB tracking which may be
unexpected by the GDB user.
It has been proven on Bug 234468.

Version-Release number of selected component (if applicable):
gdb-6.5-16.el5.ia64
+RawHide
+upstream

How reproducible:
Always.

Steps to Reproduce:
1. gcc -o dinner dinner.c -Wall -ggdb3
2. gdb ./dinner
3. (gdb) break knife
4. (gdb) run

Actual results:
Starting program: /root/jkratoch/redhat/dinner 
knife
Program exited normally.

Expected results:
As one originally expects as after `set follow-fork-mode child':
Breakpoint 1, knife () at dinner.c:11
11        puts ("knife");
(gdb) 

It would be helpful to get at least:
Starting program: /root/jkratoch/redhat/dinner
Detaching after fork from child process 11836.
knife
Program exited normally.

Additional info:
Patch is a trivial oneliner.
Slightly different GDB output may be considered a Regression.

Comment 1 Jan Kratochvil 2007-04-04 13:46:28 UTC
Created attachment 151656 [details]
Trivial testcase.

Comment 2 Jan Kratochvil 2007-04-22 20:30:59 UTC
Committed to RawHide incl. the testcase `gdb.base/fork-detach.exp':
* Sun Apr 22 2007 Jan Kratochvil <jan.kratochvil> - 6.6-10
- Notify user of a child forked process being detached (BZ 235197).


Comment 7 Jan Kratochvil 2007-12-05 19:30:58 UTC
Posted upstream:
  http://sources.redhat.com/ml/gdb-patches/2007-12/msg00087.html


Comment 13 errata-xmlrpc 2008-05-21 16:55:01 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2008-0332.html


Comment 15 Petr Tesařík 2018-04-27 16:34:33 UTC
(In reply to Jan Kratochvil from comment #7)
> Posted upstream:
>   http://sources.redhat.com/ml/gdb-patches/2007-12/msg00087.html

The above patch is apparently superseded by this one:

https://sourceware.org/ml/gdb-patches/2018-04/msg00392.html


Note You need to log in before you can comment on or make changes to this bug.