logo       

Re: gdb/2054: can't start X server under gdb: msg#00016

Subject: Re: gdb/2054: can't start X server under gdb
The following reply was made to PR gdb/2054; it has been noted by GNATS.

From: Daniel Jacobowitz <drow@xxxxxxxxx>
To: Adam Jackson <ajackson@xxxxxxxxxx>
Cc: gdb-gnats@xxxxxxxxxxxxxxxxxx
Subject: Re: gdb/2054: can't start X server under gdb
Date: Wed, 4 Jan 2006 11:46:09 -0500

 On Wed, Jan 04, 2006 at 11:28:24AM -0500, Adam Jackson wrote:
 > 
 > On Dec 20, 2005, at 11:34 AM, Daniel Jacobowitz wrote:
 > >
 > >Oh sorry - you have to not use strace -f with gdb, because only one
 > >process can ptrace a target at a time.  We want a trace of GDB, but not
 > >of the X server.
 > 
 > Right, forgot about that bit.  Updated trace is at:
 > 
 > http://people.freedesktop.org/~ajax/gdb-bug-2054/strace-of-gdb-2.txt
 
 So here's what happened - your strace unfortunately doesn't show some
 details, but I can guess them pretty confidently:
 
 ptrace(PTRACE_CONT, 31602, 0, SIG_0)    = 0
 waitpid(-1, [WIFSTOPPED(s) && WSTOPSIG(s) == SIGTRAP], 0) = 31602
 
 We continue the parent, and it stops.  At this point it is reporting a
 fork.
 
 ptrace(0x4201 /* PTRACE_??? */, 31602, 0, 0xbff15d38) = 0
 
 We fatch the PID of the forked child.
 
 waitpid(31661, [WIFSTOPPED(s) && WSTOPSIG(s) == SIGTRAP], 0) = 31661
 
 We wait for the forked child to stop.  Waitasec!  It didn't stop!  Not
 only didn't it stop, it reported an EXEC event (which we did request,
 contrary to what I said earlier in this bug report).
 
 So we should have seen a SIGSTOP from the newly forked child, but
 didn't.
 
 The code that is supposed to guarantee this is in kernel/fork.c, and
 seems to be intact in the latest kernel that I checked.  I'm stumped.
 Might want to make sure that's triggering.  Or, when GDB prints the
 error message, check /proc for the child process - does it have a
 pending SIGSTOP still?
 
 -- 
 Daniel Jacobowitz
 CodeSourcery



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
linux.arklinux....    user-groups.lin...    kde.usability/2...    ietf.ipp/2002-0...    mail.spam.spamc...    os.netbsd.devel...    audio.cd-record...    text.unicode.de...    php.documentati...    games.fps.halfl...    window-managers...    suse.oracle.gen...    bug-tracking.gn...    video.dvdrip.us...    xfree86.cvs/200...    java.netbeans.m...    network.argus/2...    culture.sf.kill...    debian.ports.al...    freebsd.questio...    qplus.devel/200...    handhelds.palm....   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe