From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8001 invoked by alias); 1 Sep 2014 21:31:47 -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 7982 invoked by uid 89); 1 Sep 2014 21:31:45 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.2 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; Mon, 01 Sep 2014 21:31:44 +0000 Received: from KLMAIL01.kl.imgtec.org (unknown [192.168.5.35]) by Websense Email Security Gateway with ESMTPS id 3EC9EDBE6D4B1; Mon, 1 Sep 2014 22:31:37 +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; Mon, 1 Sep 2014 22:31:40 +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; Mon, 1 Sep 2014 22:31:39 +0100 Date: Mon, 01 Sep 2014 21:31:00 -0000 From: James Hogan To: "Maciej W. Rozycki" CC: Subject: Re: [PATCH] Reset errno before PTRACE_PEEKUSER for MIPS DSP_CONTROL Message-ID: <20140901212617.GA19976@jhogan-linux.le.imgtec.org> References: <1409588996-14779-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/msg00033.txt.bz2 On Mon, Sep 01, 2014 at 06:06:18PM +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. > > Please reformat your ChangeLog entries to stay within 74 columns as per > GDB coding standards: > > http://sourceware.org/gdb/wiki/Internals%20GDB-C-Coding-Standards > http://sourceware.org/ml/gdb-patches/2014-01/msg00216.html Yes, sorry about that, and thanks for the links. I'll fix and resend. > > OK with these updates, thanks. > > Maciej Thanks James