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: [RFA] Cleanup mi_cmd_data_write_register_values


On Mon, Jan 01, 2007 at 02:45:08AM +0100, Mark Kettenis wrote:
> The next victim in my vendetta agains deprecated_xxx.

Thankyou thankyou!  This is a great thing to do.  I've been meaning to
do it myself, but I decided that my background cleanup project for now
would be testsuite results.

> Index: ChangeLog
> from  Mark Kettenis  <kettenis@gnu.org>
> 
> 	* mi/mi-main.c (mi_cmd_data_write_register_values): Use
> 	regcache_cooked_write_signed instead of
> 	deprecated_write_register_bytes.

Patch looks OK.  I'm almost glad this command is undocumented; this is
really all wrong as can be, since registers might not fit in the
LONGEST, and especially floating point registers have no business being
set from integer bit patterns.  And it encourages sloppy frontends to
hard code register numbers.  Yuck.

> +      if (regnum >= 0 && regnum < numregs
> +	  && REGISTER_NAME (regnum)  && *REGISTER_NAME (regnum))

Extra space in the middle there.

-- 
Daniel Jacobowitz
CodeSourcery


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