From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22966 invoked by alias); 11 Apr 2002 20:10:27 -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 22955 invoked from network); 11 Apr 2002 20:10:23 -0000 Received: from unknown (HELO cygnus.com) (205.180.230.5) by sources.redhat.com with SMTP; 11 Apr 2002 20:10:23 -0000 Received: from romulus.sfbay.redhat.com (remus.sfbay.redhat.com [172.16.27.252]) by runyon.cygnus.com (8.8.7-cygnus/8.8.7) with ESMTP id NAA27031; Thu, 11 Apr 2002 13:10:21 -0700 (PDT) Received: (from kev@localhost) by romulus.sfbay.redhat.com (8.11.6/8.11.6) id g3BKAGX03343; Thu, 11 Apr 2002 13:10:16 -0700 Date: Thu, 11 Apr 2002 13:10:00 -0000 From: Kevin Buettner Message-Id: <1020411201015.ZM3342@localhost.localdomain> In-Reply-To: Daniel Jacobowitz "Re: [PATCH] Add support for fpscr for Power / PowerPC targets" (Apr 11, 3:25pm) References: <1020411191706.ZM3109@localhost.localdomain> <20020411152555.A16075@nevyn.them.org> To: Daniel Jacobowitz , gdb-patches@sources.redhat.com Subject: Re: [PATCH] Add support for fpscr for Power / PowerPC targets MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2002-04/txt/msg00428.txt.bz2 On Apr 11, 3:25pm, Daniel Jacobowitz wrote: > I know this is not adequately documented right now, but every change to > the format of the register cache is a change to the remote protocol. > The closest thing we've got to documentation are the files in > regformats/; they don't document a fraction of the possibilities, > though. Thanks for reminding me of this. > I've updated the PowerPC definition to match this change, as > well as updating gdbserver. Thanks. > Before I commit either, though: > > > @@ -376,6 +380,14 @@ store_register (int tid, int regno) > > ptrace (PT_WRITE_U, tid, (PTRACE_ARG3_TYPE) regaddr, > > *(PTRACE_XFER_TYPE *) & buf[i]); > > regaddr += sizeof (PTRACE_XFER_TYPE); > > + > > + if (errno == EIO > > + && regno == gdbarch_tdep (current_gdbarch)->ppc_fpscr_regnum) > > + { > > + /* Some older kernel versions don't allow fpscr to be written. */ > > + continue; > > + } > > + > > if (errno != 0) > > { > > sprintf (mess, "writing register %s (#%d)", > > What versions are we talking here? 2.2.X, for X <= 15. Probably for X > 15 too, but I haven't checked. I don't think the 2.4 kernels have this problem though. > Is it worth silencing the gdbserver warning in this case? If it's only a warning, it probably doesn't hurt to leave it in, though it'd be nice to structure it so that the warning is only printed once. I would have preferred to not to have to add the above code to ppc-linux-nat.c, but I was seeing too many regressions without it and that made it difficult to evaluate the patch. It was worth it to add the above code though because I ended up catching some regressions that I would've missed otherwise. (I probably ought to just upgrade my Linux/PPC box...) Kevin