From: Luis Machado <luisgpm@linux.vnet.ibm.com>
To: Ulrich Weigand <uweigand@de.ibm.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH-ppc 2/5] Add VSX support for core-files
Date: Fri, 22 Aug 2008 22:32:00 -0000 [thread overview]
Message-ID: <1219444267.28934.10.camel@gargoyle> (raw)
In-Reply-To: <200808212113.m7LLDXSL026347@d12av02.megacenter.de.ibm.com>
Hi,
Attached is a patch that fixes the seen regression. OK?
Thanks,
Luis
On Thu, 2008-08-21 at 23:13 +0200, Ulrich Weigand wrote:
> Luis Machado wrote:
>
> > A new check should suffice for that. We will need three kinds of sets
> > then: VSX-able, VMX-able and neither VSX or VMX. How does it sound?
>
> That sounds right.
>
> Thanks,
> Ulrich
>
---
2008-08-22 Luis Machado <luisgpm@br.ibm.com>
* ppc-linux-tdep.c (ppc_linux_vsx_regset_sections) New structure.
(ppc_linux_vmx_regset_sections): New structure.
(ppc_linux_fp_regset_sections): New structure.
(ppc_linux_init_abi): Select core-file regset based on target
features.
Index: gdb/ppc-linux-tdep.c
===================================================================
--- gdb.orig/ppc-linux-tdep.c 2008-08-22 15:12:04.000000000 -0700
+++ gdb/ppc-linux-tdep.c 2008-08-22 15:22:42.000000000 -0700
@@ -491,7 +491,7 @@
return ppc64_desc_entry_point (desc);
}
-static struct core_regset_section ppc_linux_regset_sections[] =
+static struct core_regset_section ppc_linux_vsx_regset_sections[] =
{
{ ".reg", 268 },
{ ".reg2", 264 },
@@ -500,6 +500,21 @@
{ NULL, 0}
};
+static struct core_regset_section ppc_linux_vmx_regset_sections[] =
+{
+ { ".reg", 268 },
+ { ".reg2", 264 },
+ { ".reg-ppc-vmx", 544 },
+ { NULL, 0}
+};
+
+static struct core_regset_section ppc_linux_fp_regset_sections[] =
+{
+ { ".reg", 268 },
+ { ".reg2", 264 },
+ { NULL, 0}
+};
+
static CORE_ADDR
ppc64_standard_linkage2_target (struct frame_info *frame,
CORE_ADDR pc, unsigned int *insn)
@@ -1103,7 +1118,14 @@
set_gdbarch_core_read_description (gdbarch, ppc_linux_core_read_description);
/* Supported register sections. */
- set_gdbarch_core_regset_sections (gdbarch, ppc_linux_regset_sections);
+ if (tdesc_find_feature (info.target_desc,
+ "org.gnu.gdb.power.vsx"))
+ set_gdbarch_core_regset_sections (gdbarch, ppc_linux_vsx_regset_sections);
+ else if (tdesc_find_feature (info.target_desc,
+ "org.gnu.gdb.power.altivec"))
+ set_gdbarch_core_regset_sections (gdbarch, ppc_linux_vmx_regset_sections);
+ else
+ set_gdbarch_core_regset_sections (gdbarch, ppc_linux_fp_regset_sections);
/* Enable TLS support. */
set_gdbarch_fetch_tls_load_module_address (gdbarch,
next prev parent reply other threads:[~2008-08-22 22:32 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
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 [this message]
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=1219444267.28934.10.camel@gargoyle \
--to=luisgpm@linux.vnet.ibm.com \
--cc=gdb-patches@sourceware.org \
--cc=uweigand@de.ibm.com \
/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