mirror of
https://github.com/JakeHillion/drgn.git
synced 2024-12-23 01:33:06 +00:00
4a67d34fcb
Include the opcode name if known, and add the bug report link like we do for unknown relocation types. This might give us some idea of how to prioritize #321. Signed-off-by: Omar Sandoval <osandov@osandov.com>
26 lines
614 B
C
26 lines
614 B
C
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
// SPDX-License-Identifier: LGPL-2.1-or-later
|
|
// Generated by scripts/gen_dwarf_constants.py.
|
|
|
|
#include <stdio.h>
|
|
|
|
#include "dwarf_constants.h"
|
|
|
|
#define X(name, _) if (value == name) return #name;
|
|
|
|
const char *dw_op_str(int value, char buf[static DW_OP_STR_BUF_LEN])
|
|
{
|
|
DW_OP_DEFINITIONS
|
|
snprintf(buf, DW_OP_STR_BUF_LEN, DW_OP_STR_UNKNOWN_FORMAT, value);
|
|
return buf;
|
|
}
|
|
|
|
const char *dw_tag_str(int value, char buf[static DW_TAG_STR_BUF_LEN])
|
|
{
|
|
DW_TAG_DEFINITIONS
|
|
snprintf(buf, DW_TAG_STR_BUF_LEN, DW_TAG_STR_UNKNOWN_FORMAT, value);
|
|
return buf;
|
|
}
|
|
|
|
#undef X
|