1
0
Fork 0
mirror of https://github.com/tobast/libunwind-eh_elf.git synced 2025-03-11 02:40:09 +01:00

(unw_regname): Use NELEMS() instead of open code.

(Logical change 1.39)
This commit is contained in:
mostang.com!davidm 2003-01-21 08:08:32 +00:00
parent 0797f31dd2
commit cb8d20c098

View file

@ -0,0 +1,15 @@
#include "unwind_i.h"
static const char *regname[] =
{
"eax", "ebx", "ecx", "edx", "esi", "edi", "ebp", "eip", "esp"
};
const char *
unw_regname (unw_regnum_t reg)
{
if (reg < NELEMS (regname))
return regname[reg];
else
return "???";
}