From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31266 invoked by alias); 11 Apr 2002 06:01:30 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 31233 invoked from network); 11 Apr 2002 06:01:21 -0000 Received: from unknown (HELO localhost.redhat.com) (24.112.240.27) by sources.redhat.com with SMTP; 11 Apr 2002 06:01:21 -0000 Received: from cygnus.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 136B73C94; Thu, 11 Apr 2002 02:01:25 -0400 (EDT) Message-ID: <3CB526B4.8090807@cygnus.com> Date: Wed, 10 Apr 2002 23:01:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:0.9.9) Gecko/20020328 X-Accept-Language: en-us, en MIME-Version: 1.0 To: thorpej@wasabisystems.com Cc: gdb@sources.redhat.com Subject: Re: cross-debugging of userland core files, nat -> tdep References: <20020410183918.C22095@dr-evil.shagadelic.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2002-04/txt/msg00167.txt.bz2 > Hi folks... > > I've been thinking of what needs to happen in order to support > cross-debugging of userland core files in NetBSD. > > BFD can already handle NetBSD ELF core files in the appropriate way. As > far as I can tell, the only stumbling block is getting GDB to play nicely > with them. > > The problem is that the functions that supply registers, etc. from the core > file are all in "nat" modules. This is probably mostly an artifact of the > data being in the same format as the reg structure returned by ptrace(2). > > What I'd like to do is move those supply-registers routines into an > appropriate "tdep" file. They can still be used by the "nat" routines > which use ptrace(2), and all the core file handling goo can then go into > the "tdep" module, as well. > > If this sounds reasonable, then I'll start my little project. Otherwise, > I'd love to hear suggestions :-) > > Thanks. Have a look at sparc-tdep.c:supply_fpregset(). Depending on how ``pure'' your elf core files are you could do similar. If not archnbsd-tdep.c sounds promising. There is a namespace problem here (these methods most likely also need to be multi-arched in someway, but that is a separate story). Andrew