From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32551 invoked by alias); 6 Apr 2006 13:33:00 -0000 Received: (qmail 32543 invoked by uid 22791); 6 Apr 2006 13:32:59 -0000 X-Spam-Check-By: sourceware.org Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Thu, 06 Apr 2006 13:32:58 +0000 Received: from drow by nevyn.them.org with local (Exim 4.54) id 1FRUbT-0006Yz-0y; Thu, 06 Apr 2006 09:32:51 -0400 Date: Thu, 06 Apr 2006 13:38:00 -0000 From: Daniel Jacobowitz To: "David S. Miller" Cc: mark.kettenis@xs4all.nl, gdb@sources.redhat.com Subject: Re: core regs vs. proc-service regs mess Message-ID: <20060406133250.GA25088@nevyn.them.org> Mail-Followup-To: "David S. Miller" , mark.kettenis@xs4all.nl, gdb@sources.redhat.com References: <20060405.000621.41243752.davem@davemloft.net> <12186.192.87.1.22.1144225521.squirrel@webmail.xs4all.nl> <20060405132258.GA28872@nevyn.them.org> <20060405.220644.04932953.davem@davemloft.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060405.220644.04932953.davem@davemloft.net> User-Agent: Mutt/1.5.8i X-IsSubscribed: yes 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/msg00057.txt.bz2 On Wed, Apr 05, 2006 at 10:06:44PM -0700, David S. Miller wrote: > So something like the following patch? I didn't know what to do with > the fpxregset stuff, I guess we'll just have to pick some random > string for that? I couldn't find a ELF section name string assigned > to that stuff. It's .reg-xfp; created by bfd/elf.c:elfcore_grok_prxfpreg. > + if (gdbarch && gdbarch_regset_from_core_section_p (gdbarch) > + && (regset = gdbarch_regset_from_core_section (gdbarch, ".reg", > + sizeof gregs)) != NULL) No point testing gdbarch for NULL; it won't be. Also, I think gdbarch_regset_from_core_section_p is enough. If that returns NULL, then skip the regset. We don't need to cater to incomplete implementations of the core functions. Oh, and GDB prefers not to use assignments in if statements. But otherwise, yeah, this is what I had in mind. Thanks. -- Daniel Jacobowitz CodeSourcery