From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27847 invoked by alias); 16 Nov 2005 15:49:49 -0000 Received: (qmail 27834 invoked by uid 22791); 16 Nov 2005 15:49:46 -0000 Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Wed, 16 Nov 2005 15:49:46 +0000 Received: from drow by nevyn.them.org with local (Exim 4.54) id 1EcPXa-0003VE-JL; Wed, 16 Nov 2005 10:49:42 -0500 Date: Wed, 16 Nov 2005 15:49:00 -0000 From: Daniel Jacobowitz To: Randolph Chung Cc: gdb@sources.redhat.com Subject: Re: Question about ELF core file sections Message-ID: <20051116154942.GA13434@nevyn.them.org> Mail-Followup-To: Randolph Chung , gdb@sources.redhat.com References: <437B53B4.5000906@tausq.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <437B53B4.5000906@tausq.org> User-Agent: Mutt/1.5.8i 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: 2005-11/txt/msg00319.txt.bz2 On Wed, Nov 16, 2005 at 11:43:48PM +0800, Randolph Chung wrote: > I'm trying to get core file support working on hppa64-hp-hpux11.11. I'm > trying to reuse the infrastructure from corelow.c and the "new" > regset_from_core_section() interface, but I'm a bit confused about how > it's supposed to work. > > corelow.c:get_core_registers() is hardcoded to look for registers in > sections ".reg", ".reg2", ".reg-xfp" -- are these section names somehow > standard? I don't find these documented in the ELF specs. I see that on > Linux variants, this ".reg" section is actually synthesized by bfd. This > all seems to be a bit convoluted :( They aren't section names at all. Core files don't have sections, only segments. They're a purely BFD-internal convention. > On HPUX, there is a program header type HP_CORE_PROC that points to a > datastructure with the register info. Is there anyway to use the > existing interface to get to this info? If not, it looks like I can get > it to work using core_vec, but that uses an interface that is marked > deprecated.... You play the same tricks in BFD that ELF does, probably :-) Alternatively you query the program headers to do it, but the existing GDB<->BFD interface is very section-oriented. -- Daniel Jacobowitz CodeSourcery, LLC