From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10669 invoked by alias); 5 Apr 2006 08:25:59 -0000 Received: (qmail 10661 invoked by uid 22791); 5 Apr 2006 08:25:58 -0000 X-Spam-Check-By: sourceware.org Received: from smtp-vbr9.xs4all.nl (HELO smtp-vbr9.xs4all.nl) (194.109.24.29) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 05 Apr 2006 08:25:57 +0000 Received: from webmail.xs4all.nl (dovemail5.xs4all.nl [194.109.26.7]) by smtp-vbr9.xs4all.nl (8.13.6/8.13.6) with ESMTP id k358PKj9064072; Wed, 5 Apr 2006 10:25:20 +0200 (CEST) (envelope-from mark.kettenis@xs4all.nl) Received: from 192.87.1.22 (SquirrelMail authenticated user sibelius) by webmail.xs4all.nl with HTTP; Wed, 5 Apr 2006 10:25:21 +0200 (CEST) Message-ID: <12186.192.87.1.22.1144225521.squirrel@webmail.xs4all.nl> In-Reply-To: <20060405.000621.41243752.davem@davemloft.net> References: <20060405.000621.41243752.davem@davemloft.net> Date: Wed, 05 Apr 2006 08:25:00 -0000 Subject: Re: core regs vs. proc-service regs mess From: "Mark Kettenis" To: "David S. Miller" Cc: drow@false.org, gdb@sources.redhat.com User-Agent: SquirrelMail/1.4.5 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit 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-04/txt/msg00032.txt.bz2 > > In trying to get core files working properly again on Linux/Sparc and > Daniel I now see the problems you referred to the other day. > > What we have currently on Linux/Sparc is: > > 1) ptrace() interfaces have one layout for regsets > 2) ELF core files store regsets in a different > format > > Now proc-service.c wants fill_gregset() et al. to > provide things in the ptrace() style layout, that is > what libthread_db expects under Linux. > > But linux_nat_make_corefile_notes() expects the fill_gregset() > et al. to provide ELF core file format registers. Hi Dave, Yes this is annoying, and ultimately caused because the ptrace(2) and core(5) interfaces on Linux were never properly designed (heck they're not even fully documented) and inconsistent between the different hardware platforms. For most platforms the ptrace(2) and core(5) layout are the same, but not on sparc (presumably because ptrace(2) on sparc tries to be compatible with SunOS/Solaris). > This is completely contradictory, and I don't have any idea how to > cleanly resolve this outside of duplicating the entirety of > linux_nat_make_corefile_notes() on Linux/Sparc which is silly. > > Daniel any ideas? :-) Maybe we can have a "linux_tdep" struct where we > can place a "->to_fill_core_gregset()" type method or similar? What really should happen is to convert linux_nat_make_corefile_notes() to use the regset_from_core_section() interface. Unfortunately that is quite a bit of work since most Linux targets don't provide that interface yet. Mark