From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26302 invoked by alias); 27 Aug 2004 16:27:02 -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 25707 invoked from network); 27 Aug 2004 16:26:40 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org with SMTP; 27 Aug 2004 16:26:40 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i7RGQZS2000868 for ; Fri, 27 Aug 2004 12:26:40 -0400 Received: from localhost.redhat.com (porkchop.devel.redhat.com [172.16.58.2]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i7RGQO327934; Fri, 27 Aug 2004 12:26:24 -0400 Received: from gnu.org (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 8356B2B9D; Fri, 27 Aug 2004 12:25:15 -0400 (EDT) Message-ID: <412F606B.2050003@gnu.org> Date: Fri, 27 Aug 2004 16:27:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-GB; rv:1.4.1) Gecko/20040801 MIME-Version: 1.0 To: Mark Kettenis , jimb@redhat.com Cc: gdb-patches@sources.redhat.com Subject: Re: RFA: Support libthread_db xregs interface References: <412A55E8.3060100@gnu.org> <200408260938.i7Q9ceac000020@juw15.nfra.nl> In-Reply-To: <200408260938.i7Q9ceac000020@juw15.nfra.nl> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2004-08/txt/msg00750.txt.bz2 > Sender: jimb@zenia.home > Cc: gdb-patches@sources.redhat.com > From: Jim Blandy > Date: 25 Aug 2004 00:07:07 -0500 > > Andrew Cagney writes: > > > + v:=:const struct regset *:xregs_regset:::0 > > > > Mark's regset change added both the "regset.h" object and the > > regset_from_core_section architecture method. They, together, replace > > the old *-nat.c:fill_regset et.al. calls. > > > > Can we implement the equivalent here for ptrace/thread-db? > > Not sure what you mean. This change lets a gdbarch object specify a > regset which the libthread_db support code will then use to read and > write additional registers beyond those covered by gregset_t and > fpregset_t. So this change does provide a regset.h-style regset for > libthread_db. That's what you're looking for, right? > > I'm not sure, but I presume Andrew is asking you to implement a > regset_from_xxx function for use by ptrace/thread-db, instead of > explicitly adding the xregset to the architecture vector. Your > current patch leaves the supply_gregset() and supply_fpregset() calls > as they are. That's fine for now, but in the long run they'll have to > be replaced with regset stuff too. By using a regset_from_xxx > function we only need a single entry in the architecture vector, > instead of three (or even more). Right. For the architecture vector, its clear that we already need some sort of regset_from_xxx method that covers all the regsets. I can imagine it being a function parameterized with an ``enum regset_type'', or an array variable indexed by the same, or even parameterized with a reggroup (but that's getting weird :-). Which ever. With this in place we can deprecate / eliminate supply_regset et.al.. How much of the thread-db should be done now. That's MichaelS/MarkKs call. However it is a relatively straight forward task - just lift the code from corelow.c. can we do that? Andrew