From: Luis Machado <luisgpm@linux.vnet.ibm.com>
To: gdb-patches@sourceware.org
Subject: Re: [PATCH-ppc 2/5] Add VSX support for core-files
Date: Fri, 08 Aug 2008 15:18:00 -0000 [thread overview]
Message-ID: <1218208649.24254.12.camel@gargoyle> (raw)
In-Reply-To: <1217016947.29012.76.camel@gargoyle>
Ping?
On Fri, 2008-07-25 at 17:15 -0300, Luis Machado wrote:
> This patch adds the required support to dump VSX registers and read them
> them back from a specific VSX notes section. This is in sync with the
> format used by the Kernel.
>
> ---
> 2008-07-25 Luis Machado <luisgpm@br.ibm.com>
>
> * ppc-linux-tdep.c (ppc_linux_regset_sections): Add new ".reg-ppc-vsx" field.
> (ppc32_linux_vsxregset): New 32-bit VSX-enabled regset.
> (ppc_linux_regset_from_core_section): Handle VSX core section.
> (ppc_linux_core_read_description): Support VSX-enabled core files.
>
> * corelow.c (get_core_register_section): Support VSX-enabled
> core files.
>
>
> Index: gdb/ppc-linux-tdep.c
> ===================================================================
> --- gdb.orig/ppc-linux-tdep.c 2008-07-23 09:28:09.000000000 -0700
> +++ gdb/ppc-linux-tdep.c 2008-07-23 09:31:44.000000000 -0700
> @@ -496,6 +496,7 @@
> { ".reg", 268 },
> { ".reg2", 264 },
> { ".reg-ppc-vmx", 544 },
> + { ".reg-ppc-vsx", 256 },
> { NULL, 0}
> };
>
> @@ -743,6 +744,13 @@
> NULL
> };
>
> +static const struct regset ppc32_linux_vsxregset = {
> + &ppc32_linux_reg_offsets,
> + ppc_supply_vsxregset,
> + ppc_collect_vsxregset,
> + NULL
> +};
> +
> const struct regset *
> ppc_linux_gregset (int wordsize)
> {
> @@ -771,6 +779,8 @@
> return &ppc32_linux_fpregset;
> if (strcmp (sect_name, ".reg-ppc-vmx") == 0)
> return &ppc32_linux_vrregset;
> + if (strcmp (sect_name, ".reg-ppc-vsx") == 0)
> + return &ppc32_linux_vsxregset;
> return NULL;
> }
>
> @@ -974,6 +984,7 @@
> bfd *abfd)
> {
> asection *altivec = bfd_get_section_by_name (abfd, ".reg-ppc-vmx");
> + asection *vsx = bfd_get_section_by_name (abfd, ".reg-ppc-vsx");
> asection *section = bfd_get_section_by_name (abfd, ".reg");
> if (! section)
> return NULL;
> @@ -981,10 +992,20 @@
> switch (bfd_section_size (abfd, section))
> {
> case 48 * 4:
> - return altivec? tdesc_powerpc_altivec32l : tdesc_powerpc_32l;
> + if (vsx)
> + return tdesc_powerpc_vsx32l;
> + else if (altivec)
> + return tdesc_powerpc_altivec32l;
> + else
> + return tdesc_powerpc_32l;
>
> case 48 * 8:
> - return altivec? tdesc_powerpc_altivec64l : tdesc_powerpc_64l;
> + if (vsx)
> + return tdesc_powerpc_vsx64l;
> + else if (altivec)
> + return tdesc_powerpc_altivec64l;
> + else
> + return tdesc_powerpc_64l;
>
> default:
> return NULL;
> Index: gdb/corelow.c
> ===================================================================
> --- gdb.orig/corelow.c 2008-07-23 09:28:09.000000000 -0700
> +++ gdb/corelow.c 2008-07-23 09:31:44.000000000 -0700
> @@ -499,6 +499,8 @@
> ".reg-xfp", 3, "extended floating-point", 0);
> get_core_register_section (regcache,
> ".reg-ppc-vmx", 3, "ppc Altivec", 0);
> + get_core_register_section (regcache,
> + ".reg-ppc-vsx", 4, "POWER7 VSX", 0);
>
> /* Supply dummy value for all registers not found in the core. */
> for (i = 0; i < gdbarch_num_regs (get_regcache_arch (regcache)); i++)
>
>
next prev parent reply other threads:[~2008-08-08 15:18 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-25 20:16 Luis Machado
2008-08-08 15:18 ` Luis Machado [this message]
2008-08-21 19:53 ` Ulrich Weigand
2008-08-21 21:10 ` Luis Machado
2008-08-21 21:14 ` Ulrich Weigand
2008-08-22 22:32 ` Luis Machado
2008-08-25 18:27 ` Ulrich Weigand
2008-08-26 15:32 ` Luis Machado
2008-08-14 19:52 ` Ulrich Weigand
2008-08-15 5:14 ` Luis Machado
2008-08-15 15:27 ` Luis Machado
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=1218208649.24254.12.camel@gargoyle \
--to=luisgpm@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