]> sourceware.org Git - systemtap.git/commitdiff
PPC64 Dwarf handle both .debug_frame and .eh_frame register mappings.
authorMark Wielaard <mjw@redhat.com>
Fri, 4 Nov 2011 16:26:43 +0000 (17:26 +0100)
committerMark Wielaard <mjw@redhat.com>
Fri, 4 Nov 2011 16:26:43 +0000 (17:26 +0100)
These are slightly strange since they don't really use dwarf register
mappings, but gcc internal register numbers. There is some confusion about
the numbering see http://gcc.gnu.org/ml/gcc/2004-01/msg00025.html
We just handle the 32 fixed point registers, mq, count and link and
ignore status registers, floating point, vectors and special registers
(most of which aren't available in pt_regs anyway). Also we placed nip
last since we use that as UNW_PC register and it needs to be filled in.
Note that we handle both the .eh_frame and .debug_frame numbering at
the same time. There is potential overlap though. 64 maps to cr in one
and mq in the other...

runtime/unwind/ppc64.h

index 24f6c4eb93064bf757830213b505c7de8eef6aac..0f24413ecfc707cdc27bd7117ae0d9f50041c352 100644 (file)
    ignore status registers, floating point, vectors and special registers
    (most of which aren't available in pt_regs anyway). Also we placed nip
    last since we use that as UNW_PC register and it needs to be filled in.
+   Note that we handle both the .eh_frame and .debug_frame numbering at
+   the same time. There is potential overlap though. 64 maps to cr in one
+   and mq in the other...
    Everything else is mapped to an invalid register number 9999. */
 #define DWARF_REG_MAP(r) \
-        ((r >= 0 && r <= 31) ? r /* r0 - r31 */        \
-         : (r == 64) ? 32 /* mq/softe/spr0 */  \
-         : (r == 65) ? 34 /* link */           \
-         : (r == 66) ? 33 /* ctr */            \
+        ((r >= 0 && r <= 31) ? r /* r0 - r31 */                        \
+         : (r == 64 || r == 100) ? 32 /* mq/softe/spr0 */      \
+         : (r == 65 || r == 108) ? 34 /* link */               \
+         : (r == 66 || r == 109) ? 33 /* ctr */                        \
          : 9999)
 
 #define UNW_PC_IDX 35
This page took 0.029929 seconds and 5 git commands to generate.