[13/14] libdw: Apply DWARF package file section offsets where appropriate
Commit Message
From: Omar Sandoval <osandov@fb.com>
The final piece of DWARF package file support is that offsets have to be
interpreted relative to the section offset from the package index.
.debug_abbrev.dwo is already covered, so sprinkle around calls to
dwarf_cu_dwp_section_info for the remaining sections: .debug_line.dwo,
.debug_loclists.dwo/.debug_loc.dwo, .debug_str_offsets.dwo,
.debug_macro.dwo/.debug_macinfo.dwo, and .debug_rnglists.dwo. With all
of that in place, we can finally test various libdw functions on dwp
files.
Signed-off-by: Omar Sandoval <osandov@fb.com>
---
libdw/ChangeLog | 10 +-
libdw/dwarf_getlocation.c | 6 +
libdw/dwarf_getmacros.c | 26 +-
libdw/libdwP.h | 38 +-
tests/ChangeLog | 8 +-
tests/run-all-dwarf-ranges.sh | 114 +++
tests/run-dwarf-getmacros.sh | 1412 +++++++++++++++++++++++++++++++++
tests/run-get-units-split.sh | 18 +
tests/run-varlocs.sh | 112 +++
9 files changed, 1726 insertions(+), 18 deletions(-)
Comments
Hi Omar,
On Wed, Sep 27, 2023 at 11:21:02AM -0700, Omar Sandoval wrote:
> The final piece of DWARF package file support is that offsets have to be
> interpreted relative to the section offset from the package index.
> .debug_abbrev.dwo is already covered, so sprinkle around calls to
> dwarf_cu_dwp_section_info for the remaining sections: .debug_line.dwo,
> .debug_loclists.dwo/.debug_loc.dwo, .debug_str_offsets.dwo,
> .debug_macro.dwo/.debug_macinfo.dwo, and .debug_rnglists.dwo. With all
> of that in place, we can finally test various libdw functions on dwp
> files.
This looks good, but obviously needs some earlier patches.
> diff --git a/libdw/ChangeLog b/libdw/ChangeLog
> index f37d9411..08b2c3e6 100644
> --- a/libdw/ChangeLog
> +++ b/libdw/ChangeLog
> @@ -12,10 +12,13 @@
> * dwarf_getmacros.c (get_macinfo_table): Replace assignment of
> table->is_64bit with assignments of table->address_size and
> table->offset_size. Assume default DW_AT_stmt_list of 0 for split
> - DWARF. Set table->dbg.
> + DWARF. Set table->dbg. Call dwarf_cu_dwp_section_info and add offset
> + to line_offset.
> (get_table_for_offset): Ditto.
> (read_macros): Get fake CU offset_size from table->offset_size instead
> of table->is_64bit.
> + (get_offset_from): Call dwarf_cu_dwp_section_info and add offset to
> + *retp.
> * dwarf_macro_getsrcfiles.c (dwarf_macro_getsrcfiles): Get
> address_size for __libdw_getsrclines from table->address_size instead
> of table->is_64bit. Get dbg for __libdw_getsrclines from table->dbg
> @@ -36,6 +39,9 @@
> (__libdw_set_debugdir): New declaration.
> (__libdw_dwp_findcu_id): New declaration.
> (__libdw_link_skel_split): Handle .debug_addr for dwp.
> + (str_offsets_base_off): Call dwarf_cu_dwp_section_info and add offset.
> + (__libdw_cu_ranges_base): Ditto.
> + (__libdw_cu_locs_base): Ditto.
> * dwarf_begin_elf.c (dwarf_scnnames): Add IDX_debug_cu_index and
> IDX_debug_tu_index.
> (scn_to_string_section_idx): Ditto.
> @@ -60,6 +66,8 @@
> __libdw_dwp_find_unit, and use it to adjust abbrev_offset and assign
> newp->dwp_row.
> * dwarf_cu_dwp_section_info.c: New file.
> + * dwarf_getlocation.c (initial_offset): Call dwarf_cu_dwp_section_info
> + and add offset to start_offset.
>
> 2023-02-22 Mark Wielaard <mark@klomp.org>
>
> diff --git a/libdw/dwarf_getlocation.c b/libdw/dwarf_getlocation.c
> index 553fdc98..37b32fc1 100644
> --- a/libdw/dwarf_getlocation.c
> +++ b/libdw/dwarf_getlocation.c
> @@ -812,6 +812,12 @@ initial_offset (Dwarf_Attribute *attr, ptrdiff_t *offset)
> : DWARF_E_NO_DEBUG_LOCLISTS),
> NULL, &start_offset) == NULL)
> return -1;
> +
> + Dwarf_Off loc_off;
> + if (INTUSE(dwarf_cu_dwp_section_info) (attr->cu, DW_SECT_LOCLISTS,
> + &loc_off, NULL) != 0)
> + return -1;
> + start_offset += loc_off;
> }
>
> *offset = start_offset;
OK. This already handled DW_FORM_loclistx, now also other loclist
refs.
> diff --git a/libdw/dwarf_getmacros.c b/libdw/dwarf_getmacros.c
> index a3a78884..2667eb45 100644
> --- a/libdw/dwarf_getmacros.c
> +++ b/libdw/dwarf_getmacros.c
> @@ -47,7 +47,15 @@ get_offset_from (Dwarf_Die *die, int name, Dwarf_Word *retp)
> return -1;
>
> /* Offset into the corresponding section. */
> - return INTUSE(dwarf_formudata) (&attr, retp);
> + if (INTUSE(dwarf_formudata) (&attr, retp) != 0)
> + return -1;
> +
> + Dwarf_Off offset;
> + if (INTUSE(dwarf_cu_dwp_section_info) (die->cu, DW_SECT_MACRO, &offset, NULL)
> + != 0)
> + return -1;
> + *retp += offset;
> + return 0;
> }
OK.
> static int
> @@ -131,6 +139,14 @@ get_macinfo_table (Dwarf *dbg, Dwarf_Word macoff, Dwarf_Die *cudie)
> else if (cudie->cu->unit_type == DW_UT_split_compile
> && dbg->sectiondata[IDX_debug_line] != NULL)
> line_offset = 0;
> + if (line_offset != (Dwarf_Off) -1)
> + {
> + Dwarf_Off dwp_offset;
> + if (INTUSE(dwarf_cu_dwp_section_info) (cudie->cu, DW_SECT_LINE,
> + &dwp_offset, NULL) != 0)
> + return NULL;
> + line_offset += dwp_offset;
> + }
OK.
> Dwarf_Macro_Op_Table *table = libdw_alloc (dbg, Dwarf_Macro_Op_Table,
> macinfo_data_size, 1);
> @@ -188,6 +204,14 @@ get_table_for_offset (Dwarf *dbg, Dwarf_Word macoff,
> if (unlikely (INTUSE(dwarf_formudata) (attr, &line_offset) != 0))
> return NULL;
> }
> + if (line_offset != (Dwarf_Off) -1 && cudie != NULL)
> + {
> + Dwarf_Off dwp_offset;
> + if (INTUSE(dwarf_cu_dwp_section_info) (cudie->cu, DW_SECT_LINE,
> + &dwp_offset, NULL) != 0)
> + return NULL;
> + line_offset += dwp_offset;
> + }
>
> uint8_t address_size;
> if (cudie != NULL)
OK.
> diff --git a/libdw/libdwP.h b/libdw/libdwP.h
> index 16355274..bdbf5e5a 100644
> --- a/libdw/libdwP.h
> +++ b/libdw/libdwP.h
> @@ -1111,25 +1111,27 @@ str_offsets_base_off (Dwarf *dbg, Dwarf_CU *cu)
> cu = first_cu;
> }
>
> + Dwarf_Off off = 0;
> if (cu != NULL)
> {
> if (cu->str_off_base == (Dwarf_Off) -1)
> {
> + dwarf_cu_dwp_section_info (cu, DW_SECT_STR_OFFSETS, &off, NULL);
> Dwarf_Die cu_die = CUDIE(cu);
> Dwarf_Attribute attr;
> if (dwarf_attr (&cu_die, DW_AT_str_offsets_base, &attr) != NULL)
> {
> - Dwarf_Word off;
> - if (dwarf_formudata (&attr, &off) == 0)
> + Dwarf_Word base;
> + if (dwarf_formudata (&attr, &base) == 0)
> {
> - cu->str_off_base = off;
> + cu->str_off_base = off + base;
> return cu->str_off_base;
> }
> }
> /* For older DWARF simply assume zero (no header). */
> if (cu->version < 5)
> {
> - cu->str_off_base = 0;
> + cu->str_off_base = off;
> return cu->str_off_base;
> }
>
> @@ -1142,7 +1144,6 @@ str_offsets_base_off (Dwarf *dbg, Dwarf_CU *cu)
>
> /* No str_offsets_base attribute, we have to assume "zero".
> But there could be a header first. */
> - Dwarf_Off off = 0;
> if (dbg == NULL)
> goto no_header;
>
> @@ -1184,7 +1185,7 @@ str_offsets_base_off (Dwarf *dbg, Dwarf_CU *cu)
> /* padding */
> read_2ubyte_unaligned_inc (dbg, readp);
>
> - off = (Dwarf_Off) (readp - start);
> + off += (Dwarf_Off) (readp - start);
>
> no_header:
> if (cu != NULL)
OK, so the dwp section offset gets added to the base attribute offset.
> @@ -1222,18 +1223,22 @@ __libdw_cu_ranges_base (Dwarf_CU *cu)
> }
> else
> {
> + Dwarf_Off dwp_offset = 0;
> + dwarf_cu_dwp_section_info (cu, DW_SECT_RNGLISTS, &dwp_offset, NULL);
Shouldn't we check there wasn't an error?
> + offset = dwp_offset;
> +
> if (dwarf_attr (&cu_die, DW_AT_rnglists_base, &attr) != NULL)
> {
> Dwarf_Word off;
> if (dwarf_formudata (&attr, &off) == 0)
> - offset = off;
> + offset += off;
> }
>
> /* There wasn't an rnglists_base, if the Dwarf does have a
> .debug_rnglists section, then it might be we need the
> base after the first header. */
> Elf_Data *data = cu->dbg->sectiondata[IDX_debug_rnglists];
> - if (offset == 0 && data != NULL)
> + if (offset == dwp_offset && data != NULL)
> {
> Dwarf *dbg = cu->dbg;
> const unsigned char *readp = data->d_buf;
> @@ -1279,8 +1284,8 @@ __libdw_cu_ranges_base (Dwarf_CU *cu)
> if (unit_length - 8 < needed)
> goto no_header;
>
> - offset = (Dwarf_Off) (offset_array_start
> - - (unsigned char *) data->d_buf);
> + offset += (Dwarf_Off) (offset_array_start
> + - (unsigned char *) data->d_buf);
> }
> }
> no_header:
OK, same for ranges.
> @@ -1297,21 +1302,24 @@ __libdw_cu_locs_base (Dwarf_CU *cu)
> {
> if (cu->locs_base == (Dwarf_Off) -1)
> {
> - Dwarf_Off offset = 0;
> + Dwarf_Off dwp_offset = 0;
> + dwarf_cu_dwp_section_info (cu, DW_SECT_LOCLISTS, &dwp_offset, NULL);
No error check?
> + Dwarf_Off offset = dwp_offset;
> +
> Dwarf_Die cu_die = CUDIE(cu);
> Dwarf_Attribute attr;
> if (dwarf_attr (&cu_die, DW_AT_loclists_base, &attr) != NULL)
> {
> Dwarf_Word off;
> if (dwarf_formudata (&attr, &off) == 0)
> - offset = off;
> + offset += off;
> }
>
> /* There wasn't an loclists_base, if the Dwarf does have a
> .debug_loclists section, then it might be we need the
> base after the first header. */
> Elf_Data *data = cu->dbg->sectiondata[IDX_debug_loclists];
> - if (offset == 0 && data != NULL)
> + if (offset == dwp_offset && data != NULL)
> {
> Dwarf *dbg = cu->dbg;
> const unsigned char *readp = data->d_buf;
> @@ -1357,8 +1365,8 @@ __libdw_cu_locs_base (Dwarf_CU *cu)
> if (unit_length - 8 < needed)
> goto no_header;
>
> - offset = (Dwarf_Off) (offset_array_start
> - - (unsigned char *) data->d_buf);
> + offset += (Dwarf_Off) (offset_array_start
> + - (unsigned char *) data->d_buf);
> }
>
> no_header:
OK. Same for loclists.
> diff --git a/tests/ChangeLog b/tests/ChangeLog
> index 97261444..93503f57 100644
> --- a/tests/ChangeLog
> +++ b/tests/ChangeLog
> @@ -1,6 +1,7 @@
> 2023-09-27 Omar Sandoval <osandov@fb.com>
>
> - * run-varlocs.sh: Add entry PC to split units.
> + * run-varlocs.sh: Add entry PC to split units. Check testfile-dwp-5
> + and testfile-dwp-4.
> * Makefile.am (check_PROGRAMS): Add cu-dwp-section-info.
> (TESTS): Add run-cu-dwp-section-info.sh
> (EXTRA_DIST): Add run-cu-dwp-section-info.sh and new test files.
> @@ -20,6 +21,11 @@
> (getmacros): New function.
> (main): If second argument is empty, call getmacros on every unit.
> Otherwise, call getmacros on given unit.
> + * run-all-dwarf-ranges.sh: Check testfile-dwp-5 and testfile-dwp-4.
> + * run-dwarf-getmacros.sh: Check testfile-dwp-5 and
> + testfile-dwp-4-strict.
> + * run-get-units-split.sh: Check testfile-dwp-5, testfile-dwp-4, and
> + testfile-dwp-4-strict.
Nice collection of tests.
Thanks,
Mark
On Thu, Nov 02, 2023 at 11:20:33PM +0100, Mark Wielaard wrote:
> Hi Omar,
>
> On Wed, Sep 27, 2023 at 11:21:02AM -0700, Omar Sandoval wrote:
> > The final piece of DWARF package file support is that offsets have to be
> > interpreted relative to the section offset from the package index.
> > .debug_abbrev.dwo is already covered, so sprinkle around calls to
> > dwarf_cu_dwp_section_info for the remaining sections: .debug_line.dwo,
> > .debug_loclists.dwo/.debug_loc.dwo, .debug_str_offsets.dwo,
> > .debug_macro.dwo/.debug_macinfo.dwo, and .debug_rnglists.dwo. With all
> > of that in place, we can finally test various libdw functions on dwp
> > files.
>
> This looks good, but obviously needs some earlier patches.
[snip]
> > @@ -1222,18 +1223,22 @@ __libdw_cu_ranges_base (Dwarf_CU *cu)
> > }
> > else
> > {
> > + Dwarf_Off dwp_offset = 0;
> > + dwarf_cu_dwp_section_info (cu, DW_SECT_RNGLISTS, &dwp_offset, NULL);
>
> Shouldn't we check there wasn't an error?
Yeah, I was a little confused by the error handling in these foo_base
functions. It doesn't seem like most of the callers are checking for
errors. The foo_base functions also seem to be treating invalid
attributes as if they don't exist (e.g., when dwarf_formudata returns an
error):
if (dwarf_attr (&cu_die, DW_AT_rnglists_base, &attr) != NULL)
{
Dwarf_Word off;
if (dwarf_formudata (&attr, &off) == 0)
offset += off;
}
So I suppose the equivalent for this change would be
Dwarf_Off dwp_offset = 0;
if (dwarf_cu_dwp_section_info (cu, DW_SECT_RNGLISTS, &dwp_offset, NULL) == 0)
offset = dwp_offset;
[snip]
Thanks!
@@ -12,10 +12,13 @@
* dwarf_getmacros.c (get_macinfo_table): Replace assignment of
table->is_64bit with assignments of table->address_size and
table->offset_size. Assume default DW_AT_stmt_list of 0 for split
- DWARF. Set table->dbg.
+ DWARF. Set table->dbg. Call dwarf_cu_dwp_section_info and add offset
+ to line_offset.
(get_table_for_offset): Ditto.
(read_macros): Get fake CU offset_size from table->offset_size instead
of table->is_64bit.
+ (get_offset_from): Call dwarf_cu_dwp_section_info and add offset to
+ *retp.
* dwarf_macro_getsrcfiles.c (dwarf_macro_getsrcfiles): Get
address_size for __libdw_getsrclines from table->address_size instead
of table->is_64bit. Get dbg for __libdw_getsrclines from table->dbg
@@ -36,6 +39,9 @@
(__libdw_set_debugdir): New declaration.
(__libdw_dwp_findcu_id): New declaration.
(__libdw_link_skel_split): Handle .debug_addr for dwp.
+ (str_offsets_base_off): Call dwarf_cu_dwp_section_info and add offset.
+ (__libdw_cu_ranges_base): Ditto.
+ (__libdw_cu_locs_base): Ditto.
* dwarf_begin_elf.c (dwarf_scnnames): Add IDX_debug_cu_index and
IDX_debug_tu_index.
(scn_to_string_section_idx): Ditto.
@@ -60,6 +66,8 @@
__libdw_dwp_find_unit, and use it to adjust abbrev_offset and assign
newp->dwp_row.
* dwarf_cu_dwp_section_info.c: New file.
+ * dwarf_getlocation.c (initial_offset): Call dwarf_cu_dwp_section_info
+ and add offset to start_offset.
2023-02-22 Mark Wielaard <mark@klomp.org>
@@ -812,6 +812,12 @@ initial_offset (Dwarf_Attribute *attr, ptrdiff_t *offset)
: DWARF_E_NO_DEBUG_LOCLISTS),
NULL, &start_offset) == NULL)
return -1;
+
+ Dwarf_Off loc_off;
+ if (INTUSE(dwarf_cu_dwp_section_info) (attr->cu, DW_SECT_LOCLISTS,
+ &loc_off, NULL) != 0)
+ return -1;
+ start_offset += loc_off;
}
*offset = start_offset;
@@ -47,7 +47,15 @@ get_offset_from (Dwarf_Die *die, int name, Dwarf_Word *retp)
return -1;
/* Offset into the corresponding section. */
- return INTUSE(dwarf_formudata) (&attr, retp);
+ if (INTUSE(dwarf_formudata) (&attr, retp) != 0)
+ return -1;
+
+ Dwarf_Off offset;
+ if (INTUSE(dwarf_cu_dwp_section_info) (die->cu, DW_SECT_MACRO, &offset, NULL)
+ != 0)
+ return -1;
+ *retp += offset;
+ return 0;
}
static int
@@ -131,6 +139,14 @@ get_macinfo_table (Dwarf *dbg, Dwarf_Word macoff, Dwarf_Die *cudie)
else if (cudie->cu->unit_type == DW_UT_split_compile
&& dbg->sectiondata[IDX_debug_line] != NULL)
line_offset = 0;
+ if (line_offset != (Dwarf_Off) -1)
+ {
+ Dwarf_Off dwp_offset;
+ if (INTUSE(dwarf_cu_dwp_section_info) (cudie->cu, DW_SECT_LINE,
+ &dwp_offset, NULL) != 0)
+ return NULL;
+ line_offset += dwp_offset;
+ }
Dwarf_Macro_Op_Table *table = libdw_alloc (dbg, Dwarf_Macro_Op_Table,
macinfo_data_size, 1);
@@ -188,6 +204,14 @@ get_table_for_offset (Dwarf *dbg, Dwarf_Word macoff,
if (unlikely (INTUSE(dwarf_formudata) (attr, &line_offset) != 0))
return NULL;
}
+ if (line_offset != (Dwarf_Off) -1 && cudie != NULL)
+ {
+ Dwarf_Off dwp_offset;
+ if (INTUSE(dwarf_cu_dwp_section_info) (cudie->cu, DW_SECT_LINE,
+ &dwp_offset, NULL) != 0)
+ return NULL;
+ line_offset += dwp_offset;
+ }
uint8_t address_size;
if (cudie != NULL)
@@ -1111,25 +1111,27 @@ str_offsets_base_off (Dwarf *dbg, Dwarf_CU *cu)
cu = first_cu;
}
+ Dwarf_Off off = 0;
if (cu != NULL)
{
if (cu->str_off_base == (Dwarf_Off) -1)
{
+ dwarf_cu_dwp_section_info (cu, DW_SECT_STR_OFFSETS, &off, NULL);
Dwarf_Die cu_die = CUDIE(cu);
Dwarf_Attribute attr;
if (dwarf_attr (&cu_die, DW_AT_str_offsets_base, &attr) != NULL)
{
- Dwarf_Word off;
- if (dwarf_formudata (&attr, &off) == 0)
+ Dwarf_Word base;
+ if (dwarf_formudata (&attr, &base) == 0)
{
- cu->str_off_base = off;
+ cu->str_off_base = off + base;
return cu->str_off_base;
}
}
/* For older DWARF simply assume zero (no header). */
if (cu->version < 5)
{
- cu->str_off_base = 0;
+ cu->str_off_base = off;
return cu->str_off_base;
}
@@ -1142,7 +1144,6 @@ str_offsets_base_off (Dwarf *dbg, Dwarf_CU *cu)
/* No str_offsets_base attribute, we have to assume "zero".
But there could be a header first. */
- Dwarf_Off off = 0;
if (dbg == NULL)
goto no_header;
@@ -1184,7 +1185,7 @@ str_offsets_base_off (Dwarf *dbg, Dwarf_CU *cu)
/* padding */
read_2ubyte_unaligned_inc (dbg, readp);
- off = (Dwarf_Off) (readp - start);
+ off += (Dwarf_Off) (readp - start);
no_header:
if (cu != NULL)
@@ -1222,18 +1223,22 @@ __libdw_cu_ranges_base (Dwarf_CU *cu)
}
else
{
+ Dwarf_Off dwp_offset = 0;
+ dwarf_cu_dwp_section_info (cu, DW_SECT_RNGLISTS, &dwp_offset, NULL);
+ offset = dwp_offset;
+
if (dwarf_attr (&cu_die, DW_AT_rnglists_base, &attr) != NULL)
{
Dwarf_Word off;
if (dwarf_formudata (&attr, &off) == 0)
- offset = off;
+ offset += off;
}
/* There wasn't an rnglists_base, if the Dwarf does have a
.debug_rnglists section, then it might be we need the
base after the first header. */
Elf_Data *data = cu->dbg->sectiondata[IDX_debug_rnglists];
- if (offset == 0 && data != NULL)
+ if (offset == dwp_offset && data != NULL)
{
Dwarf *dbg = cu->dbg;
const unsigned char *readp = data->d_buf;
@@ -1279,8 +1284,8 @@ __libdw_cu_ranges_base (Dwarf_CU *cu)
if (unit_length - 8 < needed)
goto no_header;
- offset = (Dwarf_Off) (offset_array_start
- - (unsigned char *) data->d_buf);
+ offset += (Dwarf_Off) (offset_array_start
+ - (unsigned char *) data->d_buf);
}
}
no_header:
@@ -1297,21 +1302,24 @@ __libdw_cu_locs_base (Dwarf_CU *cu)
{
if (cu->locs_base == (Dwarf_Off) -1)
{
- Dwarf_Off offset = 0;
+ Dwarf_Off dwp_offset = 0;
+ dwarf_cu_dwp_section_info (cu, DW_SECT_LOCLISTS, &dwp_offset, NULL);
+ Dwarf_Off offset = dwp_offset;
+
Dwarf_Die cu_die = CUDIE(cu);
Dwarf_Attribute attr;
if (dwarf_attr (&cu_die, DW_AT_loclists_base, &attr) != NULL)
{
Dwarf_Word off;
if (dwarf_formudata (&attr, &off) == 0)
- offset = off;
+ offset += off;
}
/* There wasn't an loclists_base, if the Dwarf does have a
.debug_loclists section, then it might be we need the
base after the first header. */
Elf_Data *data = cu->dbg->sectiondata[IDX_debug_loclists];
- if (offset == 0 && data != NULL)
+ if (offset == dwp_offset && data != NULL)
{
Dwarf *dbg = cu->dbg;
const unsigned char *readp = data->d_buf;
@@ -1357,8 +1365,8 @@ __libdw_cu_locs_base (Dwarf_CU *cu)
if (unit_length - 8 < needed)
goto no_header;
- offset = (Dwarf_Off) (offset_array_start
- - (unsigned char *) data->d_buf);
+ offset += (Dwarf_Off) (offset_array_start
+ - (unsigned char *) data->d_buf);
}
no_header:
@@ -1,6 +1,7 @@
2023-09-27 Omar Sandoval <osandov@fb.com>
- * run-varlocs.sh: Add entry PC to split units.
+ * run-varlocs.sh: Add entry PC to split units. Check testfile-dwp-5
+ and testfile-dwp-4.
* Makefile.am (check_PROGRAMS): Add cu-dwp-section-info.
(TESTS): Add run-cu-dwp-section-info.sh
(EXTRA_DIST): Add run-cu-dwp-section-info.sh and new test files.
@@ -20,6 +21,11 @@
(getmacros): New function.
(main): If second argument is empty, call getmacros on every unit.
Otherwise, call getmacros on given unit.
+ * run-all-dwarf-ranges.sh: Check testfile-dwp-5 and testfile-dwp-4.
+ * run-dwarf-getmacros.sh: Check testfile-dwp-5 and
+ testfile-dwp-4-strict.
+ * run-get-units-split.sh: Check testfile-dwp-5, testfile-dwp-4, and
+ testfile-dwp-4-strict.
2023-04-21 Frank Ch. Eigler <fche@redhat.com>
@@ -126,4 +126,118 @@ die: no_subject (2e)
EOF
+# See testfile-dwp.source.
+testfiles testfile-dwp-5 testfile-dwp-5.dwp
+testfiles testfile-dwp-4 testfile-dwp-4.dwp
+
+testrun_compare ${abs_builddir}/all-dwarf-ranges testfile-dwp-5 << EOF
+die: foo.cc (11)
+ 401190..401200
+
+die: foo (2e)
+ 4011c0..401200
+
+die: x_x (1d)
+ 4011cb..4011eb
+ 4011f8..401200
+
+die: <unknown> (b)
+ 4011cb..4011eb
+ 4011f8..401200
+
+die: x_x (2e)
+ 401190..4011bd
+
+die: <unknown> (b)
+ 401190..401190
+ 401192..4011bb
+
+die: bar.cc (11)
+ 401200..40121b
+
+die: bar (2e)
+ 401200..40121b
+
+die: main.cc (11)
+ 401020..4010a0
+
+die: main (2e)
+ 401020..4010a0
+
+die: fibonacci (1d)
+ 401030..401032
+ 401036..401060
+ 401099..4010a0
+
+die: fibonacci (1d)
+ 40103a..401060
+ 401099..4010a0
+
+die: <unknown> (b)
+ 40103a..401060
+ 401099..4010a0
+
+die: <unknown> (b)
+ 40103a..401044
+ 401050..401060
+
+die: <unknown> (b)
+ 401050..401053
+ 401056..401059
+
+EOF
+
+testrun_compare ${abs_builddir}/all-dwarf-ranges testfile-dwp-4 << EOF
+die: foo.cc (11)
+ 401190..401200
+
+die: foo (2e)
+ 4011c0..401200
+
+die: x_x (1d)
+ 4011cb..4011eb
+ 4011f8..401200
+
+die: <unknown> (b)
+ 4011cb..4011eb
+ 4011f8..401200
+
+die: x_x (2e)
+ 401190..4011bd
+
+die: bar.cc (11)
+ 401200..40121b
+
+die: bar (2e)
+ 401200..40121b
+
+die: main.cc (11)
+ 401020..4010a0
+
+die: main (2e)
+ 401020..4010a0
+
+die: fibonacci (1d)
+ 401030..401032
+ 401036..401060
+ 401099..4010a0
+
+die: fibonacci (1d)
+ 40103a..401060
+ 401099..4010a0
+
+die: <unknown> (b)
+ 40103a..401060
+ 401099..4010a0
+
+die: <unknown> (b)
+ 40103a..401044
+ 401050..401060
+
+die: <unknown> (b)
+ 401050..401053
+ 401056..401059
+
+EOF
+
exit 0
@@ -707,4 +707,1416 @@ file /home/petr/proj/elfutils/master/elfutils/x.c
/file
EOF
+# See testfile-dwp.source.
+testfiles testfile-dwp-5 testfile-dwp-5.dwp
+testfiles testfile-dwp-4-strict testfile-dwp-4-strict.dwp
+
+# Not testfile-dwp-4 because it's unclear what to do about
+# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99319.
+for file in testfile-dwp-5 testfile-dwp-4-strict; do
+ testrun_compare ${abs_builddir}/dwarf-getmacros "$file" '' '' << EOF
+CU foo.cc
+__STDC__ 1
+__cplusplus 201703L
+__STDC_UTF_16__ 1
+__STDC_UTF_32__ 1
+__STDC_HOSTED__ 1
+__GNUC__ 14
+__GNUC_MINOR__ 0
+__GNUC_PATCHLEVEL__ 0
+__VERSION__ "14.0.0 20230920 (experimental)"
+__ATOMIC_RELAXED 0
+__ATOMIC_SEQ_CST 5
+__ATOMIC_ACQUIRE 2
+__ATOMIC_RELEASE 3
+__ATOMIC_ACQ_REL 4
+__ATOMIC_CONSUME 1
+__OPTIMIZE__ 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
+__GNUC_EXECUTION_CHARSET_NAME "UTF-8"
+__GNUC_WIDE_EXECUTION_CHARSET_NAME "UTF-32LE"
+__GNUG__ 14
+__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_WEAK__ 1
+__DEPRECATED 1
+__GXX_RTTI 1
+__cpp_rtti 199711L
+__GXX_EXPERIMENTAL_CXX0X__ 1
+__cpp_binary_literals 201304L
+__cpp_hex_float 201603L
+__cpp_runtime_arrays 198712L
+__cpp_raw_strings 200710L
+__cpp_unicode_literals 200710L
+__cpp_user_defined_literals 200809L
+__cpp_lambdas 200907L
+__cpp_decltype 200707L
+__cpp_attributes 200809L
+__cpp_rvalue_reference 200610L
+__cpp_rvalue_references 200610L
+__cpp_variadic_templates 200704L
+__cpp_initializer_lists 200806L
+__cpp_delegating_constructors 200604L
+__cpp_nsdmi 200809L
+__cpp_inheriting_constructors 201511L
+__cpp_ref_qualifiers 200710L
+__cpp_alias_templates 200704L
+__cpp_return_type_deduction 201304L
+__cpp_init_captures 201304L
+__cpp_generic_lambdas 201304L
+__cpp_decltype_auto 201304L
+__cpp_aggregate_nsdmi 201304L
+__cpp_variable_templates 201304L
+__cpp_digit_separators 201309L
+__cpp_unicode_characters 201411L
+__cpp_static_assert 201411L
+__cpp_namespace_attributes 201411L
+__cpp_enumerator_attributes 201411L
+__cpp_nested_namespace_definitions 201411L
+__cpp_fold_expressions 201603L
+__cpp_nontype_template_args 201411L
+__cpp_range_based_for 201603L
+__cpp_constexpr 201603L
+__cpp_if_constexpr 201606L
+__cpp_capture_star_this 201603L
+__cpp_inline_variables 201606L
+__cpp_aggregate_bases 201603L
+__cpp_deduction_guides 201703L
+__cpp_noexcept_function_type 201510L
+__cpp_template_auto 201606L
+__cpp_structured_bindings 201606L
+__cpp_variadic_using 201611L
+__cpp_guaranteed_copy_elision 201606L
+__cpp_nontype_template_parameter_auto 201606L
+__cpp_sized_deallocation 201309L
+__cpp_aligned_new 201606L
+__STDCPP_DEFAULT_NEW_ALIGNMENT__ 16
+__cpp_template_template_args 201611L
+__cpp_threadsafe_static_init 200806L
+__STDCPP_THREADS__ 1
+__EXCEPTIONS 1
+__cpp_exceptions 199711L
+__GXX_ABI_VERSION 1019
+__SCHAR_MAX__ 0x7f
+__SHRT_MAX__ 0x7fff
+__INT_MAX__ 0x7fffffff
+__LONG_MAX__ 0x7fffffffffffffffL
+__LONG_LONG_MAX__ 0x7fffffffffffffffLL
+__WCHAR_MAX__ 0x7fffffff
+__WCHAR_MIN__ (-__WCHAR_MAX__ - 1)
+__WINT_MAX__ 0xffffffffU
+__WINT_MIN__ 0U
+__PTRDIFF_MAX__ 0x7fffffffffffffffL
+__SIZE_MAX__ 0xffffffffffffffffUL
+__SCHAR_WIDTH__ 8
+__SHRT_WIDTH__ 16
+__INT_WIDTH__ 32
+__LONG_WIDTH__ 64
+__LONG_LONG_WIDTH__ 64
+__WCHAR_WIDTH__ 32
+__WINT_WIDTH__ 32
+__PTRDIFF_WIDTH__ 64
+__SIZE_WIDTH__ 64
+__GLIBCXX_TYPE_INT_N_0 __int128
+__GLIBCXX_BITSIZE_INT_N_0 128
+__INTMAX_MAX__ 0x7fffffffffffffffL
+__INTMAX_C(c) c ## L
+__UINTMAX_MAX__ 0xffffffffffffffffUL
+__UINTMAX_C(c) c ## UL
+__INTMAX_WIDTH__ 64
+__SIG_ATOMIC_MAX__ 0x7fffffff
+__SIG_ATOMIC_MIN__ (-__SIG_ATOMIC_MAX__ - 1)
+__SIG_ATOMIC_WIDTH__ 32
+__INT8_MAX__ 0x7f
+__INT16_MAX__ 0x7fff
+__INT32_MAX__ 0x7fffffff
+__INT64_MAX__ 0x7fffffffffffffffL
+__UINT8_MAX__ 0xff
+__UINT16_MAX__ 0xffff
+__UINT32_MAX__ 0xffffffffU
+__UINT64_MAX__ 0xffffffffffffffffUL
+__INT_LEAST8_MAX__ 0x7f
+__INT8_C(c) c
+__INT_LEAST8_WIDTH__ 8
+__INT_LEAST16_MAX__ 0x7fff
+__INT16_C(c) c
+__INT_LEAST16_WIDTH__ 16
+__INT_LEAST32_MAX__ 0x7fffffff
+__INT32_C(c) c
+__INT_LEAST32_WIDTH__ 32
+__INT_LEAST64_MAX__ 0x7fffffffffffffffL
+__INT64_C(c) c ## L
+__INT_LEAST64_WIDTH__ 64
+__UINT_LEAST8_MAX__ 0xff
+__UINT8_C(c) c
+__UINT_LEAST16_MAX__ 0xffff
+__UINT16_C(c) c
+__UINT_LEAST32_MAX__ 0xffffffffU
+__UINT32_C(c) c ## U
+__UINT_LEAST64_MAX__ 0xffffffffffffffffUL
+__UINT64_C(c) c ## UL
+__INT_FAST8_MAX__ 0x7f
+__INT_FAST8_WIDTH__ 8
+__INT_FAST16_MAX__ 0x7fffffffffffffffL
+__INT_FAST16_WIDTH__ 64
+__INT_FAST32_MAX__ 0x7fffffffffffffffL
+__INT_FAST32_WIDTH__ 64
+__INT_FAST64_MAX__ 0x7fffffffffffffffL
+__INT_FAST64_WIDTH__ 64
+__UINT_FAST8_MAX__ 0xff
+__UINT_FAST16_MAX__ 0xffffffffffffffffUL
+__UINT_FAST32_MAX__ 0xffffffffffffffffUL
+__UINT_FAST64_MAX__ 0xffffffffffffffffUL
+__INTPTR_MAX__ 0x7fffffffffffffffL
+__INTPTR_WIDTH__ 64
+__UINTPTR_MAX__ 0xffffffffffffffffUL
+__GCC_IEC_559 2
+__GCC_IEC_559_COMPLEX 2
+__FLT_EVAL_METHOD__ 0
+__FLT_EVAL_METHOD_TS_18661_3__ 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.40282346638528859811704183484516925e+38F
+__FLT_NORM_MAX__ 3.40282346638528859811704183484516925e+38F
+__FLT_MIN__ 1.17549435082228750796873653722224568e-38F
+__FLT_EPSILON__ 1.19209289550781250000000000000000000e-7F
+__FLT_DENORM_MIN__ 1.40129846432481707092372958328991613e-45F
+__FLT_HAS_DENORM__ 1
+__FLT_HAS_INFINITY__ 1
+__FLT_HAS_QUIET_NAN__ 1
+__FLT_IS_IEC_60559__ 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.79769313486231570814527423731704357e+308L)
+__DBL_NORM_MAX__ double(1.79769313486231570814527423731704357e+308L)
+__DBL_MIN__ double(2.22507385850720138309023271733240406e-308L)
+__DBL_EPSILON__ double(2.22044604925031308084726333618164062e-16L)
+__DBL_DENORM_MIN__ double(4.94065645841246544176568792868221372e-324L)
+__DBL_HAS_DENORM__ 1
+__DBL_HAS_INFINITY__ 1
+__DBL_HAS_QUIET_NAN__ 1
+__DBL_IS_IEC_60559__ 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_DECIMAL_DIG__ 21
+__LDBL_MAX__ 1.18973149535723176502126385303097021e+4932L
+__LDBL_NORM_MAX__ 1.18973149535723176502126385303097021e+4932L
+__LDBL_MIN__ 3.36210314311209350626267781732175260e-4932L
+__LDBL_EPSILON__ 1.08420217248550443400745280086994171e-19L
+__LDBL_DENORM_MIN__ 3.64519953188247460252840593361941982e-4951L
+__LDBL_HAS_DENORM__ 1
+__LDBL_HAS_INFINITY__ 1
+__LDBL_HAS_QUIET_NAN__ 1
+__LDBL_IS_IEC_60559__ 1
+__FLT16_MANT_DIG__ 11
+__FLT16_DIG__ 3
+__FLT16_MIN_EXP__ (-13)
+__FLT16_MIN_10_EXP__ (-4)
+__FLT16_MAX_EXP__ 16
+__FLT16_MAX_10_EXP__ 4
+__FLT16_DECIMAL_DIG__ 5
+__FLT16_MAX__ 6.55040000000000000000000000000000000e+4F16
+__FLT16_NORM_MAX__ 6.55040000000000000000000000000000000e+4F16
+__FLT16_MIN__ 6.10351562500000000000000000000000000e-5F16
+__FLT16_EPSILON__ 9.76562500000000000000000000000000000e-4F16
+__FLT16_DENORM_MIN__ 5.96046447753906250000000000000000000e-8F16
+__FLT16_HAS_DENORM__ 1
+__FLT16_HAS_INFINITY__ 1
+__FLT16_HAS_QUIET_NAN__ 1
+__FLT16_IS_IEC_60559__ 1
+__FLT32_MANT_DIG__ 24
+__FLT32_DIG__ 6
+__FLT32_MIN_EXP__ (-125)
+__FLT32_MIN_10_EXP__ (-37)
+__FLT32_MAX_EXP__ 128
+__FLT32_MAX_10_EXP__ 38
+__FLT32_DECIMAL_DIG__ 9
+__FLT32_MAX__ 3.40282346638528859811704183484516925e+38F32
+__FLT32_NORM_MAX__ 3.40282346638528859811704183484516925e+38F32
+__FLT32_MIN__ 1.17549435082228750796873653722224568e-38F32
+__FLT32_EPSILON__ 1.19209289550781250000000000000000000e-7F32
+__FLT32_DENORM_MIN__ 1.40129846432481707092372958328991613e-45F32
+__FLT32_HAS_DENORM__ 1
+__FLT32_HAS_INFINITY__ 1
+__FLT32_HAS_QUIET_NAN__ 1
+__FLT32_IS_IEC_60559__ 1
+__FLT64_MANT_DIG__ 53
+__FLT64_DIG__ 15
+__FLT64_MIN_EXP__ (-1021)
+__FLT64_MIN_10_EXP__ (-307)
+__FLT64_MAX_EXP__ 1024
+__FLT64_MAX_10_EXP__ 308
+__FLT64_DECIMAL_DIG__ 17
+__FLT64_MAX__ 1.79769313486231570814527423731704357e+308F64
+__FLT64_NORM_MAX__ 1.79769313486231570814527423731704357e+308F64
+__FLT64_MIN__ 2.22507385850720138309023271733240406e-308F64
+__FLT64_EPSILON__ 2.22044604925031308084726333618164062e-16F64
+__FLT64_DENORM_MIN__ 4.94065645841246544176568792868221372e-324F64
+__FLT64_HAS_DENORM__ 1
+__FLT64_HAS_INFINITY__ 1
+__FLT64_HAS_QUIET_NAN__ 1
+__FLT64_IS_IEC_60559__ 1
+__FLT128_MANT_DIG__ 113
+__FLT128_DIG__ 33
+__FLT128_MIN_EXP__ (-16381)
+__FLT128_MIN_10_EXP__ (-4931)
+__FLT128_MAX_EXP__ 16384
+__FLT128_MAX_10_EXP__ 4932
+__FLT128_DECIMAL_DIG__ 36
+__FLT128_MAX__ 1.18973149535723176508575932662800702e+4932F128
+__FLT128_NORM_MAX__ 1.18973149535723176508575932662800702e+4932F128
+__FLT128_MIN__ 3.36210314311209350626267781732175260e-4932F128
+__FLT128_EPSILON__ 1.92592994438723585305597794258492732e-34F128
+__FLT128_DENORM_MIN__ 6.47517511943802511092443895822764655e-4966F128
+__FLT128_HAS_DENORM__ 1
+__FLT128_HAS_INFINITY__ 1
+__FLT128_HAS_QUIET_NAN__ 1
+__FLT128_IS_IEC_60559__ 1
+__FLT32X_MANT_DIG__ 53
+__FLT32X_DIG__ 15
+__FLT32X_MIN_EXP__ (-1021)
+__FLT32X_MIN_10_EXP__ (-307)
+__FLT32X_MAX_EXP__ 1024
+__FLT32X_MAX_10_EXP__ 308
+__FLT32X_DECIMAL_DIG__ 17
+__FLT32X_MAX__ 1.79769313486231570814527423731704357e+308F32x
+__FLT32X_NORM_MAX__ 1.79769313486231570814527423731704357e+308F32x
+__FLT32X_MIN__ 2.22507385850720138309023271733240406e-308F32x
+__FLT32X_EPSILON__ 2.22044604925031308084726333618164062e-16F32x
+__FLT32X_DENORM_MIN__ 4.94065645841246544176568792868221372e-324F32x
+__FLT32X_HAS_DENORM__ 1
+__FLT32X_HAS_INFINITY__ 1
+__FLT32X_HAS_QUIET_NAN__ 1
+__FLT32X_IS_IEC_60559__ 1
+__FLT64X_MANT_DIG__ 64
+__FLT64X_DIG__ 18
+__FLT64X_MIN_EXP__ (-16381)
+__FLT64X_MIN_10_EXP__ (-4931)
+__FLT64X_MAX_EXP__ 16384
+__FLT64X_MAX_10_EXP__ 4932
+__FLT64X_DECIMAL_DIG__ 21
+__FLT64X_MAX__ 1.18973149535723176502126385303097021e+4932F64x
+__FLT64X_NORM_MAX__ 1.18973149535723176502126385303097021e+4932F64x
+__FLT64X_MIN__ 3.36210314311209350626267781732175260e-4932F64x
+__FLT64X_EPSILON__ 1.08420217248550443400745280086994171e-19F64x
+__FLT64X_DENORM_MIN__ 3.64519953188247460252840593361941982e-4951F64x
+__FLT64X_HAS_DENORM__ 1
+__FLT64X_HAS_INFINITY__ 1
+__FLT64X_HAS_QUIET_NAN__ 1
+__FLT64X_IS_IEC_60559__ 1
+__BFLT16_MANT_DIG__ 8
+__BFLT16_DIG__ 2
+__BFLT16_MIN_EXP__ (-125)
+__BFLT16_MIN_10_EXP__ (-37)
+__BFLT16_MAX_EXP__ 128
+__BFLT16_MAX_10_EXP__ 38
+__BFLT16_DECIMAL_DIG__ 4
+__BFLT16_MAX__ 3.38953138925153547590470800371487867e+38BF16
+__BFLT16_NORM_MAX__ 3.38953138925153547590470800371487867e+38BF16
+__BFLT16_MIN__ 1.17549435082228750796873653722224568e-38BF16
+__BFLT16_EPSILON__ 7.81250000000000000000000000000000000e-3BF16
+__BFLT16_DENORM_MIN__ 9.18354961579912115600575419704879436e-41BF16
+__BFLT16_HAS_DENORM__ 1
+__BFLT16_HAS_INFINITY__ 1
+__BFLT16_HAS_QUIET_NAN__ 1
+__BFLT16_IS_IEC_60559__ 0
+__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_STDC_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_DESTRUCTIVE_SIZE 64
+__GCC_CONSTRUCTIVE_SIZE 64
+__GCC_ATOMIC_POINTER_LOCK_FREE 2
+__HAVE_SPECULATION_SAFE_VALUE 1
+__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
+__SIZEOF_FLOAT80__ 16
+__SIZEOF_FLOAT128__ 16
+__ATOMIC_HLE_ACQUIRE 65536
+__ATOMIC_HLE_RELEASE 131072
+__GCC_ASM_FLAG_OUTPUTS__ 1
+__k8 1
+__k8__ 1
+__code_model_small__ 1
+__MMX__ 1
+__SSE__ 1
+__SSE2__ 1
+__FXSR__ 1
+__SSE_MATH__ 1
+__SSE2_MATH__ 1
+__MMX_WITH_SSE__ 1
+__SEG_FS 1
+__SEG_GS 1
+__gnu_linux__ 1
+__linux 1
+__linux__ 1
+linux 1
+__unix 1
+__unix__ 1
+unix 1
+__ELF__ 1
+__DECIMAL_BID_FORMAT__ 1
+_GNU_SOURCE 1
+file /home/osandov/src/elfutils/tests/foo.cc
+ file /usr/include/stdc-predef.h
+ _STDC_PREDEF_H 1
+ __STDC_IEC_559__ 1
+ __STDC_IEC_60559_BFP__ 201404L
+ __STDC_IEC_559_COMPLEX__ 1
+ __STDC_IEC_60559_COMPLEX__ 201404L
+ __STDC_ISO_10646__ 201706L
+ /file
+ file /home/osandov/src/elfutils/tests/foobar.h
+ FROB(x) ((x) ^ 0x2a2a2a2a)
+ FRY(x) ((x) * 0x100000001b3)
+ /file
+ ZERO() (1 - 1)
+/file
+CU bar.cc
+__STDC__ 1
+__cplusplus 201703L
+__STDC_UTF_16__ 1
+__STDC_UTF_32__ 1
+__STDC_HOSTED__ 1
+__GNUC__ 14
+__GNUC_MINOR__ 0
+__GNUC_PATCHLEVEL__ 0
+__VERSION__ "14.0.0 20230920 (experimental)"
+__ATOMIC_RELAXED 0
+__ATOMIC_SEQ_CST 5
+__ATOMIC_ACQUIRE 2
+__ATOMIC_RELEASE 3
+__ATOMIC_ACQ_REL 4
+__ATOMIC_CONSUME 1
+__OPTIMIZE__ 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
+__GNUC_EXECUTION_CHARSET_NAME "UTF-8"
+__GNUC_WIDE_EXECUTION_CHARSET_NAME "UTF-32LE"
+__GNUG__ 14
+__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_WEAK__ 1
+__DEPRECATED 1
+__GXX_RTTI 1
+__cpp_rtti 199711L
+__GXX_EXPERIMENTAL_CXX0X__ 1
+__cpp_binary_literals 201304L
+__cpp_hex_float 201603L
+__cpp_runtime_arrays 198712L
+__cpp_raw_strings 200710L
+__cpp_unicode_literals 200710L
+__cpp_user_defined_literals 200809L
+__cpp_lambdas 200907L
+__cpp_decltype 200707L
+__cpp_attributes 200809L
+__cpp_rvalue_reference 200610L
+__cpp_rvalue_references 200610L
+__cpp_variadic_templates 200704L
+__cpp_initializer_lists 200806L
+__cpp_delegating_constructors 200604L
+__cpp_nsdmi 200809L
+__cpp_inheriting_constructors 201511L
+__cpp_ref_qualifiers 200710L
+__cpp_alias_templates 200704L
+__cpp_return_type_deduction 201304L
+__cpp_init_captures 201304L
+__cpp_generic_lambdas 201304L
+__cpp_decltype_auto 201304L
+__cpp_aggregate_nsdmi 201304L
+__cpp_variable_templates 201304L
+__cpp_digit_separators 201309L
+__cpp_unicode_characters 201411L
+__cpp_static_assert 201411L
+__cpp_namespace_attributes 201411L
+__cpp_enumerator_attributes 201411L
+__cpp_nested_namespace_definitions 201411L
+__cpp_fold_expressions 201603L
+__cpp_nontype_template_args 201411L
+__cpp_range_based_for 201603L
+__cpp_constexpr 201603L
+__cpp_if_constexpr 201606L
+__cpp_capture_star_this 201603L
+__cpp_inline_variables 201606L
+__cpp_aggregate_bases 201603L
+__cpp_deduction_guides 201703L
+__cpp_noexcept_function_type 201510L
+__cpp_template_auto 201606L
+__cpp_structured_bindings 201606L
+__cpp_variadic_using 201611L
+__cpp_guaranteed_copy_elision 201606L
+__cpp_nontype_template_parameter_auto 201606L
+__cpp_sized_deallocation 201309L
+__cpp_aligned_new 201606L
+__STDCPP_DEFAULT_NEW_ALIGNMENT__ 16
+__cpp_template_template_args 201611L
+__cpp_threadsafe_static_init 200806L
+__STDCPP_THREADS__ 1
+__EXCEPTIONS 1
+__cpp_exceptions 199711L
+__GXX_ABI_VERSION 1019
+__SCHAR_MAX__ 0x7f
+__SHRT_MAX__ 0x7fff
+__INT_MAX__ 0x7fffffff
+__LONG_MAX__ 0x7fffffffffffffffL
+__LONG_LONG_MAX__ 0x7fffffffffffffffLL
+__WCHAR_MAX__ 0x7fffffff
+__WCHAR_MIN__ (-__WCHAR_MAX__ - 1)
+__WINT_MAX__ 0xffffffffU
+__WINT_MIN__ 0U
+__PTRDIFF_MAX__ 0x7fffffffffffffffL
+__SIZE_MAX__ 0xffffffffffffffffUL
+__SCHAR_WIDTH__ 8
+__SHRT_WIDTH__ 16
+__INT_WIDTH__ 32
+__LONG_WIDTH__ 64
+__LONG_LONG_WIDTH__ 64
+__WCHAR_WIDTH__ 32
+__WINT_WIDTH__ 32
+__PTRDIFF_WIDTH__ 64
+__SIZE_WIDTH__ 64
+__GLIBCXX_TYPE_INT_N_0 __int128
+__GLIBCXX_BITSIZE_INT_N_0 128
+__INTMAX_MAX__ 0x7fffffffffffffffL
+__INTMAX_C(c) c ## L
+__UINTMAX_MAX__ 0xffffffffffffffffUL
+__UINTMAX_C(c) c ## UL
+__INTMAX_WIDTH__ 64
+__SIG_ATOMIC_MAX__ 0x7fffffff
+__SIG_ATOMIC_MIN__ (-__SIG_ATOMIC_MAX__ - 1)
+__SIG_ATOMIC_WIDTH__ 32
+__INT8_MAX__ 0x7f
+__INT16_MAX__ 0x7fff
+__INT32_MAX__ 0x7fffffff
+__INT64_MAX__ 0x7fffffffffffffffL
+__UINT8_MAX__ 0xff
+__UINT16_MAX__ 0xffff
+__UINT32_MAX__ 0xffffffffU
+__UINT64_MAX__ 0xffffffffffffffffUL
+__INT_LEAST8_MAX__ 0x7f
+__INT8_C(c) c
+__INT_LEAST8_WIDTH__ 8
+__INT_LEAST16_MAX__ 0x7fff
+__INT16_C(c) c
+__INT_LEAST16_WIDTH__ 16
+__INT_LEAST32_MAX__ 0x7fffffff
+__INT32_C(c) c
+__INT_LEAST32_WIDTH__ 32
+__INT_LEAST64_MAX__ 0x7fffffffffffffffL
+__INT64_C(c) c ## L
+__INT_LEAST64_WIDTH__ 64
+__UINT_LEAST8_MAX__ 0xff
+__UINT8_C(c) c
+__UINT_LEAST16_MAX__ 0xffff
+__UINT16_C(c) c
+__UINT_LEAST32_MAX__ 0xffffffffU
+__UINT32_C(c) c ## U
+__UINT_LEAST64_MAX__ 0xffffffffffffffffUL
+__UINT64_C(c) c ## UL
+__INT_FAST8_MAX__ 0x7f
+__INT_FAST8_WIDTH__ 8
+__INT_FAST16_MAX__ 0x7fffffffffffffffL
+__INT_FAST16_WIDTH__ 64
+__INT_FAST32_MAX__ 0x7fffffffffffffffL
+__INT_FAST32_WIDTH__ 64
+__INT_FAST64_MAX__ 0x7fffffffffffffffL
+__INT_FAST64_WIDTH__ 64
+__UINT_FAST8_MAX__ 0xff
+__UINT_FAST16_MAX__ 0xffffffffffffffffUL
+__UINT_FAST32_MAX__ 0xffffffffffffffffUL
+__UINT_FAST64_MAX__ 0xffffffffffffffffUL
+__INTPTR_MAX__ 0x7fffffffffffffffL
+__INTPTR_WIDTH__ 64
+__UINTPTR_MAX__ 0xffffffffffffffffUL
+__GCC_IEC_559 2
+__GCC_IEC_559_COMPLEX 2
+__FLT_EVAL_METHOD__ 0
+__FLT_EVAL_METHOD_TS_18661_3__ 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.40282346638528859811704183484516925e+38F
+__FLT_NORM_MAX__ 3.40282346638528859811704183484516925e+38F
+__FLT_MIN__ 1.17549435082228750796873653722224568e-38F
+__FLT_EPSILON__ 1.19209289550781250000000000000000000e-7F
+__FLT_DENORM_MIN__ 1.40129846432481707092372958328991613e-45F
+__FLT_HAS_DENORM__ 1
+__FLT_HAS_INFINITY__ 1
+__FLT_HAS_QUIET_NAN__ 1
+__FLT_IS_IEC_60559__ 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.79769313486231570814527423731704357e+308L)
+__DBL_NORM_MAX__ double(1.79769313486231570814527423731704357e+308L)
+__DBL_MIN__ double(2.22507385850720138309023271733240406e-308L)
+__DBL_EPSILON__ double(2.22044604925031308084726333618164062e-16L)
+__DBL_DENORM_MIN__ double(4.94065645841246544176568792868221372e-324L)
+__DBL_HAS_DENORM__ 1
+__DBL_HAS_INFINITY__ 1
+__DBL_HAS_QUIET_NAN__ 1
+__DBL_IS_IEC_60559__ 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_DECIMAL_DIG__ 21
+__LDBL_MAX__ 1.18973149535723176502126385303097021e+4932L
+__LDBL_NORM_MAX__ 1.18973149535723176502126385303097021e+4932L
+__LDBL_MIN__ 3.36210314311209350626267781732175260e-4932L
+__LDBL_EPSILON__ 1.08420217248550443400745280086994171e-19L
+__LDBL_DENORM_MIN__ 3.64519953188247460252840593361941982e-4951L
+__LDBL_HAS_DENORM__ 1
+__LDBL_HAS_INFINITY__ 1
+__LDBL_HAS_QUIET_NAN__ 1
+__LDBL_IS_IEC_60559__ 1
+__FLT16_MANT_DIG__ 11
+__FLT16_DIG__ 3
+__FLT16_MIN_EXP__ (-13)
+__FLT16_MIN_10_EXP__ (-4)
+__FLT16_MAX_EXP__ 16
+__FLT16_MAX_10_EXP__ 4
+__FLT16_DECIMAL_DIG__ 5
+__FLT16_MAX__ 6.55040000000000000000000000000000000e+4F16
+__FLT16_NORM_MAX__ 6.55040000000000000000000000000000000e+4F16
+__FLT16_MIN__ 6.10351562500000000000000000000000000e-5F16
+__FLT16_EPSILON__ 9.76562500000000000000000000000000000e-4F16
+__FLT16_DENORM_MIN__ 5.96046447753906250000000000000000000e-8F16
+__FLT16_HAS_DENORM__ 1
+__FLT16_HAS_INFINITY__ 1
+__FLT16_HAS_QUIET_NAN__ 1
+__FLT16_IS_IEC_60559__ 1
+__FLT32_MANT_DIG__ 24
+__FLT32_DIG__ 6
+__FLT32_MIN_EXP__ (-125)
+__FLT32_MIN_10_EXP__ (-37)
+__FLT32_MAX_EXP__ 128
+__FLT32_MAX_10_EXP__ 38
+__FLT32_DECIMAL_DIG__ 9
+__FLT32_MAX__ 3.40282346638528859811704183484516925e+38F32
+__FLT32_NORM_MAX__ 3.40282346638528859811704183484516925e+38F32
+__FLT32_MIN__ 1.17549435082228750796873653722224568e-38F32
+__FLT32_EPSILON__ 1.19209289550781250000000000000000000e-7F32
+__FLT32_DENORM_MIN__ 1.40129846432481707092372958328991613e-45F32
+__FLT32_HAS_DENORM__ 1
+__FLT32_HAS_INFINITY__ 1
+__FLT32_HAS_QUIET_NAN__ 1
+__FLT32_IS_IEC_60559__ 1
+__FLT64_MANT_DIG__ 53
+__FLT64_DIG__ 15
+__FLT64_MIN_EXP__ (-1021)
+__FLT64_MIN_10_EXP__ (-307)
+__FLT64_MAX_EXP__ 1024
+__FLT64_MAX_10_EXP__ 308
+__FLT64_DECIMAL_DIG__ 17
+__FLT64_MAX__ 1.79769313486231570814527423731704357e+308F64
+__FLT64_NORM_MAX__ 1.79769313486231570814527423731704357e+308F64
+__FLT64_MIN__ 2.22507385850720138309023271733240406e-308F64
+__FLT64_EPSILON__ 2.22044604925031308084726333618164062e-16F64
+__FLT64_DENORM_MIN__ 4.94065645841246544176568792868221372e-324F64
+__FLT64_HAS_DENORM__ 1
+__FLT64_HAS_INFINITY__ 1
+__FLT64_HAS_QUIET_NAN__ 1
+__FLT64_IS_IEC_60559__ 1
+__FLT128_MANT_DIG__ 113
+__FLT128_DIG__ 33
+__FLT128_MIN_EXP__ (-16381)
+__FLT128_MIN_10_EXP__ (-4931)
+__FLT128_MAX_EXP__ 16384
+__FLT128_MAX_10_EXP__ 4932
+__FLT128_DECIMAL_DIG__ 36
+__FLT128_MAX__ 1.18973149535723176508575932662800702e+4932F128
+__FLT128_NORM_MAX__ 1.18973149535723176508575932662800702e+4932F128
+__FLT128_MIN__ 3.36210314311209350626267781732175260e-4932F128
+__FLT128_EPSILON__ 1.92592994438723585305597794258492732e-34F128
+__FLT128_DENORM_MIN__ 6.47517511943802511092443895822764655e-4966F128
+__FLT128_HAS_DENORM__ 1
+__FLT128_HAS_INFINITY__ 1
+__FLT128_HAS_QUIET_NAN__ 1
+__FLT128_IS_IEC_60559__ 1
+__FLT32X_MANT_DIG__ 53
+__FLT32X_DIG__ 15
+__FLT32X_MIN_EXP__ (-1021)
+__FLT32X_MIN_10_EXP__ (-307)
+__FLT32X_MAX_EXP__ 1024
+__FLT32X_MAX_10_EXP__ 308
+__FLT32X_DECIMAL_DIG__ 17
+__FLT32X_MAX__ 1.79769313486231570814527423731704357e+308F32x
+__FLT32X_NORM_MAX__ 1.79769313486231570814527423731704357e+308F32x
+__FLT32X_MIN__ 2.22507385850720138309023271733240406e-308F32x
+__FLT32X_EPSILON__ 2.22044604925031308084726333618164062e-16F32x
+__FLT32X_DENORM_MIN__ 4.94065645841246544176568792868221372e-324F32x
+__FLT32X_HAS_DENORM__ 1
+__FLT32X_HAS_INFINITY__ 1
+__FLT32X_HAS_QUIET_NAN__ 1
+__FLT32X_IS_IEC_60559__ 1
+__FLT64X_MANT_DIG__ 64
+__FLT64X_DIG__ 18
+__FLT64X_MIN_EXP__ (-16381)
+__FLT64X_MIN_10_EXP__ (-4931)
+__FLT64X_MAX_EXP__ 16384
+__FLT64X_MAX_10_EXP__ 4932
+__FLT64X_DECIMAL_DIG__ 21
+__FLT64X_MAX__ 1.18973149535723176502126385303097021e+4932F64x
+__FLT64X_NORM_MAX__ 1.18973149535723176502126385303097021e+4932F64x
+__FLT64X_MIN__ 3.36210314311209350626267781732175260e-4932F64x
+__FLT64X_EPSILON__ 1.08420217248550443400745280086994171e-19F64x
+__FLT64X_DENORM_MIN__ 3.64519953188247460252840593361941982e-4951F64x
+__FLT64X_HAS_DENORM__ 1
+__FLT64X_HAS_INFINITY__ 1
+__FLT64X_HAS_QUIET_NAN__ 1
+__FLT64X_IS_IEC_60559__ 1
+__BFLT16_MANT_DIG__ 8
+__BFLT16_DIG__ 2
+__BFLT16_MIN_EXP__ (-125)
+__BFLT16_MIN_10_EXP__ (-37)
+__BFLT16_MAX_EXP__ 128
+__BFLT16_MAX_10_EXP__ 38
+__BFLT16_DECIMAL_DIG__ 4
+__BFLT16_MAX__ 3.38953138925153547590470800371487867e+38BF16
+__BFLT16_NORM_MAX__ 3.38953138925153547590470800371487867e+38BF16
+__BFLT16_MIN__ 1.17549435082228750796873653722224568e-38BF16
+__BFLT16_EPSILON__ 7.81250000000000000000000000000000000e-3BF16
+__BFLT16_DENORM_MIN__ 9.18354961579912115600575419704879436e-41BF16
+__BFLT16_HAS_DENORM__ 1
+__BFLT16_HAS_INFINITY__ 1
+__BFLT16_HAS_QUIET_NAN__ 1
+__BFLT16_IS_IEC_60559__ 0
+__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_STDC_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_DESTRUCTIVE_SIZE 64
+__GCC_CONSTRUCTIVE_SIZE 64
+__GCC_ATOMIC_POINTER_LOCK_FREE 2
+__HAVE_SPECULATION_SAFE_VALUE 1
+__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
+__SIZEOF_FLOAT80__ 16
+__SIZEOF_FLOAT128__ 16
+__ATOMIC_HLE_ACQUIRE 65536
+__ATOMIC_HLE_RELEASE 131072
+__GCC_ASM_FLAG_OUTPUTS__ 1
+__k8 1
+__k8__ 1
+__code_model_small__ 1
+__MMX__ 1
+__SSE__ 1
+__SSE2__ 1
+__FXSR__ 1
+__SSE_MATH__ 1
+__SSE2_MATH__ 1
+__MMX_WITH_SSE__ 1
+__SEG_FS 1
+__SEG_GS 1
+__gnu_linux__ 1
+__linux 1
+__linux__ 1
+linux 1
+__unix 1
+__unix__ 1
+unix 1
+__ELF__ 1
+__DECIMAL_BID_FORMAT__ 1
+_GNU_SOURCE 1
+file /home/osandov/src/elfutils/tests/bar.cc
+ file /usr/include/stdc-predef.h
+ _STDC_PREDEF_H 1
+ __STDC_IEC_559__ 1
+ __STDC_IEC_60559_BFP__ 201404L
+ __STDC_IEC_559_COMPLEX__ 1
+ __STDC_IEC_60559_COMPLEX__ 201404L
+ __STDC_ISO_10646__ 201706L
+ /file
+ file /home/osandov/src/elfutils/tests/foobar.h
+ FROB(x) ((x) ^ 0x2a2a2a2a)
+ FRY(x) ((x) * 0x100000001b3)
+ /file
+ ONE 1
+/file
+CU main.cc
+__STDC__ 1
+__cplusplus 201703L
+__STDC_UTF_16__ 1
+__STDC_UTF_32__ 1
+__STDC_HOSTED__ 1
+__GNUC__ 14
+__GNUC_MINOR__ 0
+__GNUC_PATCHLEVEL__ 0
+__VERSION__ "14.0.0 20230920 (experimental)"
+__ATOMIC_RELAXED 0
+__ATOMIC_SEQ_CST 5
+__ATOMIC_ACQUIRE 2
+__ATOMIC_RELEASE 3
+__ATOMIC_ACQ_REL 4
+__ATOMIC_CONSUME 1
+__OPTIMIZE__ 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
+__GNUC_EXECUTION_CHARSET_NAME "UTF-8"
+__GNUC_WIDE_EXECUTION_CHARSET_NAME "UTF-32LE"
+__GNUG__ 14
+__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_WEAK__ 1
+__DEPRECATED 1
+__GXX_RTTI 1
+__cpp_rtti 199711L
+__GXX_EXPERIMENTAL_CXX0X__ 1
+__cpp_binary_literals 201304L
+__cpp_hex_float 201603L
+__cpp_runtime_arrays 198712L
+__cpp_raw_strings 200710L
+__cpp_unicode_literals 200710L
+__cpp_user_defined_literals 200809L
+__cpp_lambdas 200907L
+__cpp_decltype 200707L
+__cpp_attributes 200809L
+__cpp_rvalue_reference 200610L
+__cpp_rvalue_references 200610L
+__cpp_variadic_templates 200704L
+__cpp_initializer_lists 200806L
+__cpp_delegating_constructors 200604L
+__cpp_nsdmi 200809L
+__cpp_inheriting_constructors 201511L
+__cpp_ref_qualifiers 200710L
+__cpp_alias_templates 200704L
+__cpp_return_type_deduction 201304L
+__cpp_init_captures 201304L
+__cpp_generic_lambdas 201304L
+__cpp_decltype_auto 201304L
+__cpp_aggregate_nsdmi 201304L
+__cpp_variable_templates 201304L
+__cpp_digit_separators 201309L
+__cpp_unicode_characters 201411L
+__cpp_static_assert 201411L
+__cpp_namespace_attributes 201411L
+__cpp_enumerator_attributes 201411L
+__cpp_nested_namespace_definitions 201411L
+__cpp_fold_expressions 201603L
+__cpp_nontype_template_args 201411L
+__cpp_range_based_for 201603L
+__cpp_constexpr 201603L
+__cpp_if_constexpr 201606L
+__cpp_capture_star_this 201603L
+__cpp_inline_variables 201606L
+__cpp_aggregate_bases 201603L
+__cpp_deduction_guides 201703L
+__cpp_noexcept_function_type 201510L
+__cpp_template_auto 201606L
+__cpp_structured_bindings 201606L
+__cpp_variadic_using 201611L
+__cpp_guaranteed_copy_elision 201606L
+__cpp_nontype_template_parameter_auto 201606L
+__cpp_sized_deallocation 201309L
+__cpp_aligned_new 201606L
+__STDCPP_DEFAULT_NEW_ALIGNMENT__ 16
+__cpp_template_template_args 201611L
+__cpp_threadsafe_static_init 200806L
+__STDCPP_THREADS__ 1
+__EXCEPTIONS 1
+__cpp_exceptions 199711L
+__GXX_ABI_VERSION 1019
+__SCHAR_MAX__ 0x7f
+__SHRT_MAX__ 0x7fff
+__INT_MAX__ 0x7fffffff
+__LONG_MAX__ 0x7fffffffffffffffL
+__LONG_LONG_MAX__ 0x7fffffffffffffffLL
+__WCHAR_MAX__ 0x7fffffff
+__WCHAR_MIN__ (-__WCHAR_MAX__ - 1)
+__WINT_MAX__ 0xffffffffU
+__WINT_MIN__ 0U
+__PTRDIFF_MAX__ 0x7fffffffffffffffL
+__SIZE_MAX__ 0xffffffffffffffffUL
+__SCHAR_WIDTH__ 8
+__SHRT_WIDTH__ 16
+__INT_WIDTH__ 32
+__LONG_WIDTH__ 64
+__LONG_LONG_WIDTH__ 64
+__WCHAR_WIDTH__ 32
+__WINT_WIDTH__ 32
+__PTRDIFF_WIDTH__ 64
+__SIZE_WIDTH__ 64
+__GLIBCXX_TYPE_INT_N_0 __int128
+__GLIBCXX_BITSIZE_INT_N_0 128
+__INTMAX_MAX__ 0x7fffffffffffffffL
+__INTMAX_C(c) c ## L
+__UINTMAX_MAX__ 0xffffffffffffffffUL
+__UINTMAX_C(c) c ## UL
+__INTMAX_WIDTH__ 64
+__SIG_ATOMIC_MAX__ 0x7fffffff
+__SIG_ATOMIC_MIN__ (-__SIG_ATOMIC_MAX__ - 1)
+__SIG_ATOMIC_WIDTH__ 32
+__INT8_MAX__ 0x7f
+__INT16_MAX__ 0x7fff
+__INT32_MAX__ 0x7fffffff
+__INT64_MAX__ 0x7fffffffffffffffL
+__UINT8_MAX__ 0xff
+__UINT16_MAX__ 0xffff
+__UINT32_MAX__ 0xffffffffU
+__UINT64_MAX__ 0xffffffffffffffffUL
+__INT_LEAST8_MAX__ 0x7f
+__INT8_C(c) c
+__INT_LEAST8_WIDTH__ 8
+__INT_LEAST16_MAX__ 0x7fff
+__INT16_C(c) c
+__INT_LEAST16_WIDTH__ 16
+__INT_LEAST32_MAX__ 0x7fffffff
+__INT32_C(c) c
+__INT_LEAST32_WIDTH__ 32
+__INT_LEAST64_MAX__ 0x7fffffffffffffffL
+__INT64_C(c) c ## L
+__INT_LEAST64_WIDTH__ 64
+__UINT_LEAST8_MAX__ 0xff
+__UINT8_C(c) c
+__UINT_LEAST16_MAX__ 0xffff
+__UINT16_C(c) c
+__UINT_LEAST32_MAX__ 0xffffffffU
+__UINT32_C(c) c ## U
+__UINT_LEAST64_MAX__ 0xffffffffffffffffUL
+__UINT64_C(c) c ## UL
+__INT_FAST8_MAX__ 0x7f
+__INT_FAST8_WIDTH__ 8
+__INT_FAST16_MAX__ 0x7fffffffffffffffL
+__INT_FAST16_WIDTH__ 64
+__INT_FAST32_MAX__ 0x7fffffffffffffffL
+__INT_FAST32_WIDTH__ 64
+__INT_FAST64_MAX__ 0x7fffffffffffffffL
+__INT_FAST64_WIDTH__ 64
+__UINT_FAST8_MAX__ 0xff
+__UINT_FAST16_MAX__ 0xffffffffffffffffUL
+__UINT_FAST32_MAX__ 0xffffffffffffffffUL
+__UINT_FAST64_MAX__ 0xffffffffffffffffUL
+__INTPTR_MAX__ 0x7fffffffffffffffL
+__INTPTR_WIDTH__ 64
+__UINTPTR_MAX__ 0xffffffffffffffffUL
+__GCC_IEC_559 2
+__GCC_IEC_559_COMPLEX 2
+__FLT_EVAL_METHOD__ 0
+__FLT_EVAL_METHOD_TS_18661_3__ 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.40282346638528859811704183484516925e+38F
+__FLT_NORM_MAX__ 3.40282346638528859811704183484516925e+38F
+__FLT_MIN__ 1.17549435082228750796873653722224568e-38F
+__FLT_EPSILON__ 1.19209289550781250000000000000000000e-7F
+__FLT_DENORM_MIN__ 1.40129846432481707092372958328991613e-45F
+__FLT_HAS_DENORM__ 1
+__FLT_HAS_INFINITY__ 1
+__FLT_HAS_QUIET_NAN__ 1
+__FLT_IS_IEC_60559__ 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.79769313486231570814527423731704357e+308L)
+__DBL_NORM_MAX__ double(1.79769313486231570814527423731704357e+308L)
+__DBL_MIN__ double(2.22507385850720138309023271733240406e-308L)
+__DBL_EPSILON__ double(2.22044604925031308084726333618164062e-16L)
+__DBL_DENORM_MIN__ double(4.94065645841246544176568792868221372e-324L)
+__DBL_HAS_DENORM__ 1
+__DBL_HAS_INFINITY__ 1
+__DBL_HAS_QUIET_NAN__ 1
+__DBL_IS_IEC_60559__ 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_DECIMAL_DIG__ 21
+__LDBL_MAX__ 1.18973149535723176502126385303097021e+4932L
+__LDBL_NORM_MAX__ 1.18973149535723176502126385303097021e+4932L
+__LDBL_MIN__ 3.36210314311209350626267781732175260e-4932L
+__LDBL_EPSILON__ 1.08420217248550443400745280086994171e-19L
+__LDBL_DENORM_MIN__ 3.64519953188247460252840593361941982e-4951L
+__LDBL_HAS_DENORM__ 1
+__LDBL_HAS_INFINITY__ 1
+__LDBL_HAS_QUIET_NAN__ 1
+__LDBL_IS_IEC_60559__ 1
+__FLT16_MANT_DIG__ 11
+__FLT16_DIG__ 3
+__FLT16_MIN_EXP__ (-13)
+__FLT16_MIN_10_EXP__ (-4)
+__FLT16_MAX_EXP__ 16
+__FLT16_MAX_10_EXP__ 4
+__FLT16_DECIMAL_DIG__ 5
+__FLT16_MAX__ 6.55040000000000000000000000000000000e+4F16
+__FLT16_NORM_MAX__ 6.55040000000000000000000000000000000e+4F16
+__FLT16_MIN__ 6.10351562500000000000000000000000000e-5F16
+__FLT16_EPSILON__ 9.76562500000000000000000000000000000e-4F16
+__FLT16_DENORM_MIN__ 5.96046447753906250000000000000000000e-8F16
+__FLT16_HAS_DENORM__ 1
+__FLT16_HAS_INFINITY__ 1
+__FLT16_HAS_QUIET_NAN__ 1
+__FLT16_IS_IEC_60559__ 1
+__FLT32_MANT_DIG__ 24
+__FLT32_DIG__ 6
+__FLT32_MIN_EXP__ (-125)
+__FLT32_MIN_10_EXP__ (-37)
+__FLT32_MAX_EXP__ 128
+__FLT32_MAX_10_EXP__ 38
+__FLT32_DECIMAL_DIG__ 9
+__FLT32_MAX__ 3.40282346638528859811704183484516925e+38F32
+__FLT32_NORM_MAX__ 3.40282346638528859811704183484516925e+38F32
+__FLT32_MIN__ 1.17549435082228750796873653722224568e-38F32
+__FLT32_EPSILON__ 1.19209289550781250000000000000000000e-7F32
+__FLT32_DENORM_MIN__ 1.40129846432481707092372958328991613e-45F32
+__FLT32_HAS_DENORM__ 1
+__FLT32_HAS_INFINITY__ 1
+__FLT32_HAS_QUIET_NAN__ 1
+__FLT32_IS_IEC_60559__ 1
+__FLT64_MANT_DIG__ 53
+__FLT64_DIG__ 15
+__FLT64_MIN_EXP__ (-1021)
+__FLT64_MIN_10_EXP__ (-307)
+__FLT64_MAX_EXP__ 1024
+__FLT64_MAX_10_EXP__ 308
+__FLT64_DECIMAL_DIG__ 17
+__FLT64_MAX__ 1.79769313486231570814527423731704357e+308F64
+__FLT64_NORM_MAX__ 1.79769313486231570814527423731704357e+308F64
+__FLT64_MIN__ 2.22507385850720138309023271733240406e-308F64
+__FLT64_EPSILON__ 2.22044604925031308084726333618164062e-16F64
+__FLT64_DENORM_MIN__ 4.94065645841246544176568792868221372e-324F64
+__FLT64_HAS_DENORM__ 1
+__FLT64_HAS_INFINITY__ 1
+__FLT64_HAS_QUIET_NAN__ 1
+__FLT64_IS_IEC_60559__ 1
+__FLT128_MANT_DIG__ 113
+__FLT128_DIG__ 33
+__FLT128_MIN_EXP__ (-16381)
+__FLT128_MIN_10_EXP__ (-4931)
+__FLT128_MAX_EXP__ 16384
+__FLT128_MAX_10_EXP__ 4932
+__FLT128_DECIMAL_DIG__ 36
+__FLT128_MAX__ 1.18973149535723176508575932662800702e+4932F128
+__FLT128_NORM_MAX__ 1.18973149535723176508575932662800702e+4932F128
+__FLT128_MIN__ 3.36210314311209350626267781732175260e-4932F128
+__FLT128_EPSILON__ 1.92592994438723585305597794258492732e-34F128
+__FLT128_DENORM_MIN__ 6.47517511943802511092443895822764655e-4966F128
+__FLT128_HAS_DENORM__ 1
+__FLT128_HAS_INFINITY__ 1
+__FLT128_HAS_QUIET_NAN__ 1
+__FLT128_IS_IEC_60559__ 1
+__FLT32X_MANT_DIG__ 53
+__FLT32X_DIG__ 15
+__FLT32X_MIN_EXP__ (-1021)
+__FLT32X_MIN_10_EXP__ (-307)
+__FLT32X_MAX_EXP__ 1024
+__FLT32X_MAX_10_EXP__ 308
+__FLT32X_DECIMAL_DIG__ 17
+__FLT32X_MAX__ 1.79769313486231570814527423731704357e+308F32x
+__FLT32X_NORM_MAX__ 1.79769313486231570814527423731704357e+308F32x
+__FLT32X_MIN__ 2.22507385850720138309023271733240406e-308F32x
+__FLT32X_EPSILON__ 2.22044604925031308084726333618164062e-16F32x
+__FLT32X_DENORM_MIN__ 4.94065645841246544176568792868221372e-324F32x
+__FLT32X_HAS_DENORM__ 1
+__FLT32X_HAS_INFINITY__ 1
+__FLT32X_HAS_QUIET_NAN__ 1
+__FLT32X_IS_IEC_60559__ 1
+__FLT64X_MANT_DIG__ 64
+__FLT64X_DIG__ 18
+__FLT64X_MIN_EXP__ (-16381)
+__FLT64X_MIN_10_EXP__ (-4931)
+__FLT64X_MAX_EXP__ 16384
+__FLT64X_MAX_10_EXP__ 4932
+__FLT64X_DECIMAL_DIG__ 21
+__FLT64X_MAX__ 1.18973149535723176502126385303097021e+4932F64x
+__FLT64X_NORM_MAX__ 1.18973149535723176502126385303097021e+4932F64x
+__FLT64X_MIN__ 3.36210314311209350626267781732175260e-4932F64x
+__FLT64X_EPSILON__ 1.08420217248550443400745280086994171e-19F64x
+__FLT64X_DENORM_MIN__ 3.64519953188247460252840593361941982e-4951F64x
+__FLT64X_HAS_DENORM__ 1
+__FLT64X_HAS_INFINITY__ 1
+__FLT64X_HAS_QUIET_NAN__ 1
+__FLT64X_IS_IEC_60559__ 1
+__BFLT16_MANT_DIG__ 8
+__BFLT16_DIG__ 2
+__BFLT16_MIN_EXP__ (-125)
+__BFLT16_MIN_10_EXP__ (-37)
+__BFLT16_MAX_EXP__ 128
+__BFLT16_MAX_10_EXP__ 38
+__BFLT16_DECIMAL_DIG__ 4
+__BFLT16_MAX__ 3.38953138925153547590470800371487867e+38BF16
+__BFLT16_NORM_MAX__ 3.38953138925153547590470800371487867e+38BF16
+__BFLT16_MIN__ 1.17549435082228750796873653722224568e-38BF16
+__BFLT16_EPSILON__ 7.81250000000000000000000000000000000e-3BF16
+__BFLT16_DENORM_MIN__ 9.18354961579912115600575419704879436e-41BF16
+__BFLT16_HAS_DENORM__ 1
+__BFLT16_HAS_INFINITY__ 1
+__BFLT16_HAS_QUIET_NAN__ 1
+__BFLT16_IS_IEC_60559__ 0
+__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_STDC_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_DESTRUCTIVE_SIZE 64
+__GCC_CONSTRUCTIVE_SIZE 64
+__GCC_ATOMIC_POINTER_LOCK_FREE 2
+__HAVE_SPECULATION_SAFE_VALUE 1
+__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
+__SIZEOF_FLOAT80__ 16
+__SIZEOF_FLOAT128__ 16
+__ATOMIC_HLE_ACQUIRE 65536
+__ATOMIC_HLE_RELEASE 131072
+__GCC_ASM_FLAG_OUTPUTS__ 1
+__k8 1
+__k8__ 1
+__code_model_small__ 1
+__MMX__ 1
+__SSE__ 1
+__SSE2__ 1
+__FXSR__ 1
+__SSE_MATH__ 1
+__SSE2_MATH__ 1
+__MMX_WITH_SSE__ 1
+__SEG_FS 1
+__SEG_GS 1
+__gnu_linux__ 1
+__linux 1
+__linux__ 1
+linux 1
+__unix 1
+__unix__ 1
+unix 1
+__ELF__ 1
+__DECIMAL_BID_FORMAT__ 1
+_GNU_SOURCE 1
+file /home/osandov/src/elfutils/tests/main.cc
+ file /usr/include/stdc-predef.h
+ _STDC_PREDEF_H 1
+ __STDC_IEC_559__ 1
+ __STDC_IEC_60559_BFP__ 201404L
+ __STDC_IEC_559_COMPLEX__ 1
+ __STDC_IEC_60559_COMPLEX__ 201404L
+ __STDC_ISO_10646__ 201706L
+ /file
+ file /home/osandov/src/elfutils/tests/foobar.h
+ FROB(x) ((x) ^ 0x2a2a2a2a)
+ FRY(x) ((x) * 0x100000001b3)
+ /file
+ MAIN_ARGS int argc, char **argv
+/file
+EOF
+done
+
exit 0
@@ -63,4 +63,22 @@ EOF
testrun_on_self_exe ${abs_builddir}/get-units-split
testrun_on_self_lib ${abs_builddir}/get-units-split
+# See testfile-dwp.source.
+testfiles testfile-dwp-5 testfile-dwp-5.dwp
+testfiles testfile-dwp-4 testfile-dwp-4.dwp
+testfiles testfile-dwp-4-strict testfile-dwp-4-strict.dwp
+
+for file in testfile-dwp-5 testfile-dwp-4 testfile-dwp-4-strict; do
+ testrun_compare ${abs_builddir}/get-units-split "$file" << EOF
+file: $file
+Got cudie unit_type: 4
+Found a skeleton unit, with split die: foo.cc
+Got cudie unit_type: 4
+Found a skeleton unit, with split die: bar.cc
+Got cudie unit_type: 4
+Found a skeleton unit, with split die: main.cc
+
+EOF
+done
+
exit 0
@@ -601,4 +601,116 @@ module 'testfile-splitdwarf4-not-split4.debug'
[4011a0,4011a1) {lit0, stack_value}
EOF
+# See testfile-dwp.source.
+testfiles testfile-dwp-5 testfile-dwp-5.dwp
+testfiles testfile-dwp-4 testfile-dwp-4.dwp
+
+testrun_compare ${abs_builddir}/varlocs -e testfile-dwp-5 << EOF
+module 'testfile-dwp-5'
+[84] CU 'foo.cc'@401190
+ [c6] function 'foo'@4011c0
+ frame_base: {call_frame_cfa {bregx(7,8)}}
+ [e1] parameter 'this'
+ [4011c0,401200) {reg5}
+ [ea] variable 'x'
+ [4011c2,4011d4) {reg0}
+ [4011d4,4011d7) {reg1}
+ [4011d7,4011d9) {breg1(1), stack_value}
+ [4011f1,401200) {reg0}
+ [f9] inlined function 'x_x'@4011cb
+ [104] parameter 'x'
+ [4011cb,4011eb) {reg0}
+ [4011f1,401200) {reg0}
+ [14a] function 'x_x'@401190
+ frame_base: {call_frame_cfa {bregx(7,8)}}
+ [15b] parameter 'x'
+ [401190,4011a1) {reg5}
+ [4011a1,4011bd) {reg0}
+module 'testfile-dwp-5'
+[1fa] CU 'bar.cc'@401200
+ [23c] function 'bar'@401200
+ frame_base: {call_frame_cfa {bregx(7,8)}}
+ [253] parameter 'this'
+ [401200,40121b) {reg5}
+module 'testfile-dwp-5'
+[272] CU 'main.cc'@0
+ [2c7] function 'main'@401020
+ frame_base: {call_frame_cfa {bregx(7,8)}}
+ [2e0] parameter 'argc'
+ [401020,401068) {reg5}
+ [401068,401080) {fbreg(-40)}
+ [401080,401084) {breg5(0)}
+ [401084,401099) {entry_value(1) {reg5}, stack_value}
+ [401099,4010a0) {reg5}
+ [2ec] parameter 'argv'
+ [401020,40104b) {reg4}
+ [40104b,401099) {entry_value(1) {reg4}, stack_value}
+ [401099,4010a0) {reg4}
+ [2f8] variable 'myfoo'
+ [401020,4010a0) {fbreg(-40)}
+ [303] variable 'mybar'
+ [401020,4010a0) {fbreg(-32)}
+ [30d] inlined function 'fibonacci'@401030
+ [31c] parameter 'n'
+ [401030,401060) {reg5}
+ [401099,4010a0) {reg5}
+ [326] inlined function 'fibonacci'
+ [32f] parameter 'n'
+ <no value>
+EOF
+
+testrun_compare ${abs_builddir}/varlocs -e testfile-dwp-4 << EOF
+module 'testfile-dwp-4'
+[b] CU 'foo.cc'@401190
+ [54] function 'foo'@4011c0
+ frame_base: {call_frame_cfa {bregx(7,8)}}
+ [6f] parameter 'this'
+ [4011c0,401200) {reg5}
+ [78] variable 'x'
+ [4011c2,4011d4) {reg0}
+ [4011d4,4011d7) {reg1}
+ [4011d7,4011d9) {breg1(1), stack_value}
+ [4011f1,401200) {reg0}
+ [8a] inlined function 'x_x'@4011cb
+ [98] parameter 'x'
+ [4011cb,4011eb) {reg0}
+ [4011f1,401200) {reg0}
+ [e7] function 'x_x'@401190
+ frame_base: {call_frame_cfa {bregx(7,8)}}
+ [f8] parameter 'x'
+ [401190,4011a1) {reg5}
+ [4011a1,4011bd) {reg0}
+module 'testfile-dwp-4'
+[129] CU 'bar.cc'@401200
+ [172] function 'bar'@401200
+ frame_base: {call_frame_cfa {bregx(7,8)}}
+ [189] parameter 'this'
+ [401200,40121b) {reg5}
+module 'testfile-dwp-4'
+[19f] CU 'main.cc'@0
+ [1fd] function 'main'@401020
+ frame_base: {call_frame_cfa {bregx(7,8)}}
+ [216] parameter 'argc'
+ [401020,401068) {reg5}
+ [401068,401080) {fbreg(-40)}
+ [401080,401084) {breg5(0)}
+ [401084,401097) {GNU_entry_value(1) {reg5}, stack_value}
+ [401099,4010a0) {reg5}
+ [228] parameter 'argv'
+ [401020,40104b) {reg4}
+ [40104b,401099) {GNU_entry_value(1) {reg4}, stack_value}
+ [401099,4010a0) {reg4}
+ [23a] variable 'myfoo'
+ [401020,4010a0) {fbreg(-40)}
+ [247] variable 'mybar'
+ [401020,4010a0) {fbreg(-32)}
+ [253] inlined function 'fibonacci'@401030
+ [265] parameter 'n'
+ [401030,401060) {reg5}
+ [401099,4010a0) {reg5}
+ [272] inlined function 'fibonacci'
+ [27e] parameter 'n'
+ <no value>
+EOF
+
exit 0