This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Reset errno before PTRACE_PEEKUSER for MIPS DSP_CONTROL


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]