From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1660 invoked by alias); 11 Apr 2002 21:39:06 -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 1641 invoked from network); 11 Apr 2002 21:39:04 -0000 Received: from unknown (HELO cygnus.com) (205.180.230.5) by sources.redhat.com with SMTP; 11 Apr 2002 21:39:04 -0000 Received: from redhat.com (reddwarf.sfbay.redhat.com [172.16.24.50]) by runyon.cygnus.com (8.8.7-cygnus/8.8.7) with ESMTP id OAA06338; Thu, 11 Apr 2002 14:39:01 -0700 (PDT) Message-ID: <3CB5FFAA.729784A6@redhat.com> Date: Thu, 11 Apr 2002 14:39:00 -0000 From: Michael Snyder Organization: Red Hat, Inc. X-Accept-Language: en MIME-Version: 1.0 To: Daniel Jacobowitz CC: Jason R Thorpe , gdb@sources.redhat.com Subject: Re: cross-debugging of userland core files, nat -> tdep References: <20020410183918.C22095@dr-evil.shagadelic.org> <20020410215824.A6539@nevyn.them.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-SW-Source: 2002-04/txt/msg00179.txt.bz2 Daniel Jacobowitz wrote: > > On Wed, Apr 10, 2002 at 06:39:18PM -0700, Jason R Thorpe wrote: > > 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 :-) > > Hit the nail on the head. I believe I've gotten BFD to understand ELF > core files appropriately for a fair number of targets; you may need to > add a platform-specific chunk to all the ones I didn't get to. Then > move supply_* out of the nat files, and link in the core code. > > Now, if you've got time, there's a much better way to do this. The > "magic" supply_* and fetch_* names need to go; we should instead have a > table of regset types, sizes, and fetch/supply functions. I just > haven't gotten around to actually doing that. Nathaniel, I will kiss your feet if you will do that. ;-) That would mean I could pretty easily implement the gcore command for embedded gdb.