
Instead of defining DWARF register to string table in dwarf-regs-table.h and dwarf-regs.c, use a common table in dwarf-regs-table.h. Ensure that the DWARF register table is up-to-date with http://refspecs.linuxfoundation.org/ELF/zSeries/lzsabi0_s390/x1542.html. For unwinding with libdw, also ensure to correctly setup the DWARF register frame according to the register mappings. Currently, libdw supports up to 32 registers only. Suggested-by: Thomas Richter <tmricht@linux.vnet.ibm.com> Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com> Reviewed-and-tested-by: Thomas Richter <tmricht@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
19 lines
427 B
C
19 lines
427 B
C
// SPDX-License-Identifier: GPL-2.0
|
|
/*
|
|
* Mapping of DWARF debug register numbers into register names.
|
|
*
|
|
* Copyright IBM Corp. 2010
|
|
* Author(s): Heiko Carstens <heiko.carstens@de.ibm.com>,
|
|
*
|
|
*/
|
|
|
|
#include <stddef.h>
|
|
#include <dwarf-regs.h>
|
|
#include <linux/kernel.h>
|
|
#include "dwarf-regs-table.h"
|
|
|
|
const char *get_arch_regstr(unsigned int n)
|
|
{
|
|
return (n >= ARRAY_SIZE(s390_dwarf_regs)) ? NULL : s390_dwarf_regs[n];
|
|
}
|