From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15540 invoked by alias); 23 Mar 2004 16:42:06 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 15530 invoked from network); 23 Mar 2004 16:42:03 -0000 Received: from unknown (HELO localhost.redhat.com) (66.30.197.194) by sources.redhat.com with SMTP; 23 Mar 2004 16:42:03 -0000 Received: from gnu.org (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 56F802B9B; Tue, 23 Mar 2004 11:42:03 -0500 (EST) Message-ID: <406068DB.30007@gnu.org> Date: Tue, 23 Mar 2004 16:42:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-GB; rv:1.4.1) Gecko/20040217 MIME-Version: 1.0 To: Daniel Jacobowitz Cc: gdb-patches@sources.redhat.com Subject: Re: [rfa/remote] Reread symbols on 'target remote' References: <20040228173955.GA15910@nevyn.them.org> <404810C2.8050005@gnu.org> <20040306235436.GA10071@nevyn.them.org> <40586BC3.1080706@gnu.org> <20040317165115.GA8390@nevyn.them.org> <405F68A0.3060300@gnu.org> <20040323155049.GA21830@nevyn.them.org> In-Reply-To: <20040323155049.GA21830@nevyn.them.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2004-03/txt/msg00524.txt.bz2 >>Well attach is more messed up than that. It might load the symbol table >>> (if it isn't already loaded and can be determined from /proc). Should >>> attach instead always load the symbol table, prefering what is provided >>> by the executable? > > > If I'm reading you right - then I think the answer is yes. What's your > opinion on the patch below? If there is no exec file, then attempt to > determine one from target_pid_to_exec_file. Otherwise, attempt to > reread the exec file. I was thinking of something more agressive: if target (via /proc) can identify exec file switch to target's exec file, load else if exec file known load else hope the user knows what they are doing fi which is different to the current logic like: if exec file known do nothing else if target (via /proc) can identify exec file switch to target's exec file, load else hope ... fi however yes, at least (per your patch) always loading the symbols is a good first step. (this goes back to earlier posts where we need to overaul the target stack so that multiple instances are available) Andrew