This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH, e500] Fix store.exp failures
- From: Luis Machado <lgustavo at codesourcery dot com>
- Cc: "'gdb-patches at sourceware dot org'" <gdb-patches at sourceware dot org>
- Date: Thu, 27 Jun 2013 10:29:12 -0300
- Subject: Re: [PATCH, e500] Fix store.exp failures
- References: <51B07A91 dot 2090907 at codesourcery dot com> <51B5E0CB dot 9030603 at codesourcery dot com>
- Reply-to: lgustavo at codesourcery dot com
Any objections if i go ahead and check this change in? It seems nobody
has clear objections to this change or nobody has a special interest in
e500 (at least around here).
Regards,
Luis
On 06/10/2013 11:20 AM, Luis Machado wrote:
Any thoughts in general?
On 06/06/2013 02:03 PM, Luis Machado wrote:
Hi,
I'm seeing a few failures for e500 in store.exp. It fails to display
multi-piece values correctly if one (or more) of those pieces happens to
live in one of the SPE register halves.
When DWARF asks for information about the SPE register half, GDB in turn
offers information about the whole SPE register, which is 4 bytes longer
in size. DWARF will then proceed to grab a piece of those 8 bytes and,
obviously, will end up fetching the wrong half.
In reality, GDB should return the REAL register (SPE half) instead of
returning the PSEUDO register (full SPE register comprised of one SPE
half and one GPR).
This on-liner fixes this problem and gives full passes for store.exp on
e500.
OK?
Luis
2013-06-06 Luis Machado <lgustavo@codesourcery.com>
* rs6000-tdep.c (rs6000_dwarf2_reg_to_regnum): Return the real register
number instead of the pseudo register one.
diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c
index d3ff09d..c1630ea 100644
--- a/gdb/rs6000-tdep.c
+++ b/gdb/rs6000-tdep.c
@@ -2896,7 +2896,7 @@ rs6000_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, int num)
else if (1124 <= num && num < 1124 + 32)
return tdep->ppc_vr0_regnum + (num - 1124);
else if (1200 <= num && num < 1200 + 32)
- return tdep->ppc_ev0_regnum + (num - 1200);
+ return tdep->ppc_ev0_upper_regnum + (num - 1200);
else
switch (num)
{