From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10969 invoked by alias); 3 Sep 2014 12:51:17 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 10949 invoked by uid 89); 3 Sep 2014 12:51:17 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.4 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mailapp01.imgtec.com Received: from mailapp01.imgtec.com (HELO mailapp01.imgtec.com) (195.59.15.196) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 03 Sep 2014 12:51:15 +0000 Received: from KLMAIL01.kl.imgtec.org (unknown [192.168.5.35]) by Websense Email Security Gateway with ESMTPS id E7C9B7B64238B; Wed, 3 Sep 2014 13:51:09 +0100 (IST) Received: from LEMAIL01.le.imgtec.org (192.168.152.62) by KLMAIL01.kl.imgtec.org (192.168.5.35) with Microsoft SMTP Server (TLS) id 14.3.195.1; Wed, 3 Sep 2014 13:51:12 +0100 Received: from localhost (192.168.154.101) by LEMAIL01.le.imgtec.org (192.168.152.62) with Microsoft SMTP Server (TLS) id 14.3.195.1; Wed, 3 Sep 2014 13:51:11 +0100 Date: Wed, 03 Sep 2014 12:51:00 -0000 From: James Hogan To: "Maciej W. Rozycki" CC: Subject: Re: [PATCH v2] Reset errno before PTRACE_PEEKUSER for MIPS DSP_CONTROL Message-ID: <20140903125111.GF12084@jhogan-linux.le.imgtec.org> References: <1409608120-23991-1-git-send-email-james.hogan@imgtec.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-IsSubscribed: yes X-SW-Source: 2014-09/txt/msg00090.txt.bz2 On Wed, Sep 03, 2014 at 01:41:29PM +0100, Maciej W. Rozycki wrote: > On Mon, 1 Sep 2014, James Hogan wrote: > > > PTRACE_PEEKUSER can return -1, which is usually used to determine whether > > a system call has reported an error, so errno must be used alone to > > determine whether an error occurred. However errno isn't modified by a > > successful system call so it must be reset to a known value (0) before the > > syscall call. > > > > Add the missing errno reset when reading the DSP_CONTROL register in the > > native MIPS Linux backend and the MIPS gdbserver backend. > > > > gdb/: > > * mips-linux-nat.c (mips_linux_read_description): Reset errno to 0 > > prior to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call. > > > > gdb/gdbserver/: > > * linux-mips-low.c (mips_read_description): Reset errno to 0 prior > > to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call. > > This is fine, go ahead and apply it. Thanks. Thanks for reviewing it Maciej. This is my first GDB patch submitted upstream (although I have a pile of RFC patches for FR=1, FRE=1, MSA support I'm still getting into shape), so I don't have push access yet. Is it easy to arrange? Thanks James