This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH, e500] Fix store.exp failures
- From: Luis Machado <lgustavo at codesourcery dot com>
- To: "'gdb-patches at sourceware dot org'" <gdb-patches at sourceware dot org>
- Date: Thu, 06 Jun 2013 14:03:29 +0200
- Subject: [PATCH, e500] Fix store.exp failures
- Reply-to: lgustavo at codesourcery dot com
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)
{