- This code is based on the following proposal: http://www.dwarfstd.org/ShowIssue.php?issue=110722.1
- dwarf_getmacros is left to support only .debug_macinfo. The only problematic opcode really is DW_MACINFO_vendor_ext, that the new standard lacks, and that could in theory be misinterpreted by extant code as whatever operand a vendor decides to map to 0xff.
- Instead, two principial iteration interfaces are provided for access to new-style sections: dwarf_getmacros_die and dwarf_getmacros_off. And a suite of new helper interfaces for analysis of individual opcodes: dwarf_macro_version, dwarf_macro_line_offset, dwarf_macro_getparamcnt, dwarf_macro_param.
- The existing interfaces dwarf_macro_opcode, dwarf_macro_param1 and dwarf_macro_param2 remain operational for old- as well as new-style Dwarf macro sections, if applicable.
Signed-off-by: Petr Machata pmachata@redhat.com --- libdw/ChangeLog | 32 +++ libdw/Makefile.am | 8 +- libdw/dwarf_end.c | 1 + libdw/dwarf_error.c | 3 +- libdw/dwarf_getmacros.c | 514 +++++++++++++++++++++++++++++++++------ libdw/dwarf_macro_getparamcnt.c | 43 ++++ libdw/dwarf_macro_line_offset.c | 45 ++++ libdw/dwarf_macro_param.c | 46 ++++ libdw/dwarf_macro_param1.c | 8 +- libdw/dwarf_macro_param2.c | 18 +- libdw/dwarf_macro_version.c | 44 ++++ libdw/libdw.h | 87 ++++++- libdw/libdw.map | 11 +- libdw/libdwP.h | 54 ++++- 14 files changed, 803 insertions(+), 111 deletions(-) create mode 100644 libdw/dwarf_macro_getparamcnt.c create mode 100644 libdw/dwarf_macro_line_offset.c create mode 100644 libdw/dwarf_macro_param.c create mode 100644 libdw/dwarf_macro_version.c
diff --git a/libdw/ChangeLog b/libdw/ChangeLog index b8c5acd..5e0b577 100644 --- a/libdw/ChangeLog +++ b/libdw/ChangeLog @@ -1,5 +1,37 @@ 2014-09-10 Petr Machata pmachata@redhat.com
+ * dwarf_macro_getparamcnt.c: New file. + * dwarf_macro_line_offset.c: New file. + * dwarf_macro_param.c: New file. + * dwarf_macro_version.c: New file. + * Makefile.am (libdw_a_SOURCES): Add the new files. + * libdwP.h (DWARF_E_INVALID_OPCODE): New enumerator. + (struct Dwarf): New field macro_ops. + (Dwarf_Macro_Op_Proto, Dwarf_Macro_Op_Table): New structures for + keeping macro opcode prototypes in. + (Dwarf_Macro_s): Drop all fields, add new ones. + * dwarf_error.c (errmsgs): Add a message for + DWARF_E_INVALID_OPCODE. + * dwarf_end.c (dwarf_end): Destroy it here. + * libdw.h (dwarf_getmacros_die, dwarf_getmacros_off) + (dwarf_macro_version, dwarf_macro_line_offset) + (dwarf_macro_getparamcnt) + (dwarf_macro_param): New public interfaces. + * dwarf_getmacros.c: Implement them here. + (get_offset_from, demand, ck_read_ubyte_unaligned_inc) + (macro_op_compare, build_table, init_macinfo_table) + (get_macinfo_table, get_table_for_offset, read_macros) + (gnu_macros_getmacros_off, macro_info_getmacros_off): Helpers. + (dwarf_getmacros): Adjust to dispatch to the new interfaces. + * dwarf_macro_param1.c (dwarf_macro_param1): Adjust to dispatch to + the new interfaces. + * dwarf_macro_param2.c (dwarf_macro_param2): Likewise. + * libdw.map (ELFUTILS_0.161): New. Add dwarf_getmacros_die, + dwarf_getmacros_off, dwarf_macro_version, dwarf_macro_getparamcnt, + dwarf_macro_param. + +2014-09-10 Petr Machata pmachata@redhat.com + * memory-access.h (read_ubyte_unaligned_inc) (read_sbyte_unaligned_inc): Read 1-sized fields as well.
diff --git a/libdw/Makefile.am b/libdw/Makefile.am index 2e42a37..51b6a0c 100644 --- a/libdw/Makefile.am +++ b/libdw/Makefile.am @@ -71,9 +71,11 @@ libdw_a_SOURCES = dwarf_begin.c dwarf_begin_elf.c dwarf_end.c dwarf_getelf.c \ dwarf_getlocation.c dwarf_getstring.c dwarf_offabbrev.c \ dwarf_getaranges.c dwarf_onearange.c dwarf_getarangeinfo.c \ dwarf_getarange_addr.c dwarf_getattrs.c dwarf_formflag.c \ - dwarf_getmacros.c dwarf_macro_opcode.c dwarf_macro_param1.c \ - dwarf_macro_param2.c dwarf_addrdie.c \ - dwarf_getfuncs.c \ + dwarf_getmacros.c dwarf_macro_getparamcnt.c \ + dwarf_macro_line_offset.c dwarf_macro_opcode.c \ + dwarf_macro_param.c dwarf_macro_param1.c \ + dwarf_macro_param2.c dwarf_macro_version.c \ + dwarf_addrdie.c dwarf_getfuncs.c \ dwarf_decl_file.c dwarf_decl_line.c dwarf_decl_column.c \ dwarf_func_inline.c dwarf_getsrc_file.c \ libdw_findcu.c libdw_form.c libdw_alloc.c \ diff --git a/libdw/dwarf_end.c b/libdw/dwarf_end.c index 241a257..26c38cb 100644 --- a/libdw/dwarf_end.c +++ b/libdw/dwarf_end.c @@ -92,6 +92,7 @@ dwarf_end (dwarf) to be handled. */ tdestroy (dwarf->cu_tree, cu_free); tdestroy (dwarf->tu_tree, cu_free); + tdestroy (dwarf->macro_ops, noop_free);
struct libdw_memblock *memp = dwarf->mem_tail; /* The first block is allocated together with the Dwarf object. */ diff --git a/libdw/dwarf_error.c b/libdw/dwarf_error.c index 2292914..08b691a 100644 --- a/libdw/dwarf_error.c +++ b/libdw/dwarf_error.c @@ -1,5 +1,5 @@ /* Retrieve ELF descriptor used for DWARF access. - Copyright (C) 2002, 2003, 2004, 2005, 2009 Red Hat, Inc. + Copyright (C) 2002, 2003, 2004, 2005, 2009, 2014 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper drepper@redhat.com, 2002.
@@ -92,6 +92,7 @@ static const char *errmsgs[] = [DWARF_E_NO_DEBUG_RANGES] = N_(".debug_ranges section missing"), [DWARF_E_INVALID_CFI] = N_("invalid CFI section"), [DWARF_E_NO_ALT_DEBUGLINK] = N_("no alternative debug link found"), + [DWARF_E_INVALID_OPCODE] = N_("invalid opcode"), }; #define nerrmsgs (sizeof (errmsgs) / sizeof (errmsgs[0]))
diff --git a/libdw/dwarf_getmacros.c b/libdw/dwarf_getmacros.c index a3d2c81..be13409 100644 --- a/libdw/dwarf_getmacros.c +++ b/libdw/dwarf_getmacros.c @@ -1,5 +1,5 @@ /* Get macro information. - Copyright (C) 2002-2009 Red Hat, Inc. + Copyright (C) 2002-2009, 2014 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper drepper@redhat.com, 2002.
@@ -33,112 +33,464 @@
#include <dwarf.h> #include <string.h> +#include <search.h>
#include <libdwP.h>
+#include <stdio.h> +#include <assert.h> +#include <inttypes.h> +#include <stdlib.h>
-ptrdiff_t -dwarf_getmacros (die, callback, arg, offset) - Dwarf_Die *die; - int (*callback) (Dwarf_Macro *, void *); - void *arg; - ptrdiff_t offset; +static int +get_offset_from (Dwarf_Die *die, int name, Dwarf_Word *retp) { - if (die == NULL) + /* Get the appropriate attribute. */ + Dwarf_Attribute attr; + if (INTUSE(dwarf_attr) (die, name, &attr) == NULL) + return -1; + + /* Offset into the corresponding section. */ + return INTUSE(dwarf_formudata) (&attr, retp); +} + +static bool +demand (size_t nbytes, const unsigned char *readp, const unsigned char *endp) +{ + bool ret = readp < endp && (size_t) (endp - readp) >= nbytes; + if (! ret) + __libdw_seterrno (DWARF_E_INVALID_DWARF); + return ret; +} + +#define ck_read_ubyte_unaligned_inc(Nbytes, Dbg, Addr, AddrEnd, Ret) \ + (demand ((Nbytes), (Addr), (AddrEnd)) \ + ? ((Ret = read_ubyte_unaligned_inc ((Nbytes), (Dbg), (Addr))), true) \ + : false) + +static int +macro_op_compare (const void *p1, const void *p2) +{ + const Dwarf_Macro_Op_Table *t1 = (const Dwarf_Macro_Op_Table *) p1; + const Dwarf_Macro_Op_Table *t2 = (const Dwarf_Macro_Op_Table *) p2; + + if (t1->offset < t2->offset) return -1; + if (t1->offset > t2->offset + t2->read) + return 1; + + return 0; +} + +static void +build_table (Dwarf_Macro_Op_Table *table, + Dwarf_Macro_Op_Proto op_protos[static 255]) +{ + unsigned ct = 0; + for (unsigned i = 1; i < 256; ++i) + if (op_protos[i - 1].forms != NULL) + table->table[table->opcodes[i - 1] = ct++] = op_protos[i - 1]; + else + table->opcodes[i] = 0xff; +} + +#define MACRO_PROTO(NAME, ...) \ + Dwarf_Macro_Op_Proto NAME = ({ \ + static const uint8_t proto[] = {__VA_ARGS__}; \ + (Dwarf_Macro_Op_Proto) {sizeof proto, proto}; \ + }) + +static Dwarf_Macro_Op_Table * +init_macinfo_table (void) +{ + MACRO_PROTO (p_udata_str, DW_FORM_udata, DW_FORM_string); + MACRO_PROTO (p_udata_udata, DW_FORM_udata, DW_FORM_udata); + MACRO_PROTO (p_none); + + Dwarf_Macro_Op_Proto op_protos[255] = + { + [DW_MACINFO_define - 1] = p_udata_str, + [DW_MACINFO_undef - 1] = p_udata_str, + [DW_MACINFO_vendor_ext - 1] = p_udata_str, + [DW_MACINFO_start_file - 1] = p_udata_udata, + [DW_MACINFO_end_file - 1] = p_none, + }; + + static Dwarf_Macro_Op_Table table; + memset (&table, 0, sizeof table); + + build_table (&table, op_protos); + return &table; +} + +static inline Dwarf_Macro_Op_Table * +get_macinfo_table (void) +{ + static Dwarf_Macro_Op_Table *ret = NULL; + if (unlikely (ret == NULL)) + ret = init_macinfo_table (); + return ret; +} + +static Dwarf_Macro_Op_Table * +get_table_for_offset (Dwarf *dbg, Dwarf_Word macoff, + const unsigned char *readp, + const unsigned char *const endp) +{ + Dwarf_Macro_Op_Table fake = { .offset = macoff }; + Dwarf_Macro_Op_Table **found = tfind (&fake, &dbg->macro_ops, + macro_op_compare); + if (found != NULL) + return *found;
- Elf_Data *d = die->cu->dbg->sectiondata[IDX_debug_macinfo]; - if (unlikely (d == NULL) || unlikely (d->d_buf == NULL)) + const unsigned char *startp = readp; + uint16_t version; + if (! ck_read_ubyte_unaligned_inc (2, dbg, readp, endp, version)) + return NULL; + if (version != 4) + { + __libdw_seterrno (DWARF_E_INVALID_VERSION); + return NULL; + } + + uint8_t flags; + if (! ck_read_ubyte_unaligned_inc (1, dbg, readp, endp, flags)) + return NULL; + + bool is_64bit = (flags & 0x1) != 0; + + Dwarf_Off line_offset = (Dwarf_Off) -1; + if ((flags & 0x2) != 0 + && ! ck_read_ubyte_unaligned_inc (is_64bit ? 8 : 4, dbg, + readp, endp, line_offset)) + return NULL; + + /* """The macinfo entry types defined in this standard may, but + might not, be described in the table""". + + I.e. these may be present. It's tempting to simply skip them, + but it's probably more correct to tolerate that a producer tweaks + the way certain opcodes are encoded, for whatever reasons. */ + + MACRO_PROTO (p_udata_str, DW_FORM_udata, DW_FORM_string); + MACRO_PROTO (p_udata_strp, DW_FORM_udata, DW_FORM_strp); + MACRO_PROTO (p_udata_udata, DW_FORM_udata, DW_FORM_udata); + MACRO_PROTO (p_secoffset, DW_FORM_sec_offset); + MACRO_PROTO (p_none); + + Dwarf_Macro_Op_Proto op_protos[255] = + { + [DW_MACRO_GNU_define - 1] = p_udata_str, + [DW_MACRO_GNU_undef - 1] = p_udata_str, + [DW_MACRO_GNU_define_indirect - 1] = p_udata_strp, + [DW_MACRO_GNU_undef_indirect - 1] = p_udata_strp, + [DW_MACRO_GNU_start_file - 1] = p_udata_udata, + [DW_MACRO_GNU_end_file - 1] = p_none, + [DW_MACRO_GNU_transparent_include - 1] = p_secoffset, + /* N.B. DW_MACRO_undef_indirectx, DW_MACRO_define_indirectx + should be added when 130313.1 is supported. */ + }; + + if ((flags & 0x4) != 0) + { + unsigned count; + if (! ck_read_ubyte_unaligned_inc (1, dbg, readp, endp, count)) + return NULL; + for (unsigned i = 0; i < count; ++i) + { + unsigned opcode; + if (! ck_read_ubyte_unaligned_inc (1, dbg, readp, endp, opcode)) + return NULL; + + Dwarf_Macro_Op_Proto e; + get_uleb128 (e.nforms, readp); // XXX checking + e.forms = readp; + op_protos[opcode] = e; + + demand (e.nforms, readp, endp); + readp += e.nforms; + } + } + + size_t ct = 0; + for (unsigned i = 1; i < 256; ++i) + if (op_protos[i - 1].forms != NULL) + ++ct; + + /* We support at most 0xfe opcodes defined in the table, as 0xff is + a value that means that given opcode is not stored at all. But + that should be fine, as opcode 0 is not allocated. */ + assert (ct < 0xff); + + size_t macop_table_size = offsetof (Dwarf_Macro_Op_Table, table[ct]); + + Dwarf_Macro_Op_Table *table = libdw_alloc (dbg, Dwarf_Macro_Op_Table, + macop_table_size, 1); + + *table = (Dwarf_Macro_Op_Table) { + .offset = macoff, + .line_offset = line_offset, + .header_len = readp - startp, + .version = version, + .is_64bit = is_64bit, + }; + build_table (table, op_protos); + + Dwarf_Macro_Op_Table **ret = tsearch (table, &dbg->macro_ops, + macro_op_compare); + if (unlikely (ret == NULL)) + { + __libdw_seterrno (DWARF_E_NOMEM); + return NULL; + } + + return *ret; +} + +static ptrdiff_t +read_macros (Dwarf *dbg, Dwarf_Macro_Op_Table *table, int secindex, + Dwarf_Off macoff, int (*callback) (Dwarf_Macro *, void *), + void *arg, ptrdiff_t offset) +{ + Elf_Data *d = dbg->sectiondata[secindex]; + if (unlikely (d == NULL || d->d_buf == NULL)) { __libdw_seterrno (DWARF_E_NO_ENTRY); return -1; }
- if (offset == 0) + if (unlikely (macoff >= d->d_size)) { - /* Get the appropriate attribute. */ - Dwarf_Attribute attr; - if (INTUSE(dwarf_attr) (die, DW_AT_macro_info, &attr) == NULL) - return -1; + __libdw_seterrno (DWARF_E_INVALID_DWARF); + return -1; + }
- /* Offset into the .debug_macinfo section. */ - Dwarf_Word macoff; - if (INTUSE(dwarf_formudata) (&attr, &macoff) != 0) - return -1; + const unsigned char *const startp = d->d_buf + macoff; + const unsigned char *const endp = d->d_buf + d->d_size;
- offset = macoff; + if (table == NULL) + { + table = get_table_for_offset (dbg, macoff, startp, endp); + if (table == NULL) + return -1; } - if (unlikely (offset > (ptrdiff_t) d->d_size)) - goto invalid;
- const unsigned char *readp = d->d_buf + offset; - const unsigned char *readendp = d->d_buf + d->d_size; + if (offset == 0) + offset = table->header_len;
- if (readp == readendp) - return 0; + assert (offset >= 0); + assert (offset < endp - startp); + const unsigned char *readp = startp + offset;
- while (readp < readendp) + while (readp < endp) { unsigned int opcode = *readp++; - unsigned int u128; - unsigned int u128_2 = 0; - const char *str = NULL; - const unsigned char *endp; + if (opcode == 0) + /* Nothing more to do. */ + return 0; + + unsigned int idx = table->opcodes[opcode - 1]; + if (idx == 0xff) + { + __libdw_seterrno (DWARF_E_INVALID_OPCODE); + return -1; + } + + Dwarf_Macro_Op_Proto *proto = &table->table[idx]; + + /* A fake CU with bare minimum data to fool dwarf_formX into + doing the right thing with the attributes that we put + out. */ + Dwarf_CU fake_cu = { + .dbg = dbg, + .version = 4, + .offset_size = table->is_64bit ? 8 : 4, + };
- switch (opcode) +#define SKIP(N) \ + do \ + { \ + __typeof ((N)) n = (N); \ + if (! demand (n, readp, endp)) \ + return -1; \ + readp += n; \ + } \ + while (false) + + Dwarf_Attribute attributes[proto->nforms]; + for (Dwarf_Word i = 0; i < proto->nforms; ++i) { - case DW_MACINFO_define: - case DW_MACINFO_undef: - case DW_MACINFO_vendor_ext: - /* For the first two opcodes the parameters are - line, string - For the latter - number, string. - We can treat these cases together. */ - get_uleb128 (u128, readp); - - endp = memchr (readp, '\0', readendp - readp); - if (endp == NULL) - goto invalid; - - str = (char *) readp; - readp = endp + 1; - break; - - case DW_MACINFO_start_file: - /* The two parameters are line and file index. */ - get_uleb128 (u128, readp); - get_uleb128 (u128_2, readp); - break; - - case DW_MACINFO_end_file: - /* No parameters for this one. */ - u128 = 0; - break; - - case 0: - /* Nothing more to do. */ - return 0; - - default: - goto invalid; + /* We pretend this is a DW_AT_GNU_macros attribute so that + DW_FORM_sec_offset forms get correctly interpreted as + offset into .debug_macro. */ + attributes[i].code = DW_AT_GNU_macros; + attributes[i].form = proto->forms[i]; + attributes[i].valp = (void *) readp; + attributes[i].cu = &fake_cu; + + readp += __libdw_form_val_len (dbg, &fake_cu, + proto->forms[i], readp); }
- Dwarf_Macro mac; - mac.opcode = opcode; - mac.param1 = u128; - if (str == NULL) - mac.param2.u = u128_2; - else - mac.param2.s = str; + Dwarf_Macro macro = { + .line_offset = table->line_offset, + .version = table->version, + .opcode = opcode, + .nargs = proto->nforms, + .attributes = attributes, + }; + + Dwarf_Off nread = readp - startp; + if (nread > table->read) + table->read = nread; + + if (callback (¯o, arg) != DWARF_CB_OK) + return readp - startp; + } + + return 0; +} + +static ptrdiff_t +gnu_macros_getmacros_off (Dwarf *dbg, Dwarf_Off macoff, + int (*callback) (Dwarf_Macro *, void *), + void *arg, ptrdiff_t token) +{ + assert (token <= 0);
- if (callback (&mac, arg) != DWARF_CB_OK) - return readp - (const unsigned char *) d->d_buf; + ptrdiff_t ret = read_macros (dbg, NULL, IDX_debug_macro, + macoff, callback, arg, -token); + if (ret == -1) + return -1; + else + return -ret; +} + +static ptrdiff_t +macro_info_getmacros_off (Dwarf *dbg, Dwarf_Off macoff, + int (*callback) (Dwarf_Macro *, void *), + void *arg, ptrdiff_t token) +{ + assert (token >= 0); + + Dwarf_Macro_Op_Table *table = get_macinfo_table (); + assert (table != NULL); + + return read_macros (dbg, table, IDX_debug_macinfo, + macoff, callback, arg, token); +} + +ptrdiff_t +dwarf_getmacros_off (Dwarf *dbg, Dwarf_Off macoff, + int (*callback) (Dwarf_Macro *, void *), + void *arg, ptrdiff_t token) +{ + if (dbg == NULL) + { + __libdw_seterrno (DWARF_E_NO_DWARF); + return -1; + } + + /* We use token values > 0 for iteration through .debug_macinfo and + values < 0 for iteration through .debug_macro. Return value of + -1 also signifies an error, but that's fine, because .debug_macro + always contains at least three bytes of headers and after + iterating one opcode, we should never see anything above -4. */ + + if (token > 0) + /* A continuation call from DW_AT_macro_info iteration. */ + return macro_info_getmacros_off (dbg, macoff, callback, arg, token); + + /* Either a DW_AT_GNU_macros continuation, or a fresh start + thereof. */ + return gnu_macros_getmacros_off (dbg, macoff, callback, arg, token); +} + +ptrdiff_t +dwarf_getmacros_die (Dwarf_Die *cudie, Dwarf_Off *macoffp, + int (*callback) (Dwarf_Macro *, void *), + void *arg, ptrdiff_t token) +{ + if (cudie == NULL) + { + __libdw_seterrno (DWARF_E_NO_DWARF); + return -1; + } + + if (token > 0 && macoffp != NULL) + /* A continuation call from DW_AT_macro_info iteration, meaning + *MACOFF contains previously-cached offset. */ + return macro_info_getmacros_off (cudie->cu->dbg, *macoffp, + callback, arg, token); + + /* A fresh start of DW_AT_macro_info iteration, or a continuation + thereof without a cache. */ + if (token > 0 + || (token == 0 && dwarf_hasattr (cudie, DW_AT_macro_info))) + { + Dwarf_Word macoff; + if (macoffp == NULL) + macoffp = &macoff; + if (get_offset_from (cudie, DW_AT_macro_info, macoffp) != 0) + return -1; + return macro_info_getmacros_off (cudie->cu->dbg, *macoffp, + callback, arg, token); + } + + if (token < 0 && macoffp != NULL) + /* A continuation call from DW_AT_GNU_macros iteration. */ + return gnu_macros_getmacros_off (cudie->cu->dbg, *macoffp, + callback, arg, token); + + /* Likewise without cache, or iteration start. */ + Dwarf_Word macoff; + if (macoffp == NULL) + macoffp = &macoff; + if (get_offset_from (cudie, DW_AT_GNU_macros, macoffp) != 0) + return -1; + return gnu_macros_getmacros_off (cudie->cu->dbg, *macoffp, + callback, arg, token); +} + +ptrdiff_t +dwarf_getmacros (die, callback, arg, offset) + Dwarf_Die *die; + int (*callback) (Dwarf_Macro *, void *); + void *arg; + ptrdiff_t offset; +{ + if (die == NULL) + return -1; + + if (offset == 0) + { + /* We can't support .debug_macro transparently by + dwarf_getmacros, because extant callers would think that the + returned macro opcodes come from DW_MACINFO_* domain and be + confused. */ + if (unlikely (! dwarf_hasattr (die, DW_AT_macro_info))) + { + __libdw_seterrno (DWARF_E_NO_ENTRY); + return -1; + } + + /* DIE's with both DW_AT_GNU_macros and DW_AT_macro_info are + disallowed by the proposal that DW_AT_GNU_macros support is + based on, and this attribute would derail us above, so check + for it now. */ + if (unlikely (dwarf_hasattr (die, DW_AT_GNU_macros))) + { + __libdw_seterrno (DWARF_E_INVALID_DWARF); + return -1; + } } + else + /* If non-zero, this ought to be a continuation from previous + DW_AT_macro_info iteration, meaning offset can't be + negative. */ + assert (offset > 0);
- /* If we come here the termination of the data for the CU is not - present. */ - invalid: - __libdw_seterrno (DWARF_E_INVALID_DWARF); - return -1; + /* At this point we can safely piggy-back on existing new-style + interfaces. */ + return dwarf_getmacros_die (die, NULL, callback, arg, offset); } diff --git a/libdw/dwarf_macro_getparamcnt.c b/libdw/dwarf_macro_getparamcnt.c new file mode 100644 index 0000000..294134d --- /dev/null +++ b/libdw/dwarf_macro_getparamcnt.c @@ -0,0 +1,43 @@ +/* Return number of parameters of a macro. + Copyright (C) 2014 Red Hat, Inc. + This file is part of elfutils. + + This file is free software; you can redistribute it and/or modify + it under the terms of either + + * the GNU Lesser General Public License as published by the Free + Software Foundation; either version 3 of the License, or (at + your option) any later version + + or + + * the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at + your option) any later version + + or both in parallel, as here. + + elfutils is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received copies of the GNU General Public License and + the GNU Lesser General Public License along with this program. If + not, see http://www.gnu.org/licenses/. */ + +#ifdef HAVE_CONFIG_H +# include <config.h> +#endif + +#include "libdwP.h" + +int +dwarf_macro_getparamcnt (Dwarf_Macro *macro, size_t *paramcntp) +{ + if (macro == NULL) + return -1; + + *paramcntp = macro->nargs; + return 0; +} diff --git a/libdw/dwarf_macro_line_offset.c b/libdw/dwarf_macro_line_offset.c new file mode 100644 index 0000000..531085c --- /dev/null +++ b/libdw/dwarf_macro_line_offset.c @@ -0,0 +1,45 @@ +/* Return .debug_line offset associated with given macro. + Copyright (C) 2014 Red Hat, Inc. + This file is part of elfutils. + Written by Ulrich Drepper drepper@redhat.com, 2005. + + This file is free software; you can redistribute it and/or modify + it under the terms of either + + * the GNU Lesser General Public License as published by the Free + Software Foundation; either version 3 of the License, or (at + your option) any later version + + or + + * the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at + your option) any later version + + or both in parallel, as here. + + elfutils is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received copies of the GNU General Public License and + the GNU Lesser General Public License along with this program. If + not, see http://www.gnu.org/licenses/. */ + +#ifdef HAVE_CONFIG_H +# include <config.h> +#endif + +#include "libdwP.h" + + +int +dwarf_macro_line_offset (Dwarf_Macro *macro, Dwarf_Off *offp) +{ + if (macro == NULL) + return -1; + + *offp = macro->line_offset; + return 0; +} diff --git a/libdw/dwarf_macro_param.c b/libdw/dwarf_macro_param.c new file mode 100644 index 0000000..b66b8ac --- /dev/null +++ b/libdw/dwarf_macro_param.c @@ -0,0 +1,46 @@ +/* Return a given parameter of a macro. + Copyright (C) 2014 Red Hat, Inc. + This file is part of elfutils. + + This file is free software; you can redistribute it and/or modify + it under the terms of either + + * the GNU Lesser General Public License as published by the Free + Software Foundation; either version 3 of the License, or (at + your option) any later version + + or + + * the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at + your option) any later version + + or both in parallel, as here. + + elfutils is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received copies of the GNU General Public License and + the GNU Lesser General Public License along with this program. If + not, see http://www.gnu.org/licenses/. */ + +#ifdef HAVE_CONFIG_H +# include <config.h> +#endif + +#include "libdwP.h" + +int +dwarf_macro_param (Dwarf_Macro *macro, size_t idx, Dwarf_Attribute *ret) +{ + if (macro == NULL) + return -1; + + if (idx >= macro->nargs) + return -1; + + *ret = macro->attributes[idx]; + return 0; +} diff --git a/libdw/dwarf_macro_param1.c b/libdw/dwarf_macro_param1.c index 35d4a71..337ad6f 100644 --- a/libdw/dwarf_macro_param1.c +++ b/libdw/dwarf_macro_param1.c @@ -1,5 +1,5 @@ /* Return first macro parameter. - Copyright (C) 2005 Red Hat, Inc. + Copyright (C) 2005, 2014 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper drepper@redhat.com, 2005.
@@ -40,7 +40,9 @@ dwarf_macro_param1 (Dwarf_Macro *macro, Dwarf_Word *paramp) if (macro == NULL) return -1;
- *paramp = macro->param1; + Dwarf_Attribute param; + if (dwarf_macro_param (macro, 1, ¶m) != 0) + return -1;
- return 0; + return dwarf_formudata (¶m, paramp); } diff --git a/libdw/dwarf_macro_param2.c b/libdw/dwarf_macro_param2.c index b49e60e..cc902c9 100644 --- a/libdw/dwarf_macro_param2.c +++ b/libdw/dwarf_macro_param2.c @@ -1,5 +1,5 @@ /* Return second macro parameter. - Copyright (C) 2005 Red Hat, Inc. + Copyright (C) 2005, 2014 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper drepper@redhat.com, 2005.
@@ -40,10 +40,16 @@ dwarf_macro_param2 (Dwarf_Macro *macro, Dwarf_Word *paramp, const char **strp) if (macro == NULL) return -1;
- if (paramp != NULL) - *paramp = macro->param2.u; - if (strp != NULL) - *strp = macro->param2.s; + Dwarf_Attribute param; + if (dwarf_macro_param (macro, 1, ¶m) != 0) + return -1;
- return 0; + if (param.form == DW_FORM_string + || param.form == DW_FORM_strp) + { + *strp = dwarf_formstring (¶m); + return 0; + } + else + return dwarf_formudata (¶m, paramp); } diff --git a/libdw/dwarf_macro_version.c b/libdw/dwarf_macro_version.c new file mode 100644 index 0000000..0b4b189 --- /dev/null +++ b/libdw/dwarf_macro_version.c @@ -0,0 +1,44 @@ +/* Return a version of a macro. + Copyright (C) 2014 Red Hat, Inc. + This file is part of elfutils. + + This file is free software; you can redistribute it and/or modify + it under the terms of either + + * the GNU Lesser General Public License as published by the Free + Software Foundation; either version 3 of the License, or (at + your option) any later version + + or + + * the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at + your option) any later version + + or both in parallel, as here. + + elfutils is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received copies of the GNU General Public License and + the GNU Lesser General Public License along with this program. If + not, see http://www.gnu.org/licenses/. */ + +#ifdef HAVE_CONFIG_H +# include <config.h> +#endif + +#include "libdwP.h" + +int +dwarf_macro_version (Dwarf_Macro *macro, unsigned int *versionp) +{ + if (macro == NULL) + return -1; + + *versionp = macro->version; + + return 0; +} diff --git a/libdw/libdw.h b/libdw/libdw.h index 196d54a..bd5a0c6 100644 --- a/libdw/libdw.h +++ b/libdw/libdw.h @@ -827,25 +827,98 @@ extern int dwarf_entry_breakpoints (Dwarf_Die *die, Dwarf_Addr **bkpts);
/* Call callback function for each of the macro information entry for - the CU. */ + the CU. Similar in operation to dwarf_getmacros_die, but only + works for .debug_macinfo style macro entries (those where + dwarf_macro_version returns 0.) */ extern ptrdiff_t dwarf_getmacros (Dwarf_Die *cudie, int (*callback) (Dwarf_Macro *, void *), - void *arg, ptrdiff_t offset) - __nonnull_attribute__ (2); + void *arg, ptrdiff_t token) + __nonnull_attribute__ (2); + +/* Iterate through the macro section referenced by CUDIE and call + CALLBACK for each macro information entry. Keeps iterating while + CALLBACK returns DWARF_CB_OK. If the callback returns + DWARF_CB_ABORT, it stops iterating and returns a continuation + token, which can be used to restart the iteration at the point + where it ended. Returns -1 for errors or 0 if there are no more + macro entries. + + If MACOFFP is non-NULL, offset to macro section referenced by CUDIE + is stored to *MACOFFP. That can later be passed together with a + continuation token to dwarf_getmacros_off. + + If this is called with non-0 TOKEN (i.e. it is a continuation + call), MACOFFP shall be either NULL, or point to a location that + contains the same section offset as was at *MACOFFP of the call + that the passed-in continuation token came from. */ +extern ptrdiff_t dwarf_getmacros_die (Dwarf_Die *cudie, Dwarf_Off *macoffp, + int (*callback) (Dwarf_Macro *, void *), + void *arg, ptrdiff_t token) + __nonnull_attribute__ (3); + +/* This is similar in operation to dwarf_getmacros_die, but selects + the section to iterate through by offset instead of by CU. This + can be used for handling DW_MACRO_GNU_transparent_include's or + similar opcodes, or for continuation calls seeded with MACOFF and + TOKEN that came back from dwarf_getmacros_die (or a previous call + to dwarf_getmacros_off). Note that with TOKEN of 0, this will + always iterate through DW_AT_GNU_macros style section. */ +extern ptrdiff_t dwarf_getmacros_off (Dwarf *dbg, Dwarf_Off macoff, + int (*callback) (Dwarf_Macro *, void *), + void *arg, ptrdiff_t token) + __nonnull_attribute__ (3); + +/* Return Dwarf version of this macro opcode. The versions are 0 for + macro elements coming from DW_AT_macro_info, and 4 for macro + elements coming from DW_AT_GNU_macros. It is expected that 5 and + further will be for macro elements coming from standardized + DW_AT_macros. */ +extern int dwarf_macro_version (Dwarf_Macro *macro, unsigned int *versionp) + __nonnull_attribute__ (2); + +/* Set *OFFP to .debug_line offset associated with the Dwarf macro + section that this MACRO comes from. Returns -1 for errors or 0 for + success.
-/* Return macro opcode. */ + The offset is considered to be 0xffffffffffffffff (or (Dwarf_Off) + -1) if .debug_line offset was not set in the section header, which + will always be the case for .debug_macinfo macro sections, and may + be the case for .debug_macro sections as well. This condition is + not considered an error. */ +extern int dwarf_macro_line_offset (Dwarf_Macro *macro, Dwarf_Off *offp) + __nonnull_attribute__ (2); + +/* Return macro opcode. That's a constant that can be either from + DW_MACINFO_* domain if version of MACRO is 0, or from + DW_MACRO_GNU_* domain if the version is 4. */ extern int dwarf_macro_opcode (Dwarf_Macro *macro, unsigned int *opcodep) __nonnull_attribute__ (2);
-/* Return first macro parameter. */ +/* Get number of parameters of MACRO and store it to *PARAMCNTP. */ +extern int dwarf_macro_getparamcnt (Dwarf_Macro *macro, size_t *paramcntp); + +/* Get IDX-th parameter of MACRO, and stores it to *ATTRIBUTE. + Returns 0 on success or -1 for errors. + + After a successful call, you can query ATTRIBUTE by dwarf_whatform + to determine which of the dwarf_formX calls to make to get actual + value out of ATTRIBUTE. Note that calling dwarf_whatattr is not + meaningful for pseudo-attributes formed this way. */ +extern int dwarf_macro_param (Dwarf_Macro *macro, size_t idx, + Dwarf_Attribute *attribute); + +/* Return first macro parameter. This will return -1 if the parameter + is not an integral value. Use dwarf_macro_param for more general + access. */ extern int dwarf_macro_param1 (Dwarf_Macro *macro, Dwarf_Word *paramp) __nonnull_attribute__ (2);
-/* Return second macro parameter. */ +/* Return second macro parameter. This will return -1 if the + parameter is not an integral or string value. Use + dwarf_macro_param for more general access. */ extern int dwarf_macro_param2 (Dwarf_Macro *macro, Dwarf_Word *paramp, const char **strp);
- /* Compute what's known about a call frame when the PC is at ADDRESS. Returns 0 for success or -1 for errors. On success, *FRAME is a malloc'd pointer. */ diff --git a/libdw/libdw.map b/libdw/libdw.map index 55bc537..5a88bdc 100644 --- a/libdw/libdw.map +++ b/libdw/libdw.map @@ -306,4 +306,13 @@ ELFUTILS_0.160 { global: dwarf_cu_getdwarf; dwarf_cu_die; -} ELFUTILS_0.159; \ No newline at end of file +} ELFUTILS_0.159; + +ELFUTILS_0.161 { + global: + dwarf_getmacros_die; + dwarf_getmacros_off; + dwarf_macro_version; + dwarf_macro_getparamcnt; + dwarf_macro_param; +} ELFUTILS_0.160; diff --git a/libdw/libdwP.h b/libdw/libdwP.h index ce8a83d..47c2cc1 100644 --- a/libdw/libdwP.h +++ b/libdw/libdwP.h @@ -118,7 +118,8 @@ enum DWARF_E_INVALID_OFFSET, DWARF_E_NO_DEBUG_RANGES, DWARF_E_INVALID_CFI, - DWARF_E_NO_ALT_DEBUGLINK + DWARF_E_NO_ALT_DEBUGLINK, + DWARF_E_INVALID_OPCODE, };
@@ -167,6 +168,9 @@ struct Dwarf Dwarf_Off next_tu_offset; Dwarf_Sig8_Hash sig8_hash;
+ /* Search tree for .debug_macro operator tables. */ + void *macro_ops; + /* Address ranges. */ Dwarf_Aranges *aranges;
@@ -326,16 +330,48 @@ struct Dwarf_CU }) \
-/* Macro information. */ +/* Prototype of a single .debug_macro operator. */ +typedef struct +{ + Dwarf_Word nforms; + unsigned char const *forms; +} Dwarf_Macro_Op_Proto; + +/* Prototype table. */ +typedef struct +{ + /* Offset of .debug_macro section. */ + Dwarf_Off offset; + + /* Offset of associated .debug_line section. */ + Dwarf_Off line_offset; + + /* How far have we read in this section. This starts as 0 and is + increased as the section is worked through. */ + Dwarf_Off read; + + /* Header length. */ + Dwarf_Half header_len; + + uint16_t version; + bool is_64bit; + + /* Shows where in TABLE each opcode is defined. Since opcode 0 is + never used, it stores index of opcode X in X-1'th element. The + value of 0xff means not stored at all. */ + unsigned char opcodes[255]; + + /* Individual opcode prototypes. */ + Dwarf_Macro_Op_Proto table[]; +} Dwarf_Macro_Op_Table; + struct Dwarf_Macro_s { - unsigned int opcode; - Dwarf_Word param1; - union - { - Dwarf_Word u; - const char *s; - } param2; + Dwarf_Off line_offset; + Dwarf_Word nargs; + uint16_t version; + uint8_t opcode; + Dwarf_Attribute *attributes; };
Signed-off-by: Petr Machata pmachata@redhat.com --- tests/ChangeLog | 7 + tests/dwarf-getmacros.c | 88 +++- tests/run-dwarf-getmacros.sh | 1300 +++++++++++++++++++++++++++++++++++++++++- 3 files changed, 1380 insertions(+), 15 deletions(-)
diff --git a/tests/ChangeLog b/tests/ChangeLog index dce6ebe..e674f46 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,10 @@ +2014-09-10 Petr Machata pmachata@redhat.com + + * dwarf-getmacros.c: Update to use the new macro iteration + interfaces. + * run-dwarf-getmacros.sh: Adjust, add a test that uses + testfile-macros. + 2014-06-15 Mark Wielaard mjw@redhat.com
* backtrace.c (frame_callback): Error on seeing more than 16 frames. diff --git a/tests/dwarf-getmacros.c b/tests/dwarf-getmacros.c index 7972edc..e932268 100644 --- a/tests/dwarf-getmacros.c +++ b/tests/dwarf-getmacros.c @@ -1,5 +1,5 @@ -/* Test program for dwfl_module_return_value_location. - Copyright (C) 2009 Red Hat, Inc. +/* Test program for dwarf_getmacros and related + Copyright (C) 2009, 2014 Red Hat, Inc. This file is part of elfutils.
This file is free software; you can redistribute it and/or modify @@ -24,6 +24,59 @@ #include <stdio.h> #include <stdint.h> #include <stdlib.h> +#include <assert.h> +#include <inttypes.h> + +static void include (Dwarf *dbg, Dwarf_Off macoff, ptrdiff_t token); + +static int +mac (Dwarf_Macro *macro, void *dbg) +{ + static int level = 0; + unsigned int version = -1U; + dwarf_macro_version (macro, &version); + assert (version != -1U); + + unsigned int opcode; + dwarf_macro_opcode (macro, &opcode); + + if (version == 4 && opcode == DW_MACRO_GNU_transparent_include) + { + Dwarf_Attribute at; + int r = dwarf_macro_param (macro, 0, &at); + assert (r == 0); + + Dwarf_Word w; + r = dwarf_formudata (&at, &w); + assert (r == 0); + + printf ("%*sinclude %#" PRIx64 "\n", level, "", w); + ++level; + include (dbg, w, 0); + --level; + printf ("%*s/include\n", level, ""); + } + else if ((version == 4 && opcode == DW_MACRO_GNU_define_indirect) + || (version == 0 && opcode == DW_MACINFO_define)) + { + const char *value; + dwarf_macro_param2 (macro, NULL, &value); + printf ("%*s%s\n", level, "", value); + } + + return DWARF_CB_ABORT; +} + +static void +include (Dwarf *dbg, Dwarf_Off macoff, ptrdiff_t token) +{ + while ((token = dwarf_getmacros_off (dbg, macoff, mac, dbg, token)) != 0) + if (token == -1) + { + puts (dwarf_errmsg (dwarf_errno ())); + break; + } +}
int main (int argc __attribute__ ((unused)), char *argv[]) @@ -35,22 +88,29 @@ main (int argc __attribute__ ((unused)), char *argv[]) Dwarf *dbg = dwarf_begin (fd, DWARF_C_READ);
Dwarf_Die cudie_mem, *cudie = dwarf_offdie (dbg, cuoff, &cudie_mem); - int mac (Dwarf_Macro *macro, void *data __attribute__ ((unused))) + { - unsigned int opcode; - dwarf_macro_opcode (macro, &opcode); - if (opcode == DW_MACINFO_define) + puts ("--dwarf_getmacros--"); + ptrdiff_t off = 0; + while ((off = dwarf_getmacros (cudie, mac, dbg, off)) > 0) + ; + } + + puts ("--dwarf_getmacros_die w/o cache--"); + for (ptrdiff_t off = 0; + (off = dwarf_getmacros_die (cudie, NULL, mac, dbg, off)); ) + if (off == -1) { - const char *value; - dwarf_macro_param2 (macro, NULL, &value); - puts (value); + puts (dwarf_errmsg (dwarf_errno ())); + break; } - return DWARF_CB_ABORT; - }
- ptrdiff_t off = 0; - while ((off = dwarf_getmacros (cudie, mac, NULL, off)) > 0) - ; + puts ("--dwarf_getmacros_die w/ cache--"); + { + Dwarf_Off macoff; + ptrdiff_t off = dwarf_getmacros_die (cudie, &macoff, mac, dbg, 0); + include (dbg, macoff, off); + }
return 0; } diff --git a/tests/run-dwarf-getmacros.sh b/tests/run-dwarf-getmacros.sh index ddb58e8..a653550 100755 --- a/tests/run-dwarf-getmacros.sh +++ b/tests/run-dwarf-getmacros.sh @@ -1,5 +1,5 @@ #! /bin/sh -# Copyright (C) 2009 Red Hat, Inc. +# Copyright (C) 2009, 2014 Red Hat, Inc. # This file is part of elfutils. # # This file is free software; you can redistribute it and/or modify @@ -20,6 +20,269 @@ testfiles testfile51
testrun_compare ${abs_builddir}/dwarf-getmacros testfile51 0xb <<\EOF +--dwarf_getmacros-- +__STDC__ 1 +__STDC_HOSTED__ 1 +__GNUC__ 4 +__GNUC_MINOR__ 3 +__GNUC_PATCHLEVEL__ 2 +__GNUC_RH_RELEASE__ 7 +__SIZE_TYPE__ long unsigned int +__PTRDIFF_TYPE__ long int +__WCHAR_TYPE__ int +__WINT_TYPE__ unsigned int +__INTMAX_TYPE__ long int +__UINTMAX_TYPE__ long unsigned int +__GXX_ABI_VERSION 1002 +__SCHAR_MAX__ 127 +__SHRT_MAX__ 32767 +__INT_MAX__ 2147483647 +__LONG_MAX__ 9223372036854775807L +__LONG_LONG_MAX__ 9223372036854775807LL +__WCHAR_MAX__ 2147483647 +__CHAR_BIT__ 8 +__INTMAX_MAX__ 9223372036854775807L +__FLT_EVAL_METHOD__ 0 +__DEC_EVAL_METHOD__ 2 +__FLT_RADIX__ 2 +__FLT_MANT_DIG__ 24 +__FLT_DIG__ 6 +__FLT_MIN_EXP__ (-125) +__FLT_MIN_10_EXP__ (-37) +__FLT_MAX_EXP__ 128 +__FLT_MAX_10_EXP__ 38 +__FLT_MAX__ 3.40282347e+38F +__FLT_MIN__ 1.17549435e-38F +__FLT_EPSILON__ 1.19209290e-7F +__FLT_DENORM_MIN__ 1.40129846e-45F +__FLT_HAS_DENORM__ 1 +__FLT_HAS_INFINITY__ 1 +__FLT_HAS_QUIET_NAN__ 1 +__DBL_MANT_DIG__ 53 +__DBL_DIG__ 15 +__DBL_MIN_EXP__ (-1021) +__DBL_MIN_10_EXP__ (-307) +__DBL_MAX_EXP__ 1024 +__DBL_MAX_10_EXP__ 308 +__DBL_MAX__ 1.7976931348623157e+308 +__DBL_MIN__ 2.2250738585072014e-308 +__DBL_EPSILON__ 2.2204460492503131e-16 +__DBL_DENORM_MIN__ 4.9406564584124654e-324 +__DBL_HAS_DENORM__ 1 +__DBL_HAS_INFINITY__ 1 +__DBL_HAS_QUIET_NAN__ 1 +__LDBL_MANT_DIG__ 64 +__LDBL_DIG__ 18 +__LDBL_MIN_EXP__ (-16381) +__LDBL_MIN_10_EXP__ (-4931) +__LDBL_MAX_EXP__ 16384 +__LDBL_MAX_10_EXP__ 4932 +__DECIMAL_DIG__ 21 +__LDBL_MAX__ 1.18973149535723176502e+4932L +__LDBL_MIN__ 3.36210314311209350626e-4932L +__LDBL_EPSILON__ 1.08420217248550443401e-19L +__LDBL_DENORM_MIN__ 3.64519953188247460253e-4951L +__LDBL_HAS_DENORM__ 1 +__LDBL_HAS_INFINITY__ 1 +__LDBL_HAS_QUIET_NAN__ 1 +__DEC32_MANT_DIG__ 7 +__DEC32_MIN_EXP__ (-95) +__DEC32_MAX_EXP__ 96 +__DEC32_MIN__ 1E-95DF +__DEC32_MAX__ 9.999999E96DF +__DEC32_EPSILON__ 1E-6DF +__DEC32_DEN__ 0.000001E-95DF +__DEC64_MANT_DIG__ 16 +__DEC64_MIN_EXP__ (-383) +__DEC64_MAX_EXP__ 384 +__DEC64_MIN__ 1E-383DD +__DEC64_MAX__ 9.999999999999999E384DD +__DEC64_EPSILON__ 1E-15DD +__DEC64_DEN__ 0.000000000000001E-383DD +__DEC128_MANT_DIG__ 34 +__DEC128_MIN_EXP__ (-6143) +__DEC128_MAX_EXP__ 6144 +__DEC128_MIN__ 1E-6143DL +__DEC128_MAX__ 9.999999999999999999999999999999999E6144DL +__DEC128_EPSILON__ 1E-33DL +__DEC128_DEN__ 0.000000000000000000000000000000001E-6143DL +__REGISTER_PREFIX__ +__USER_LABEL_PREFIX__ +__VERSION__ "4.3.2 20081105 (Red Hat 4.3.2-7)" +__GNUC_GNU_INLINE__ 1 +_LP64 1 +__LP64__ 1 +__NO_INLINE__ 1 +__FINITE_MATH_ONLY__ 0 +__GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1 +__GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1 +__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1 +__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1 +__SIZEOF_INT__ 4 +__SIZEOF_LONG__ 8 +__SIZEOF_LONG_LONG__ 8 +__SIZEOF_SHORT__ 2 +__SIZEOF_FLOAT__ 4 +__SIZEOF_DOUBLE__ 8 +__SIZEOF_LONG_DOUBLE__ 16 +__SIZEOF_SIZE_T__ 8 +__SIZEOF_WCHAR_T__ 4 +__SIZEOF_WINT_T__ 4 +__SIZEOF_PTRDIFF_T__ 8 +__SIZEOF_POINTER__ 8 +__amd64 1 +__amd64__ 1 +__x86_64 1 +__x86_64__ 1 +__k8 1 +__k8__ 1 +__MMX__ 1 +__SSE__ 1 +__SSE2__ 1 +__SSE_MATH__ 1 +__SSE2_MATH__ 1 +__gnu_linux__ 1 +__linux 1 +__linux__ 1 +linux 1 +__unix 1 +__unix__ 1 +unix 1 +__ELF__ 1 +__DECIMAL_BID_FORMAT__ 1 +macro1 ble +--dwarf_getmacros_die w/o cache-- +__STDC__ 1 +__STDC_HOSTED__ 1 +__GNUC__ 4 +__GNUC_MINOR__ 3 +__GNUC_PATCHLEVEL__ 2 +__GNUC_RH_RELEASE__ 7 +__SIZE_TYPE__ long unsigned int +__PTRDIFF_TYPE__ long int +__WCHAR_TYPE__ int +__WINT_TYPE__ unsigned int +__INTMAX_TYPE__ long int +__UINTMAX_TYPE__ long unsigned int +__GXX_ABI_VERSION 1002 +__SCHAR_MAX__ 127 +__SHRT_MAX__ 32767 +__INT_MAX__ 2147483647 +__LONG_MAX__ 9223372036854775807L +__LONG_LONG_MAX__ 9223372036854775807LL +__WCHAR_MAX__ 2147483647 +__CHAR_BIT__ 8 +__INTMAX_MAX__ 9223372036854775807L +__FLT_EVAL_METHOD__ 0 +__DEC_EVAL_METHOD__ 2 +__FLT_RADIX__ 2 +__FLT_MANT_DIG__ 24 +__FLT_DIG__ 6 +__FLT_MIN_EXP__ (-125) +__FLT_MIN_10_EXP__ (-37) +__FLT_MAX_EXP__ 128 +__FLT_MAX_10_EXP__ 38 +__FLT_MAX__ 3.40282347e+38F +__FLT_MIN__ 1.17549435e-38F +__FLT_EPSILON__ 1.19209290e-7F +__FLT_DENORM_MIN__ 1.40129846e-45F +__FLT_HAS_DENORM__ 1 +__FLT_HAS_INFINITY__ 1 +__FLT_HAS_QUIET_NAN__ 1 +__DBL_MANT_DIG__ 53 +__DBL_DIG__ 15 +__DBL_MIN_EXP__ (-1021) +__DBL_MIN_10_EXP__ (-307) +__DBL_MAX_EXP__ 1024 +__DBL_MAX_10_EXP__ 308 +__DBL_MAX__ 1.7976931348623157e+308 +__DBL_MIN__ 2.2250738585072014e-308 +__DBL_EPSILON__ 2.2204460492503131e-16 +__DBL_DENORM_MIN__ 4.9406564584124654e-324 +__DBL_HAS_DENORM__ 1 +__DBL_HAS_INFINITY__ 1 +__DBL_HAS_QUIET_NAN__ 1 +__LDBL_MANT_DIG__ 64 +__LDBL_DIG__ 18 +__LDBL_MIN_EXP__ (-16381) +__LDBL_MIN_10_EXP__ (-4931) +__LDBL_MAX_EXP__ 16384 +__LDBL_MAX_10_EXP__ 4932 +__DECIMAL_DIG__ 21 +__LDBL_MAX__ 1.18973149535723176502e+4932L +__LDBL_MIN__ 3.36210314311209350626e-4932L +__LDBL_EPSILON__ 1.08420217248550443401e-19L +__LDBL_DENORM_MIN__ 3.64519953188247460253e-4951L +__LDBL_HAS_DENORM__ 1 +__LDBL_HAS_INFINITY__ 1 +__LDBL_HAS_QUIET_NAN__ 1 +__DEC32_MANT_DIG__ 7 +__DEC32_MIN_EXP__ (-95) +__DEC32_MAX_EXP__ 96 +__DEC32_MIN__ 1E-95DF +__DEC32_MAX__ 9.999999E96DF +__DEC32_EPSILON__ 1E-6DF +__DEC32_DEN__ 0.000001E-95DF +__DEC64_MANT_DIG__ 16 +__DEC64_MIN_EXP__ (-383) +__DEC64_MAX_EXP__ 384 +__DEC64_MIN__ 1E-383DD +__DEC64_MAX__ 9.999999999999999E384DD +__DEC64_EPSILON__ 1E-15DD +__DEC64_DEN__ 0.000000000000001E-383DD +__DEC128_MANT_DIG__ 34 +__DEC128_MIN_EXP__ (-6143) +__DEC128_MAX_EXP__ 6144 +__DEC128_MIN__ 1E-6143DL +__DEC128_MAX__ 9.999999999999999999999999999999999E6144DL +__DEC128_EPSILON__ 1E-33DL +__DEC128_DEN__ 0.000000000000000000000000000000001E-6143DL +__REGISTER_PREFIX__ +__USER_LABEL_PREFIX__ +__VERSION__ "4.3.2 20081105 (Red Hat 4.3.2-7)" +__GNUC_GNU_INLINE__ 1 +_LP64 1 +__LP64__ 1 +__NO_INLINE__ 1 +__FINITE_MATH_ONLY__ 0 +__GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1 +__GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1 +__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1 +__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1 +__SIZEOF_INT__ 4 +__SIZEOF_LONG__ 8 +__SIZEOF_LONG_LONG__ 8 +__SIZEOF_SHORT__ 2 +__SIZEOF_FLOAT__ 4 +__SIZEOF_DOUBLE__ 8 +__SIZEOF_LONG_DOUBLE__ 16 +__SIZEOF_SIZE_T__ 8 +__SIZEOF_WCHAR_T__ 4 +__SIZEOF_WINT_T__ 4 +__SIZEOF_PTRDIFF_T__ 8 +__SIZEOF_POINTER__ 8 +__amd64 1 +__amd64__ 1 +__x86_64 1 +__x86_64__ 1 +__k8 1 +__k8__ 1 +__MMX__ 1 +__SSE__ 1 +__SSE2__ 1 +__SSE_MATH__ 1 +__SSE2_MATH__ 1 +__gnu_linux__ 1 +__linux 1 +__linux__ 1 +linux 1 +__unix 1 +__unix__ 1 +unix 1 +__ELF__ 1 +__DECIMAL_BID_FORMAT__ 1 +macro1 ble +--dwarf_getmacros_die w/ cache-- __STDC__ 1 __STDC_HOSTED__ 1 __GNUC__ 4 @@ -153,6 +416,269 @@ macro1 ble EOF
testrun_compare ${abs_builddir}/dwarf-getmacros testfile51 0x84 <<\EOF +--dwarf_getmacros-- +__STDC__ 1 +__STDC_HOSTED__ 1 +__GNUC__ 4 +__GNUC_MINOR__ 3 +__GNUC_PATCHLEVEL__ 2 +__GNUC_RH_RELEASE__ 7 +__SIZE_TYPE__ long unsigned int +__PTRDIFF_TYPE__ long int +__WCHAR_TYPE__ int +__WINT_TYPE__ unsigned int +__INTMAX_TYPE__ long int +__UINTMAX_TYPE__ long unsigned int +__GXX_ABI_VERSION 1002 +__SCHAR_MAX__ 127 +__SHRT_MAX__ 32767 +__INT_MAX__ 2147483647 +__LONG_MAX__ 9223372036854775807L +__LONG_LONG_MAX__ 9223372036854775807LL +__WCHAR_MAX__ 2147483647 +__CHAR_BIT__ 8 +__INTMAX_MAX__ 9223372036854775807L +__FLT_EVAL_METHOD__ 0 +__DEC_EVAL_METHOD__ 2 +__FLT_RADIX__ 2 +__FLT_MANT_DIG__ 24 +__FLT_DIG__ 6 +__FLT_MIN_EXP__ (-125) +__FLT_MIN_10_EXP__ (-37) +__FLT_MAX_EXP__ 128 +__FLT_MAX_10_EXP__ 38 +__FLT_MAX__ 3.40282347e+38F +__FLT_MIN__ 1.17549435e-38F +__FLT_EPSILON__ 1.19209290e-7F +__FLT_DENORM_MIN__ 1.40129846e-45F +__FLT_HAS_DENORM__ 1 +__FLT_HAS_INFINITY__ 1 +__FLT_HAS_QUIET_NAN__ 1 +__DBL_MANT_DIG__ 53 +__DBL_DIG__ 15 +__DBL_MIN_EXP__ (-1021) +__DBL_MIN_10_EXP__ (-307) +__DBL_MAX_EXP__ 1024 +__DBL_MAX_10_EXP__ 308 +__DBL_MAX__ 1.7976931348623157e+308 +__DBL_MIN__ 2.2250738585072014e-308 +__DBL_EPSILON__ 2.2204460492503131e-16 +__DBL_DENORM_MIN__ 4.9406564584124654e-324 +__DBL_HAS_DENORM__ 1 +__DBL_HAS_INFINITY__ 1 +__DBL_HAS_QUIET_NAN__ 1 +__LDBL_MANT_DIG__ 64 +__LDBL_DIG__ 18 +__LDBL_MIN_EXP__ (-16381) +__LDBL_MIN_10_EXP__ (-4931) +__LDBL_MAX_EXP__ 16384 +__LDBL_MAX_10_EXP__ 4932 +__DECIMAL_DIG__ 21 +__LDBL_MAX__ 1.18973149535723176502e+4932L +__LDBL_MIN__ 3.36210314311209350626e-4932L +__LDBL_EPSILON__ 1.08420217248550443401e-19L +__LDBL_DENORM_MIN__ 3.64519953188247460253e-4951L +__LDBL_HAS_DENORM__ 1 +__LDBL_HAS_INFINITY__ 1 +__LDBL_HAS_QUIET_NAN__ 1 +__DEC32_MANT_DIG__ 7 +__DEC32_MIN_EXP__ (-95) +__DEC32_MAX_EXP__ 96 +__DEC32_MIN__ 1E-95DF +__DEC32_MAX__ 9.999999E96DF +__DEC32_EPSILON__ 1E-6DF +__DEC32_DEN__ 0.000001E-95DF +__DEC64_MANT_DIG__ 16 +__DEC64_MIN_EXP__ (-383) +__DEC64_MAX_EXP__ 384 +__DEC64_MIN__ 1E-383DD +__DEC64_MAX__ 9.999999999999999E384DD +__DEC64_EPSILON__ 1E-15DD +__DEC64_DEN__ 0.000000000000001E-383DD +__DEC128_MANT_DIG__ 34 +__DEC128_MIN_EXP__ (-6143) +__DEC128_MAX_EXP__ 6144 +__DEC128_MIN__ 1E-6143DL +__DEC128_MAX__ 9.999999999999999999999999999999999E6144DL +__DEC128_EPSILON__ 1E-33DL +__DEC128_DEN__ 0.000000000000000000000000000000001E-6143DL +__REGISTER_PREFIX__ +__USER_LABEL_PREFIX__ +__VERSION__ "4.3.2 20081105 (Red Hat 4.3.2-7)" +__GNUC_GNU_INLINE__ 1 +_LP64 1 +__LP64__ 1 +__NO_INLINE__ 1 +__FINITE_MATH_ONLY__ 0 +__GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1 +__GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1 +__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1 +__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1 +__SIZEOF_INT__ 4 +__SIZEOF_LONG__ 8 +__SIZEOF_LONG_LONG__ 8 +__SIZEOF_SHORT__ 2 +__SIZEOF_FLOAT__ 4 +__SIZEOF_DOUBLE__ 8 +__SIZEOF_LONG_DOUBLE__ 16 +__SIZEOF_SIZE_T__ 8 +__SIZEOF_WCHAR_T__ 4 +__SIZEOF_WINT_T__ 4 +__SIZEOF_PTRDIFF_T__ 8 +__SIZEOF_POINTER__ 8 +__amd64 1 +__amd64__ 1 +__x86_64 1 +__x86_64__ 1 +__k8 1 +__k8__ 1 +__MMX__ 1 +__SSE__ 1 +__SSE2__ 1 +__SSE_MATH__ 1 +__SSE2_MATH__ 1 +__gnu_linux__ 1 +__linux 1 +__linux__ 1 +linux 1 +__unix 1 +__unix__ 1 +unix 1 +__ELF__ 1 +__DECIMAL_BID_FORMAT__ 1 +macro2 ble +--dwarf_getmacros_die w/o cache-- +__STDC__ 1 +__STDC_HOSTED__ 1 +__GNUC__ 4 +__GNUC_MINOR__ 3 +__GNUC_PATCHLEVEL__ 2 +__GNUC_RH_RELEASE__ 7 +__SIZE_TYPE__ long unsigned int +__PTRDIFF_TYPE__ long int +__WCHAR_TYPE__ int +__WINT_TYPE__ unsigned int +__INTMAX_TYPE__ long int +__UINTMAX_TYPE__ long unsigned int +__GXX_ABI_VERSION 1002 +__SCHAR_MAX__ 127 +__SHRT_MAX__ 32767 +__INT_MAX__ 2147483647 +__LONG_MAX__ 9223372036854775807L +__LONG_LONG_MAX__ 9223372036854775807LL +__WCHAR_MAX__ 2147483647 +__CHAR_BIT__ 8 +__INTMAX_MAX__ 9223372036854775807L +__FLT_EVAL_METHOD__ 0 +__DEC_EVAL_METHOD__ 2 +__FLT_RADIX__ 2 +__FLT_MANT_DIG__ 24 +__FLT_DIG__ 6 +__FLT_MIN_EXP__ (-125) +__FLT_MIN_10_EXP__ (-37) +__FLT_MAX_EXP__ 128 +__FLT_MAX_10_EXP__ 38 +__FLT_MAX__ 3.40282347e+38F +__FLT_MIN__ 1.17549435e-38F +__FLT_EPSILON__ 1.19209290e-7F +__FLT_DENORM_MIN__ 1.40129846e-45F +__FLT_HAS_DENORM__ 1 +__FLT_HAS_INFINITY__ 1 +__FLT_HAS_QUIET_NAN__ 1 +__DBL_MANT_DIG__ 53 +__DBL_DIG__ 15 +__DBL_MIN_EXP__ (-1021) +__DBL_MIN_10_EXP__ (-307) +__DBL_MAX_EXP__ 1024 +__DBL_MAX_10_EXP__ 308 +__DBL_MAX__ 1.7976931348623157e+308 +__DBL_MIN__ 2.2250738585072014e-308 +__DBL_EPSILON__ 2.2204460492503131e-16 +__DBL_DENORM_MIN__ 4.9406564584124654e-324 +__DBL_HAS_DENORM__ 1 +__DBL_HAS_INFINITY__ 1 +__DBL_HAS_QUIET_NAN__ 1 +__LDBL_MANT_DIG__ 64 +__LDBL_DIG__ 18 +__LDBL_MIN_EXP__ (-16381) +__LDBL_MIN_10_EXP__ (-4931) +__LDBL_MAX_EXP__ 16384 +__LDBL_MAX_10_EXP__ 4932 +__DECIMAL_DIG__ 21 +__LDBL_MAX__ 1.18973149535723176502e+4932L +__LDBL_MIN__ 3.36210314311209350626e-4932L +__LDBL_EPSILON__ 1.08420217248550443401e-19L +__LDBL_DENORM_MIN__ 3.64519953188247460253e-4951L +__LDBL_HAS_DENORM__ 1 +__LDBL_HAS_INFINITY__ 1 +__LDBL_HAS_QUIET_NAN__ 1 +__DEC32_MANT_DIG__ 7 +__DEC32_MIN_EXP__ (-95) +__DEC32_MAX_EXP__ 96 +__DEC32_MIN__ 1E-95DF +__DEC32_MAX__ 9.999999E96DF +__DEC32_EPSILON__ 1E-6DF +__DEC32_DEN__ 0.000001E-95DF +__DEC64_MANT_DIG__ 16 +__DEC64_MIN_EXP__ (-383) +__DEC64_MAX_EXP__ 384 +__DEC64_MIN__ 1E-383DD +__DEC64_MAX__ 9.999999999999999E384DD +__DEC64_EPSILON__ 1E-15DD +__DEC64_DEN__ 0.000000000000001E-383DD +__DEC128_MANT_DIG__ 34 +__DEC128_MIN_EXP__ (-6143) +__DEC128_MAX_EXP__ 6144 +__DEC128_MIN__ 1E-6143DL +__DEC128_MAX__ 9.999999999999999999999999999999999E6144DL +__DEC128_EPSILON__ 1E-33DL +__DEC128_DEN__ 0.000000000000000000000000000000001E-6143DL +__REGISTER_PREFIX__ +__USER_LABEL_PREFIX__ +__VERSION__ "4.3.2 20081105 (Red Hat 4.3.2-7)" +__GNUC_GNU_INLINE__ 1 +_LP64 1 +__LP64__ 1 +__NO_INLINE__ 1 +__FINITE_MATH_ONLY__ 0 +__GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1 +__GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1 +__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1 +__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1 +__SIZEOF_INT__ 4 +__SIZEOF_LONG__ 8 +__SIZEOF_LONG_LONG__ 8 +__SIZEOF_SHORT__ 2 +__SIZEOF_FLOAT__ 4 +__SIZEOF_DOUBLE__ 8 +__SIZEOF_LONG_DOUBLE__ 16 +__SIZEOF_SIZE_T__ 8 +__SIZEOF_WCHAR_T__ 4 +__SIZEOF_WINT_T__ 4 +__SIZEOF_PTRDIFF_T__ 8 +__SIZEOF_POINTER__ 8 +__amd64 1 +__amd64__ 1 +__x86_64 1 +__x86_64__ 1 +__k8 1 +__k8__ 1 +__MMX__ 1 +__SSE__ 1 +__SSE2__ 1 +__SSE_MATH__ 1 +__SSE2_MATH__ 1 +__gnu_linux__ 1 +__linux 1 +__linux__ 1 +linux 1 +__unix 1 +__unix__ 1 +unix 1 +__ELF__ 1 +__DECIMAL_BID_FORMAT__ 1 +macro2 ble +--dwarf_getmacros_die w/ cache-- __STDC__ 1 __STDC_HOSTED__ 1 __GNUC__ 4 @@ -285,4 +811,776 @@ __DECIMAL_BID_FORMAT__ 1 macro2 ble EOF
+testfiles testfile-macros + +testrun_compare ${abs_builddir}/dwarf-getmacros testfile-macros 0xb <<\EOF +--dwarf_getmacros-- +--dwarf_getmacros_die w/o cache-- +__STDC__ 1 +__STDC_HOSTED__ 1 +__GNUC__ 4 +__GNUC_MINOR__ 7 +__GNUC_PATCHLEVEL__ 0 +__VERSION__ "4.7.0 20120507 (Red Hat 4.7.0-5)" +__GNUC_RH_RELEASE__ 5 +__ATOMIC_RELAXED 0 +__ATOMIC_SEQ_CST 5 +__ATOMIC_ACQUIRE 2 +__ATOMIC_RELEASE 3 +__ATOMIC_ACQ_REL 4 +__ATOMIC_CONSUME 1 +__FINITE_MATH_ONLY__ 0 +_LP64 1 +__LP64__ 1 +__SIZEOF_INT__ 4 +__SIZEOF_LONG__ 8 +__SIZEOF_LONG_LONG__ 8 +__SIZEOF_SHORT__ 2 +__SIZEOF_FLOAT__ 4 +__SIZEOF_DOUBLE__ 8 +__SIZEOF_LONG_DOUBLE__ 16 +__SIZEOF_SIZE_T__ 8 +__CHAR_BIT__ 8 +__BIGGEST_ALIGNMENT__ 16 +__ORDER_LITTLE_ENDIAN__ 1234 +__ORDER_BIG_ENDIAN__ 4321 +__ORDER_PDP_ENDIAN__ 3412 +__BYTE_ORDER__ __ORDER_LITTLE_ENDIAN__ +__FLOAT_WORD_ORDER__ __ORDER_LITTLE_ENDIAN__ +__SIZEOF_POINTER__ 8 +__SIZE_TYPE__ long unsigned int +__PTRDIFF_TYPE__ long int +__WCHAR_TYPE__ int +__WINT_TYPE__ unsigned int +__INTMAX_TYPE__ long int +__UINTMAX_TYPE__ long unsigned int +__CHAR16_TYPE__ short unsigned int +__CHAR32_TYPE__ unsigned int +__SIG_ATOMIC_TYPE__ int +__INT8_TYPE__ signed char +__INT16_TYPE__ short int +__INT32_TYPE__ int +__INT64_TYPE__ long int +__UINT8_TYPE__ unsigned char +__UINT16_TYPE__ short unsigned int +__UINT32_TYPE__ unsigned int +__UINT64_TYPE__ long unsigned int +__INT_LEAST8_TYPE__ signed char +__INT_LEAST16_TYPE__ short int +__INT_LEAST32_TYPE__ int +__INT_LEAST64_TYPE__ long int +__UINT_LEAST8_TYPE__ unsigned char +__UINT_LEAST16_TYPE__ short unsigned int +__UINT_LEAST32_TYPE__ unsigned int +__UINT_LEAST64_TYPE__ long unsigned int +__INT_FAST8_TYPE__ signed char +__INT_FAST16_TYPE__ long int +__INT_FAST32_TYPE__ long int +__INT_FAST64_TYPE__ long int +__UINT_FAST8_TYPE__ unsigned char +__UINT_FAST16_TYPE__ long unsigned int +__UINT_FAST32_TYPE__ long unsigned int +__UINT_FAST64_TYPE__ long unsigned int +__INTPTR_TYPE__ long int +__UINTPTR_TYPE__ long unsigned int +__GXX_ABI_VERSION 1002 +__SCHAR_MAX__ 127 +__SHRT_MAX__ 32767 +__INT_MAX__ 2147483647 +__LONG_MAX__ 9223372036854775807L +__LONG_LONG_MAX__ 9223372036854775807LL +__WCHAR_MAX__ 2147483647 +__WCHAR_MIN__ (-__WCHAR_MAX__ - 1) +__WINT_MAX__ 4294967295U +__WINT_MIN__ 0U +__PTRDIFF_MAX__ 9223372036854775807L +__SIZE_MAX__ 18446744073709551615UL +__INTMAX_MAX__ 9223372036854775807L +__INTMAX_C(c) c ## L +__UINTMAX_MAX__ 18446744073709551615UL +__UINTMAX_C(c) c ## UL +__SIG_ATOMIC_MAX__ 2147483647 +__SIG_ATOMIC_MIN__ (-__SIG_ATOMIC_MAX__ - 1) +__INT8_MAX__ 127 +__INT16_MAX__ 32767 +__INT32_MAX__ 2147483647 +__INT64_MAX__ 9223372036854775807L +__UINT8_MAX__ 255 +__UINT16_MAX__ 65535 +__UINT32_MAX__ 4294967295U +__UINT64_MAX__ 18446744073709551615UL +__INT_LEAST8_MAX__ 127 +__INT8_C(c) c +__INT_LEAST16_MAX__ 32767 +__INT16_C(c) c +__INT_LEAST32_MAX__ 2147483647 +__INT32_C(c) c +__INT_LEAST64_MAX__ 9223372036854775807L +__INT64_C(c) c ## L +__UINT_LEAST8_MAX__ 255 +__UINT8_C(c) c +__UINT_LEAST16_MAX__ 65535 +__UINT16_C(c) c +__UINT_LEAST32_MAX__ 4294967295U +__UINT32_C(c) c ## U +__UINT_LEAST64_MAX__ 18446744073709551615UL +__UINT64_C(c) c ## UL +__INT_FAST8_MAX__ 127 +__INT_FAST16_MAX__ 9223372036854775807L +__INT_FAST32_MAX__ 9223372036854775807L +__INT_FAST64_MAX__ 9223372036854775807L +__UINT_FAST8_MAX__ 255 +__UINT_FAST16_MAX__ 18446744073709551615UL +__UINT_FAST32_MAX__ 18446744073709551615UL +__UINT_FAST64_MAX__ 18446744073709551615UL +__INTPTR_MAX__ 9223372036854775807L +__UINTPTR_MAX__ 18446744073709551615UL +__FLT_EVAL_METHOD__ 0 +__DEC_EVAL_METHOD__ 2 +__FLT_RADIX__ 2 +__FLT_MANT_DIG__ 24 +__FLT_DIG__ 6 +__FLT_MIN_EXP__ (-125) +__FLT_MIN_10_EXP__ (-37) +__FLT_MAX_EXP__ 128 +__FLT_MAX_10_EXP__ 38 +__FLT_DECIMAL_DIG__ 9 +__FLT_MAX__ 3.40282346638528859812e+38F +__FLT_MIN__ 1.17549435082228750797e-38F +__FLT_EPSILON__ 1.19209289550781250000e-7F +__FLT_DENORM_MIN__ 1.40129846432481707092e-45F +__FLT_HAS_DENORM__ 1 +__FLT_HAS_INFINITY__ 1 +__FLT_HAS_QUIET_NAN__ 1 +__DBL_MANT_DIG__ 53 +__DBL_DIG__ 15 +__DBL_MIN_EXP__ (-1021) +__DBL_MIN_10_EXP__ (-307) +__DBL_MAX_EXP__ 1024 +__DBL_MAX_10_EXP__ 308 +__DBL_DECIMAL_DIG__ 17 +__DBL_MAX__ ((double)1.79769313486231570815e+308L) +__DBL_MIN__ ((double)2.22507385850720138309e-308L) +__DBL_EPSILON__ ((double)2.22044604925031308085e-16L) +__DBL_DENORM_MIN__ ((double)4.94065645841246544177e-324L) +__DBL_HAS_DENORM__ 1 +__DBL_HAS_INFINITY__ 1 +__DBL_HAS_QUIET_NAN__ 1 +__LDBL_MANT_DIG__ 64 +__LDBL_DIG__ 18 +__LDBL_MIN_EXP__ (-16381) +__LDBL_MIN_10_EXP__ (-4931) +__LDBL_MAX_EXP__ 16384 +__LDBL_MAX_10_EXP__ 4932 +__DECIMAL_DIG__ 21 +__LDBL_MAX__ 1.18973149535723176502e+4932L +__LDBL_MIN__ 3.36210314311209350626e-4932L +__LDBL_EPSILON__ 1.08420217248550443401e-19L +__LDBL_DENORM_MIN__ 3.64519953188247460253e-4951L +__LDBL_HAS_DENORM__ 1 +__LDBL_HAS_INFINITY__ 1 +__LDBL_HAS_QUIET_NAN__ 1 +__DEC32_MANT_DIG__ 7 +__DEC32_MIN_EXP__ (-94) +__DEC32_MAX_EXP__ 97 +__DEC32_MIN__ 1E-95DF +__DEC32_MAX__ 9.999999E96DF +__DEC32_EPSILON__ 1E-6DF +__DEC32_SUBNORMAL_MIN__ 0.000001E-95DF +__DEC64_MANT_DIG__ 16 +__DEC64_MIN_EXP__ (-382) +__DEC64_MAX_EXP__ 385 +__DEC64_MIN__ 1E-383DD +__DEC64_MAX__ 9.999999999999999E384DD +__DEC64_EPSILON__ 1E-15DD +__DEC64_SUBNORMAL_MIN__ 0.000000000000001E-383DD +__DEC128_MANT_DIG__ 34 +__DEC128_MIN_EXP__ (-6142) +__DEC128_MAX_EXP__ 6145 +__DEC128_MIN__ 1E-6143DL +__DEC128_MAX__ 9.999999999999999999999999999999999E6144DL +__DEC128_EPSILON__ 1E-33DL +__DEC128_SUBNORMAL_MIN__ 0.000000000000000000000000000000001E-6143DL +__REGISTER_PREFIX__ +__USER_LABEL_PREFIX__ +__GNUC_GNU_INLINE__ 1 +__NO_INLINE__ 1 +__GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1 +__GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1 +__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1 +__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1 +__GCC_ATOMIC_BOOL_LOCK_FREE 2 +__GCC_ATOMIC_CHAR_LOCK_FREE 2 +__GCC_ATOMIC_CHAR16_T_LOCK_FREE 2 +__GCC_ATOMIC_CHAR32_T_LOCK_FREE 2 +__GCC_ATOMIC_WCHAR_T_LOCK_FREE 2 +__GCC_ATOMIC_SHORT_LOCK_FREE 2 +__GCC_ATOMIC_INT_LOCK_FREE 2 +__GCC_ATOMIC_LONG_LOCK_FREE 2 +__GCC_ATOMIC_LLONG_LOCK_FREE 2 +__GCC_ATOMIC_TEST_AND_SET_TRUEVAL 1 +__GCC_ATOMIC_POINTER_LOCK_FREE 2 +__GCC_HAVE_DWARF2_CFI_ASM 1 +__PRAGMA_REDEFINE_EXTNAME 1 +__SIZEOF_INT128__ 16 +__SIZEOF_WCHAR_T__ 4 +__SIZEOF_WINT_T__ 4 +__SIZEOF_PTRDIFF_T__ 8 +__amd64 1 +__amd64__ 1 +__x86_64 1 +__x86_64__ 1 +__k8 1 +__k8__ 1 +__MMX__ 1 +__SSE__ 1 +__SSE2__ 1 +__SSE_MATH__ 1 +__SSE2_MATH__ 1 +__gnu_linux__ 1 +__linux 1 +__linux__ 1 +linux 1 +__unix 1 +__unix__ 1 +unix 1 +__ELF__ 1 +__DECIMAL_BID_FORMAT__ 1 +_STRING_H 1 +include 0x5d8 + _FEATURES_H 1 + __KERNEL_STRICT_NAMES + __USE_ANSI 1 + __GNUC_PREREQ(maj,min) ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min)) + _BSD_SOURCE 1 + _SVID_SOURCE 1 + _POSIX_SOURCE 1 + _POSIX_C_SOURCE 200809L + __USE_POSIX_IMPLICITLY 1 + __USE_POSIX 1 + __USE_POSIX2 1 + __USE_POSIX199309 1 + __USE_POSIX199506 1 + __USE_XOPEN2K 1 + __USE_ISOC95 1 + __USE_ISOC99 1 + __USE_XOPEN2K8 1 + _ATFILE_SOURCE 1 + __USE_MISC 1 + __USE_BSD 1 + __USE_SVID 1 + __USE_ATFILE 1 + __USE_FORTIFY_LEVEL 0 +/include +include 0x733 + _STDC_PREDEF_H 1 + __STDC_IEC_559__ 1 + __STDC_IEC_559_COMPLEX__ 1 + __STDC_ISO_10646__ 201103L + __STDC_NO_THREADS__ 1 +/include +include 0x755 + __GNU_LIBRARY__ 6 + __GLIBC__ 2 + __GLIBC_MINOR__ 15 + __GLIBC_PREREQ(maj,min) ((__GLIBC__ << 16) + __GLIBC_MINOR__ >= ((maj) << 16) + (min)) + __GLIBC_HAVE_LONG_LONG 1 +/include +include 0x783 + _SYS_CDEFS_H 1 + __LEAF , __leaf__ + __LEAF_ATTR __attribute__ ((__leaf__)) + __THROW __attribute__ ((__nothrow__ __LEAF)) + __THROWNL __attribute__ ((__nothrow__)) + __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct + __P(args) args + __PMT(args) args + __CONCAT(x,y) x ## y + __STRING(x) #x + __ptr_t void * + __long_double_t long double + __BEGIN_DECLS + __END_DECLS + __BEGIN_NAMESPACE_STD + __END_NAMESPACE_STD + __USING_NAMESPACE_STD(name) + __BEGIN_NAMESPACE_C99 + __END_NAMESPACE_C99 + __USING_NAMESPACE_C99(name) + __bounded + __unbounded + __ptrvalue + __bos(ptr) __builtin_object_size (ptr, __USE_FORTIFY_LEVEL > 1) + __bos0(ptr) __builtin_object_size (ptr, 0) + __fortify_function __extern_always_inline __attribute_artificial__ + __warndecl(name,msg) extern void name (void) __attribute__((__warning__ (msg))) + __warnattr(msg) __attribute__((__warning__ (msg))) + __errordecl(name,msg) extern void name (void) __attribute__((__error__ (msg))) + __flexarr [] + __REDIRECT(name,proto,alias) name proto __asm__ (__ASMNAME (#alias)) + __REDIRECT_NTH(name,proto,alias) name proto __asm__ (__ASMNAME (#alias)) __THROW + __REDIRECT_NTHNL(name,proto,alias) name proto __asm__ (__ASMNAME (#alias)) __THROWNL + __ASMNAME(cname) __ASMNAME2 (__USER_LABEL_PREFIX__, cname) + __ASMNAME2(prefix,cname) __STRING (prefix) cname + __attribute_malloc__ __attribute__ ((__malloc__)) + __attribute_pure__ __attribute__ ((__pure__)) + __attribute_const__ __attribute__ ((__const__)) + __attribute_used__ __attribute__ ((__used__)) + __attribute_noinline__ __attribute__ ((__noinline__)) + __attribute_deprecated__ __attribute__ ((__deprecated__)) + __attribute_format_arg__(x) __attribute__ ((__format_arg__ (x))) + __attribute_format_strfmon__(a,b) __attribute__ ((__format__ (__strfmon__, a, b))) + __nonnull(params) __attribute__ ((__nonnull__ params)) + __attribute_warn_unused_result__ __attribute__ ((__warn_unused_result__)) + __wur + __always_inline __inline __attribute__ ((__always_inline__)) + __attribute_artificial__ __attribute__ ((__artificial__)) + __extern_inline extern __inline + __extern_always_inline extern __always_inline + __va_arg_pack() __builtin_va_arg_pack () + __va_arg_pack_len() __builtin_va_arg_pack_len () + __restrict_arr __restrict + __glibc_unlikely(cond) __builtin_expect((cond), 0) +/include +include 0x8fa + __WORDSIZE 64 + __WORDSIZE_TIME64_COMPAT32 1 + __SYSCALL_WORDSIZE 64 +/include +include 0x910 + __LDBL_REDIR1(name,proto,alias) name proto + __LDBL_REDIR(name,proto) name proto + __LDBL_REDIR1_NTH(name,proto,alias) name proto __THROW + __LDBL_REDIR_NTH(name,proto) name proto __THROW + __LDBL_REDIR_DECL(name) + __REDIRECT_LDBL(name,proto,alias) __REDIRECT (name, proto, alias) + __REDIRECT_NTH_LDBL(name,proto,alias) __REDIRECT_NTH (name, proto, alias) +/include +include 0x945 + __stub_bdflush + __stub_chflags + __stub_fattach + __stub_fchflags + __stub_fdetach + __stub_getmsg + __stub_gtty + __stub_lchmod + __stub_putmsg + __stub_revoke + __stub_setlogin + __stub_sigreturn + __stub_sstk + __stub_stty +/include +include 0x99d + __need_size_t + __need_NULL +/include +include 0x9ad + __size_t__ + __SIZE_T__ + _SIZE_T + _SYS_SIZE_T_H + _T_SIZE_ + _T_SIZE + __SIZE_T + _SIZE_T_ + _BSD_SIZE_T_ + _SIZE_T_DEFINED_ + _SIZE_T_DEFINED + _BSD_SIZE_T_DEFINED_ + _SIZE_T_DECLARED + ___int_size_t_h + _GCC_SIZE_T + _SIZET_ + __size_t + NULL ((void *)0) +/include +_XLOCALE_H 1 +HELLO "world" +--dwarf_getmacros_die w/ cache-- +__STDC__ 1 +__STDC_HOSTED__ 1 +__GNUC__ 4 +__GNUC_MINOR__ 7 +__GNUC_PATCHLEVEL__ 0 +__VERSION__ "4.7.0 20120507 (Red Hat 4.7.0-5)" +__GNUC_RH_RELEASE__ 5 +__ATOMIC_RELAXED 0 +__ATOMIC_SEQ_CST 5 +__ATOMIC_ACQUIRE 2 +__ATOMIC_RELEASE 3 +__ATOMIC_ACQ_REL 4 +__ATOMIC_CONSUME 1 +__FINITE_MATH_ONLY__ 0 +_LP64 1 +__LP64__ 1 +__SIZEOF_INT__ 4 +__SIZEOF_LONG__ 8 +__SIZEOF_LONG_LONG__ 8 +__SIZEOF_SHORT__ 2 +__SIZEOF_FLOAT__ 4 +__SIZEOF_DOUBLE__ 8 +__SIZEOF_LONG_DOUBLE__ 16 +__SIZEOF_SIZE_T__ 8 +__CHAR_BIT__ 8 +__BIGGEST_ALIGNMENT__ 16 +__ORDER_LITTLE_ENDIAN__ 1234 +__ORDER_BIG_ENDIAN__ 4321 +__ORDER_PDP_ENDIAN__ 3412 +__BYTE_ORDER__ __ORDER_LITTLE_ENDIAN__ +__FLOAT_WORD_ORDER__ __ORDER_LITTLE_ENDIAN__ +__SIZEOF_POINTER__ 8 +__SIZE_TYPE__ long unsigned int +__PTRDIFF_TYPE__ long int +__WCHAR_TYPE__ int +__WINT_TYPE__ unsigned int +__INTMAX_TYPE__ long int +__UINTMAX_TYPE__ long unsigned int +__CHAR16_TYPE__ short unsigned int +__CHAR32_TYPE__ unsigned int +__SIG_ATOMIC_TYPE__ int +__INT8_TYPE__ signed char +__INT16_TYPE__ short int +__INT32_TYPE__ int +__INT64_TYPE__ long int +__UINT8_TYPE__ unsigned char +__UINT16_TYPE__ short unsigned int +__UINT32_TYPE__ unsigned int +__UINT64_TYPE__ long unsigned int +__INT_LEAST8_TYPE__ signed char +__INT_LEAST16_TYPE__ short int +__INT_LEAST32_TYPE__ int +__INT_LEAST64_TYPE__ long int +__UINT_LEAST8_TYPE__ unsigned char +__UINT_LEAST16_TYPE__ short unsigned int +__UINT_LEAST32_TYPE__ unsigned int +__UINT_LEAST64_TYPE__ long unsigned int +__INT_FAST8_TYPE__ signed char +__INT_FAST16_TYPE__ long int +__INT_FAST32_TYPE__ long int +__INT_FAST64_TYPE__ long int +__UINT_FAST8_TYPE__ unsigned char +__UINT_FAST16_TYPE__ long unsigned int +__UINT_FAST32_TYPE__ long unsigned int +__UINT_FAST64_TYPE__ long unsigned int +__INTPTR_TYPE__ long int +__UINTPTR_TYPE__ long unsigned int +__GXX_ABI_VERSION 1002 +__SCHAR_MAX__ 127 +__SHRT_MAX__ 32767 +__INT_MAX__ 2147483647 +__LONG_MAX__ 9223372036854775807L +__LONG_LONG_MAX__ 9223372036854775807LL +__WCHAR_MAX__ 2147483647 +__WCHAR_MIN__ (-__WCHAR_MAX__ - 1) +__WINT_MAX__ 4294967295U +__WINT_MIN__ 0U +__PTRDIFF_MAX__ 9223372036854775807L +__SIZE_MAX__ 18446744073709551615UL +__INTMAX_MAX__ 9223372036854775807L +__INTMAX_C(c) c ## L +__UINTMAX_MAX__ 18446744073709551615UL +__UINTMAX_C(c) c ## UL +__SIG_ATOMIC_MAX__ 2147483647 +__SIG_ATOMIC_MIN__ (-__SIG_ATOMIC_MAX__ - 1) +__INT8_MAX__ 127 +__INT16_MAX__ 32767 +__INT32_MAX__ 2147483647 +__INT64_MAX__ 9223372036854775807L +__UINT8_MAX__ 255 +__UINT16_MAX__ 65535 +__UINT32_MAX__ 4294967295U +__UINT64_MAX__ 18446744073709551615UL +__INT_LEAST8_MAX__ 127 +__INT8_C(c) c +__INT_LEAST16_MAX__ 32767 +__INT16_C(c) c +__INT_LEAST32_MAX__ 2147483647 +__INT32_C(c) c +__INT_LEAST64_MAX__ 9223372036854775807L +__INT64_C(c) c ## L +__UINT_LEAST8_MAX__ 255 +__UINT8_C(c) c +__UINT_LEAST16_MAX__ 65535 +__UINT16_C(c) c +__UINT_LEAST32_MAX__ 4294967295U +__UINT32_C(c) c ## U +__UINT_LEAST64_MAX__ 18446744073709551615UL +__UINT64_C(c) c ## UL +__INT_FAST8_MAX__ 127 +__INT_FAST16_MAX__ 9223372036854775807L +__INT_FAST32_MAX__ 9223372036854775807L +__INT_FAST64_MAX__ 9223372036854775807L +__UINT_FAST8_MAX__ 255 +__UINT_FAST16_MAX__ 18446744073709551615UL +__UINT_FAST32_MAX__ 18446744073709551615UL +__UINT_FAST64_MAX__ 18446744073709551615UL +__INTPTR_MAX__ 9223372036854775807L +__UINTPTR_MAX__ 18446744073709551615UL +__FLT_EVAL_METHOD__ 0 +__DEC_EVAL_METHOD__ 2 +__FLT_RADIX__ 2 +__FLT_MANT_DIG__ 24 +__FLT_DIG__ 6 +__FLT_MIN_EXP__ (-125) +__FLT_MIN_10_EXP__ (-37) +__FLT_MAX_EXP__ 128 +__FLT_MAX_10_EXP__ 38 +__FLT_DECIMAL_DIG__ 9 +__FLT_MAX__ 3.40282346638528859812e+38F +__FLT_MIN__ 1.17549435082228750797e-38F +__FLT_EPSILON__ 1.19209289550781250000e-7F +__FLT_DENORM_MIN__ 1.40129846432481707092e-45F +__FLT_HAS_DENORM__ 1 +__FLT_HAS_INFINITY__ 1 +__FLT_HAS_QUIET_NAN__ 1 +__DBL_MANT_DIG__ 53 +__DBL_DIG__ 15 +__DBL_MIN_EXP__ (-1021) +__DBL_MIN_10_EXP__ (-307) +__DBL_MAX_EXP__ 1024 +__DBL_MAX_10_EXP__ 308 +__DBL_DECIMAL_DIG__ 17 +__DBL_MAX__ ((double)1.79769313486231570815e+308L) +__DBL_MIN__ ((double)2.22507385850720138309e-308L) +__DBL_EPSILON__ ((double)2.22044604925031308085e-16L) +__DBL_DENORM_MIN__ ((double)4.94065645841246544177e-324L) +__DBL_HAS_DENORM__ 1 +__DBL_HAS_INFINITY__ 1 +__DBL_HAS_QUIET_NAN__ 1 +__LDBL_MANT_DIG__ 64 +__LDBL_DIG__ 18 +__LDBL_MIN_EXP__ (-16381) +__LDBL_MIN_10_EXP__ (-4931) +__LDBL_MAX_EXP__ 16384 +__LDBL_MAX_10_EXP__ 4932 +__DECIMAL_DIG__ 21 +__LDBL_MAX__ 1.18973149535723176502e+4932L +__LDBL_MIN__ 3.36210314311209350626e-4932L +__LDBL_EPSILON__ 1.08420217248550443401e-19L +__LDBL_DENORM_MIN__ 3.64519953188247460253e-4951L +__LDBL_HAS_DENORM__ 1 +__LDBL_HAS_INFINITY__ 1 +__LDBL_HAS_QUIET_NAN__ 1 +__DEC32_MANT_DIG__ 7 +__DEC32_MIN_EXP__ (-94) +__DEC32_MAX_EXP__ 97 +__DEC32_MIN__ 1E-95DF +__DEC32_MAX__ 9.999999E96DF +__DEC32_EPSILON__ 1E-6DF +__DEC32_SUBNORMAL_MIN__ 0.000001E-95DF +__DEC64_MANT_DIG__ 16 +__DEC64_MIN_EXP__ (-382) +__DEC64_MAX_EXP__ 385 +__DEC64_MIN__ 1E-383DD +__DEC64_MAX__ 9.999999999999999E384DD +__DEC64_EPSILON__ 1E-15DD +__DEC64_SUBNORMAL_MIN__ 0.000000000000001E-383DD +__DEC128_MANT_DIG__ 34 +__DEC128_MIN_EXP__ (-6142) +__DEC128_MAX_EXP__ 6145 +__DEC128_MIN__ 1E-6143DL +__DEC128_MAX__ 9.999999999999999999999999999999999E6144DL +__DEC128_EPSILON__ 1E-33DL +__DEC128_SUBNORMAL_MIN__ 0.000000000000000000000000000000001E-6143DL +__REGISTER_PREFIX__ +__USER_LABEL_PREFIX__ +__GNUC_GNU_INLINE__ 1 +__NO_INLINE__ 1 +__GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1 +__GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1 +__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1 +__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1 +__GCC_ATOMIC_BOOL_LOCK_FREE 2 +__GCC_ATOMIC_CHAR_LOCK_FREE 2 +__GCC_ATOMIC_CHAR16_T_LOCK_FREE 2 +__GCC_ATOMIC_CHAR32_T_LOCK_FREE 2 +__GCC_ATOMIC_WCHAR_T_LOCK_FREE 2 +__GCC_ATOMIC_SHORT_LOCK_FREE 2 +__GCC_ATOMIC_INT_LOCK_FREE 2 +__GCC_ATOMIC_LONG_LOCK_FREE 2 +__GCC_ATOMIC_LLONG_LOCK_FREE 2 +__GCC_ATOMIC_TEST_AND_SET_TRUEVAL 1 +__GCC_ATOMIC_POINTER_LOCK_FREE 2 +__GCC_HAVE_DWARF2_CFI_ASM 1 +__PRAGMA_REDEFINE_EXTNAME 1 +__SIZEOF_INT128__ 16 +__SIZEOF_WCHAR_T__ 4 +__SIZEOF_WINT_T__ 4 +__SIZEOF_PTRDIFF_T__ 8 +__amd64 1 +__amd64__ 1 +__x86_64 1 +__x86_64__ 1 +__k8 1 +__k8__ 1 +__MMX__ 1 +__SSE__ 1 +__SSE2__ 1 +__SSE_MATH__ 1 +__SSE2_MATH__ 1 +__gnu_linux__ 1 +__linux 1 +__linux__ 1 +linux 1 +__unix 1 +__unix__ 1 +unix 1 +__ELF__ 1 +__DECIMAL_BID_FORMAT__ 1 +_STRING_H 1 +include 0x5d8 + _FEATURES_H 1 + __KERNEL_STRICT_NAMES + __USE_ANSI 1 + __GNUC_PREREQ(maj,min) ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min)) + _BSD_SOURCE 1 + _SVID_SOURCE 1 + _POSIX_SOURCE 1 + _POSIX_C_SOURCE 200809L + __USE_POSIX_IMPLICITLY 1 + __USE_POSIX 1 + __USE_POSIX2 1 + __USE_POSIX199309 1 + __USE_POSIX199506 1 + __USE_XOPEN2K 1 + __USE_ISOC95 1 + __USE_ISOC99 1 + __USE_XOPEN2K8 1 + _ATFILE_SOURCE 1 + __USE_MISC 1 + __USE_BSD 1 + __USE_SVID 1 + __USE_ATFILE 1 + __USE_FORTIFY_LEVEL 0 +/include +include 0x733 + _STDC_PREDEF_H 1 + __STDC_IEC_559__ 1 + __STDC_IEC_559_COMPLEX__ 1 + __STDC_ISO_10646__ 201103L + __STDC_NO_THREADS__ 1 +/include +include 0x755 + __GNU_LIBRARY__ 6 + __GLIBC__ 2 + __GLIBC_MINOR__ 15 + __GLIBC_PREREQ(maj,min) ((__GLIBC__ << 16) + __GLIBC_MINOR__ >= ((maj) << 16) + (min)) + __GLIBC_HAVE_LONG_LONG 1 +/include +include 0x783 + _SYS_CDEFS_H 1 + __LEAF , __leaf__ + __LEAF_ATTR __attribute__ ((__leaf__)) + __THROW __attribute__ ((__nothrow__ __LEAF)) + __THROWNL __attribute__ ((__nothrow__)) + __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct + __P(args) args + __PMT(args) args + __CONCAT(x,y) x ## y + __STRING(x) #x + __ptr_t void * + __long_double_t long double + __BEGIN_DECLS + __END_DECLS + __BEGIN_NAMESPACE_STD + __END_NAMESPACE_STD + __USING_NAMESPACE_STD(name) + __BEGIN_NAMESPACE_C99 + __END_NAMESPACE_C99 + __USING_NAMESPACE_C99(name) + __bounded + __unbounded + __ptrvalue + __bos(ptr) __builtin_object_size (ptr, __USE_FORTIFY_LEVEL > 1) + __bos0(ptr) __builtin_object_size (ptr, 0) + __fortify_function __extern_always_inline __attribute_artificial__ + __warndecl(name,msg) extern void name (void) __attribute__((__warning__ (msg))) + __warnattr(msg) __attribute__((__warning__ (msg))) + __errordecl(name,msg) extern void name (void) __attribute__((__error__ (msg))) + __flexarr [] + __REDIRECT(name,proto,alias) name proto __asm__ (__ASMNAME (#alias)) + __REDIRECT_NTH(name,proto,alias) name proto __asm__ (__ASMNAME (#alias)) __THROW + __REDIRECT_NTHNL(name,proto,alias) name proto __asm__ (__ASMNAME (#alias)) __THROWNL + __ASMNAME(cname) __ASMNAME2 (__USER_LABEL_PREFIX__, cname) + __ASMNAME2(prefix,cname) __STRING (prefix) cname + __attribute_malloc__ __attribute__ ((__malloc__)) + __attribute_pure__ __attribute__ ((__pure__)) + __attribute_const__ __attribute__ ((__const__)) + __attribute_used__ __attribute__ ((__used__)) + __attribute_noinline__ __attribute__ ((__noinline__)) + __attribute_deprecated__ __attribute__ ((__deprecated__)) + __attribute_format_arg__(x) __attribute__ ((__format_arg__ (x))) + __attribute_format_strfmon__(a,b) __attribute__ ((__format__ (__strfmon__, a, b))) + __nonnull(params) __attribute__ ((__nonnull__ params)) + __attribute_warn_unused_result__ __attribute__ ((__warn_unused_result__)) + __wur + __always_inline __inline __attribute__ ((__always_inline__)) + __attribute_artificial__ __attribute__ ((__artificial__)) + __extern_inline extern __inline + __extern_always_inline extern __always_inline + __va_arg_pack() __builtin_va_arg_pack () + __va_arg_pack_len() __builtin_va_arg_pack_len () + __restrict_arr __restrict + __glibc_unlikely(cond) __builtin_expect((cond), 0) +/include +include 0x8fa + __WORDSIZE 64 + __WORDSIZE_TIME64_COMPAT32 1 + __SYSCALL_WORDSIZE 64 +/include +include 0x910 + __LDBL_REDIR1(name,proto,alias) name proto + __LDBL_REDIR(name,proto) name proto + __LDBL_REDIR1_NTH(name,proto,alias) name proto __THROW + __LDBL_REDIR_NTH(name,proto) name proto __THROW + __LDBL_REDIR_DECL(name) + __REDIRECT_LDBL(name,proto,alias) __REDIRECT (name, proto, alias) + __REDIRECT_NTH_LDBL(name,proto,alias) __REDIRECT_NTH (name, proto, alias) +/include +include 0x945 + __stub_bdflush + __stub_chflags + __stub_fattach + __stub_fchflags + __stub_fdetach + __stub_getmsg + __stub_gtty + __stub_lchmod + __stub_putmsg + __stub_revoke + __stub_setlogin + __stub_sigreturn + __stub_sstk + __stub_stty +/include +include 0x99d + __need_size_t + __need_NULL +/include +include 0x9ad + __size_t__ + __SIZE_T__ + _SIZE_T + _SYS_SIZE_T_H + _T_SIZE_ + _T_SIZE + __SIZE_T + _SIZE_T_ + _BSD_SIZE_T_ + _SIZE_T_DEFINED_ + _SIZE_T_DEFINED + _BSD_SIZE_T_DEFINED_ + _SIZE_T_DECLARED + ___int_size_t_h + _GCC_SIZE_T + _SIZET_ + __size_t + NULL ((void *)0) +/include +_XLOCALE_H 1 +HELLO "world" +EOF + exit 0
elfutils-devel@lists.fedorahosted.org