[PATCH] Improve the fetch/store of general-purpose and floating-point PowerPC registers

Sérgio Durigan Júnior sergiodj@linux.vnet.ibm.com
Tue May 5 18:34:00 GMT 2009


Hi Joel,

On Tue, 2009-04-28 at 21:05 -0700, Joel Brobecker wrote:
> Actually, no. The comments are for the functions themselves. We're
> trying to make sure that every new function gets in with some
> documentation of what it does. It doesn't have to be very long,
> but sometimes writing what the return value is about is very useful.
> For instance, I remember that some of your functions will return
> zero if the operation failed, I think.  That's an interesting piece
> of information to put in the documentation.  When the function is
> obvious, or when it implements a routine that's part of the gdbarch
> vector, then what we've been doing, lately, is just say "Implements
> the "bla_bla_bla" gdbarch method." or somesuch (we try not to repeat
> the documentation to avoid maintenance issues).


Here goes the reviewed version of the patch, addressing your
observations.  Is it OK to check in now?

Thanks,

-- 
Sérgio Durigan Júnior
Linux on Power Toolchain - Software Engineer
Linux Technology Center - LTC
IBM Brazil

2009-05-05  Sergio Durigan Junior <sergiodj@linux.vnet.ibm.com>

	* ppc-linux-nat.c (have_ptrace_getsetregs): New variable.
	(have_ptrace_getsetfpregs): Likewise.
	fetch_all_gp_regs): New function.
	(fetch_gp_regs): New function.
	(fetch_all_fp_regs): Likewise.
	(fetch_fp_regs): New function.
	(fetch_ppc_registers): Using the new methods to fetch general-
	purpose and floating-pointer registers.
	(store_all_gp_regs): New function.
	(store_gp_regs): Likewise.
	(store_all_fp_regs): New function.
	(store_fp_regs): Likewise.
	(store_ppc_registers): Using the new methods to store general-
	purpose and floating-pointer registers.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: read-regs-ppc.patch
Type: text/x-patch
Size: 11130 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20090505/05d56737/attachment.bin>


More information about the Gdb-patches mailing list