https://bugs.kde.org/show_bug.cgi?id=360008

--- Comment #2 from Philippe Waroquiers <philippe.waroqui...@skynet.be> ---
Sorry, I saw this bug but forgot to work on it, thanks for the reminder.

Here is what I think is wrong:
valgrind on ppc64 implements a ppc64 version that provides the registers vs0 ..
vs63.
The 'old' vr0 .. vr31 registers are mapped to vs32..vs63.
The 'old' floating point registers f0 .. f31 are mapped to the 'low' part of
the register vs0 .. vs31.
The 'high' part of vs0 .. vs31 is new.

However, the xml files describing the ppc64 target are still describing only
the 'old' ppc64
architecture.

When gdb connects to valgrind --vgdb-shadow-registers=no, then valgrind gives
to gdb
an xml file that describes the old arch. 
I suspect that when giving  --vgdb-shadow-registers=yes, the reply packet is
not containing
the values as expected by gdb, due to the missing 'new registers high parts' of
vs0 .. vs31.

Looking at the recent gdb descriptions of power, we see the following:
<!DOCTYPE target SYSTEM "gdb-target.dtd">
<target>
  <architecture>powerpc:common64</architecture>
  <xi:include href="power64-core.xml"/>
  <xi:include href="power-fpu-isa205.xml"/>
  <xi:include href="power64-linux.xml"/>
  <xi:include href="power-altivec.xml"/>
  <xi:include href="power-vsx.xml"/>
</target>

The valgrind xml target is missing the power-vsx.xml, that describes the
<!-- POWER7 VSX registers that do not overlap existing FP and VMX
 *!registers.  -->
<!DOCTYPE feature SYSTEM "gdb-target.dtd">
<feature name="org.gnu.gdb.power.vsx">
  <reg name="vs0h" bitsize="64" type="uint64"/>
  <reg name="vs1h" bitsize="64" type="uint64"/>
....

So, I think  that adding power-vsx.xml and the shadow  power-vsx-valgrind-s1
and s2.xml
will solve the problem.
Note that gdb understands how to rebuild vs0 .. vs31 from the f0 .. f31 and
vs0h .. vs31h
registers.  I think gdb will not understand how to rebuild vs0s1 .. vs31s1 from
f0s1 and vs0hs1 (problem similar to intel avx registers, described in user
manual
in  3.2.7. Examining and modifying Valgrind shadow registers).

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to