From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20797 invoked by alias); 18 Feb 2006 09:54:22 -0000 Received: (qmail 20789 invoked by uid 22791); 18 Feb 2006 09:54:22 -0000 X-Spam-Check-By: sourceware.org Received: from ip127.bb146.pacific.net.hk (HELO mailhub.stlglobal.com) (202.64.146.127) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sat, 18 Feb 2006 09:54:21 +0000 Received: from localhost ([127.0.0.1]) by mailhub.stlglobal.com with esmtp (Exim 4.50) id 1FAOma-0001hl-RN; Sat, 18 Feb 2006 17:53:40 +0800 Message-ID: <43F6EEB4.4040002@tausq.org> Date: Sat, 18 Feb 2006 11:10:00 -0000 From: Randolph Chung User-Agent: Debian Thunderbird 1.0.2 (X11/20051002) MIME-Version: 1.0 To: Daniel Jacobowitz CC: msnyder@redhat.com, gdb@sources.redhat.com Subject: Re: "run", and executable file/symtab association? References: <20060215030909.GB8700@nevyn.them.org> In-Reply-To: <20060215030909.GB8700@nevyn.them.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2006-02/txt/msg00231.txt.bz2 > If kill_inferior calls pop_target it'd better be expecting to close a > native target, not the exec target further down the stack. This looks > like a bug in the checkpoint code somewhere. Ugh, the bits in > kill_inferior are a little scary. First thing to do: figure out what's > on the target stack (follow current_target.beneath), and why it's got > execution if it's popping exec_close. The target stack looks like: (top-gdb) print current_target->to_shortname $2 = 0x334298 "child" (top-gdb) print current_target->beneath->to_shortname $3 = 0x334298 "child" (top-gdb) print current_target->beneath->beneath->to_shortname $4 = 0x2d7d6c "exec" (top-gdb) print current_target->beneath->beneath->beneath->to_shortname $5 = 0x312614 "None" And to_close is: (top-gdb) print current_target->to_close $6 = (void (*)(int)) @0x38465a: 0x47954 kill_inferior() says: /* First cut -- let's crudely do everything inline. */ if (forks_exist_p ()) { linux_fork_killall (); pop_target (); generic_mourn_inferior (); } else { ... } I don't pretend to understand this code and why if there are forks, we should be popping the target to kill everything. Michael Snyder added/changed this when he checked in the checkpoint code, perhaps he can comment? randolph