diff options
author | Petr Machata <pmachata@redhat.com> | 2015-03-18 19:42:02 +0100 |
---|---|---|
committer | Petr Machata <pmachata@redhat.com> | 2015-03-31 19:01:40 +0200 |
commit | 7f617347794f7d57f69d08f38c00f3f6ad221a56 (patch) | |
tree | 0c72ce8e93adc854c7d8a3ed44446e0ef21af78c /tests/varlocs.c | |
parent | 5370bb0a6492cb4669c8375e53748a4303997ed7 (diff) | |
download | elfutils-7f617347794f7d57f69d08f38c00f3f6ad221a56.tar.gz |
Publish known-dwarf.h
- Make the macro names properly scoped (DWARF_ALL_KNOWN_* and
DWARF_ONE_KNOWN_*).
- Simplify the calling convention: don't keep track of the comment
associated with the enumerator, always use the non-_DESC
DWARF_ONE_KNOWN_* callback.
- Install known-dwarf.h alongside libdw.h and others.
Signed-off-by: Petr Machata <pmachata@redhat.com>
Diffstat (limited to 'tests/varlocs.c')
-rw-r--r-- | tests/varlocs.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/tests/varlocs.c b/tests/varlocs.c index 04f17ff2..b5733e7b 100644 --- a/tests/varlocs.c +++ b/tests/varlocs.c @@ -1,5 +1,5 @@ /* Test program for dwarf location functions. - Copyright (C) 2013 Red Hat, Inc. + Copyright (C) 2013, 2015 Red Hat, Inc. This file is part of elfutils. This file is free software; you can redistribute it and/or modify @@ -64,9 +64,9 @@ dwarf_encoding_string (unsigned int code) { static const char *const known[] = { -#define ONE_KNOWN_DW_ATE(NAME, CODE) [CODE] = #NAME, - ALL_KNOWN_DW_ATE -#undef ONE_KNOWN_DW_ATE +#define DWARF_ONE_KNOWN_DW_ATE(NAME, CODE) [CODE] = #NAME, + DWARF_ALL_KNOWN_DW_ATE +#undef DWARF_ONE_KNOWN_DW_ATE }; if (likely (code < sizeof (known) / sizeof (known[0]))) @@ -108,11 +108,9 @@ dwarf_opcode_string (unsigned int code) { static const char *const known[] = { -#define ONE_KNOWN_DW_OP_DESC(NAME, CODE, DESC) ONE_KNOWN_DW_OP (NAME, CODE) -#define ONE_KNOWN_DW_OP(NAME, CODE) [CODE] = #NAME, - ALL_KNOWN_DW_OP -#undef ONE_KNOWN_DW_OP -#undef ONE_KNOWN_DW_OP_DESC +#define DWARF_ONE_KNOWN_DW_OP(NAME, CODE) [CODE] = #NAME, + DWARF_ALL_KNOWN_DW_OP +#undef DWARF_ONE_KNOWN_DW_OP }; if (likely (code < sizeof (known) / sizeof (known[0]))) |