File: dwarf_constants.c

package info (click to toggle)
drgn 0.0.33-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 6,892 kB
  • sloc: python: 59,081; ansic: 51,400; awk: 423; makefile: 339; sh: 113
file content (25 lines) | stat: -rw-r--r-- 614 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// 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