version 1.5, 2021/10/25 19:54:29 |
version 1.6, 2024/02/21 13:16:14 |
|
|
|
|
#include <errno.h> |
#include <errno.h> |
#include <stdint.h> |
#include <stdint.h> |
|
#include <stdio.h> |
#include <stdlib.h> |
#include <stdlib.h> |
#include <string.h> |
#include <string.h> |
|
|
|
|
dw_at2name(uint64_t at) |
dw_at2name(uint64_t at) |
{ |
{ |
static const char *dw_attrs[] = { DW_AT_NAMES }; |
static const char *dw_attrs[] = { DW_AT_NAMES }; |
|
static char buf[64]; |
|
|
if (at <= nitems(dw_attrs)) |
if (at <= nitems(dw_attrs)) |
return dw_attrs[at - 1]; |
return dw_attrs[at - 1]; |
|
|
if (at == DW_AT_hi_user) |
if (at == DW_AT_hi_user) |
return "DW_AT_hi_user"; |
return "DW_AT_hi_user"; |
|
|
return NULL; |
snprintf(buf, sizeof(buf), "#%llu", at); |
|
return buf; |
} |
} |
|
|
const char * |
const char * |