From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2612 invoked by alias); 1 Sep 2014 17:06:37 -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 2564 invoked by uid 89); 1 Sep 2014 17:06:30 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.0 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 01 Sep 2014 17:06:29 +0000 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=SVR-IES-FEM-01.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1XOV3g-0004Hf-1x from Maciej_Rozycki@mentor.com ; Mon, 01 Sep 2014 10:06:24 -0700 Received: from localhost (137.202.0.76) by SVR-IES-FEM-01.mgc.mentorg.com (137.202.0.104) with Microsoft SMTP Server (TLS) id 14.2.247.3; Mon, 1 Sep 2014 18:06:22 +0100 Date: Mon, 01 Sep 2014 17:06:00 -0000 From: "Maciej W. Rozycki" To: James Hogan CC: Subject: Re: [PATCH] Reset errno before PTRACE_PEEKUSER for MIPS DSP_CONTROL In-Reply-To: <1409588996-14779-1-git-send-email-james.hogan@imgtec.com> Message-ID: References: <1409588996-14779-1-git-send-email-james.hogan@imgtec.com> User-Agent: Alpine 1.10 (DEB 962 2008-03-14) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" X-SW-Source: 2014-09/txt/msg00027.txt.bz2 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 OK with these updates, thanks. Maciej