Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "Ulrich Weigand" <uweigand@de.ibm.com>
To: cseo@linux.vnet.ibm.com (Carlos Eduardo Seo)
Cc: gdb-patches@sourceware.org (GDB Patches Mailing List)
Subject: Re: [patch] Add support for PPC Altivec registers in core files
Date: Fri, 26 Oct 2007 15:23:00 -0000	[thread overview]
Message-ID: <200710261501.l9QF1BII002037@d12av02.megacenter.de.ibm.com> (raw)
In-Reply-To: <4721F5C1.8060904@linux.vnet.ibm.com> from "Carlos Eduardo Seo" at Oct 26, 2007 12:12:17 PM

Carlos Eduardo Seo wrote:

> Thanks for reviewing this. I've attached the updated patch.

Thanks.  There's still some minor issues I've pointed out below.
Patch is OK with those fixed.

> As for gcore, I'm not familiar with it. If you point out some
> directions, I could do it as well. No problem.

Have a look at linux_nat_do_thread_registers in linux-nat.c.
This would need to be extended to write the Altivec register
section where applicable.  You may also need additional BFD
support for this.

Bye,
Ulrich


> +  if ((regnum != tdep->ppc_vrsave_regnum)
> +      && (regnum != tdep->ppc_vrsave_regnum - 1))
Still superfluous parentheses ;-)

> +    ppc_supply_reg (regcache, regnum, vrregs, offset, 16);
> +  else if (regnum == (tdep->ppc_vrsave_regnum - 1))
> +    ppc_supply_reg (regcache, regnum,
> +		    vrregs, offset, 4);
> +  else
> +    ppc_supply_reg (regcache, regnum,
> +		    vrregs, offset, 4);
Now the middle "else if" is superfluous.


> +  offset = ppc_vrreg_offset (tdep, offsets, regnum);
> +  if ((regnum != tdep->ppc_vrsave_regnum)
> +      && (regnum != tdep->ppc_vrsave_regnum - 1))
> +    ppc_collect_reg (regcache, regnum, vrregs, offset, 16);
> +  else if (regnum == (tdep->ppc_vrsave_regnum - 1))
> +    ppc_collect_reg (regcache, regnum,
> +		    vrregs, offset, 4);
> +  else
> +    ppc_collect_reg (regcache, regnum,
> +		    vrregs, offset, 4);

Same applies to this part.



-- 
  Dr. Ulrich Weigand
  GNU Toolchain for Linux on System z and Cell BE
  Ulrich.Weigand@de.ibm.com


  reply	other threads:[~2007-10-26 15:01 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-22 18:08 Carlos Eduardo Seo
2007-10-23 15:48 ` Jim Blandy
2007-10-23 20:09   ` Carlos Eduardo Seo
2007-10-26  0:04 ` Carlos Eduardo Seo
2007-10-26  0:13 ` Ulrich Weigand
2007-10-26 14:52   ` Carlos Eduardo Seo
2007-10-26 15:23     ` Ulrich Weigand [this message]
2007-10-26 15:29       ` Carlos Eduardo Seo
2007-10-29 19:02         ` Ulrich Weigand
2007-10-29 20:31           ` Carlos Eduardo Seo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200710261501.l9QF1BII002037@d12av02.megacenter.de.ibm.com \
    --to=uweigand@de.ibm.com \
    --cc=cseo@linux.vnet.ibm.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox