Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src-draft/trunk]: src/sys/lib/libunwind libunwind: translate return register...



details:   https://anonhg.NetBSD.org/src-all/rev/937b3b31e4a2
branches:  trunk
changeset: 952770:937b3b31e4a2
user:      Joerg Sonnenberger <joerg%bec.de@localhost>
date:      Tue Feb 16 02:55:13 2021 +0100

description:
libunwind: translate return register from DWARF number to internal number

This makes a difference on PowerPC because the DWARF numbers are sparse.

diffstat:

 sys/lib/libunwind/DwarfParser.hpp |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diffs (12 lines):

diff -r 7765873bc8a3 -r 937b3b31e4a2 sys/lib/libunwind/DwarfParser.hpp
--- a/sys/lib/libunwind/DwarfParser.hpp Sun Feb 07 01:43:57 2021 +0100
+++ b/sys/lib/libunwind/DwarfParser.hpp Tue Feb 16 02:55:13 2021 +0100
@@ -239,7 +239,7 @@
   // Parse data alignment factor
   cieInfo->dataAlignFactor = addressSpace.getSLEB128(p, cieContentEnd);
   // Parse return address register
-  cieInfo->returnAddressRegister = (uint8_t)addressSpace.getULEB128(p, cieContentEnd);
+  cieInfo->returnAddressRegister = R::dwarf2regno((uint8_t)addressSpace.getULEB128(p, cieContentEnd));
   // Parse augmentation data based on augmentation string.
   if (addressSpace.get8(strStart) == 'z') {
     // parse augmentation data length



Home | Main Index | Thread Index | Old Index