<feed xmlns='http://www.w3.org/2005/Atom'>
<title>platform_external_elfutils/tests/varlocs.c, branch master</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.replicant.us/mirrors/AOSP/platform_external_elfutils/'/>
<entry>
<title>Consolidate error.h inclusion in system.h</title>
<updated>2018-07-05T19:06:40+00:00</updated>
<author>
<name>Ross Burton</name>
<email>ross.burton@intel.com</email>
</author>
<published>2018-07-04T11:11:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/mirrors/AOSP/platform_external_elfutils/commit/?id=e893aab0d12284c8909ebacfca529c0b554abb9c'/>
<id>e893aab0d12284c8909ebacfca529c0b554abb9c</id>
<content type='text'>
error.h isn't standard and so isn't part of the musl C library.
To easy future porting, consolidate the inclusion of error.h into system.h.

https://sourceware.org/bugzilla/show_bug.cgi?id=21008

Signed-off-by: Ross Burton &lt;ross.burton@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
error.h isn't standard and so isn't part of the musl C library.
To easy future porting, consolidate the inclusion of error.h into system.h.

https://sourceware.org/bugzilla/show_bug.cgi?id=21008

Signed-off-by: Ross Burton &lt;ross.burton@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tests: Limit varlocs print_expr_block recursion depth.</title>
<updated>2018-06-29T08:55:37+00:00</updated>
<author>
<name>Mark Wielaard</name>
<email>mark@klomp.org</email>
</author>
<published>2018-06-23T16:07:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/mirrors/AOSP/platform_external_elfutils/commit/?id=3e8db1b7f6acfbdb627ac53d57988d40f308955c'/>
<id>3e8db1b7f6acfbdb627ac53d57988d40f308955c</id>
<content type='text'>
This is only useful for bad DWARF where an expression block might have
an expression that refers to a DIE that contains the expression block
itself. But that might happen with bad DWARF generated by a fuzzer.

Signed-off-by: Mark Wielaard &lt;mark@klomp.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is only useful for bad DWARF where an expression block might have
an expression that refers to a DIE that contains the expression block
itself. But that might happen with bad DWARF generated by a fuzzer.

Signed-off-by: Mark Wielaard &lt;mark@klomp.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tests: Don't assert on bad DW_OP_GNU_parameter_ref target in varlocs.</title>
<updated>2018-06-11T06:35:51+00:00</updated>
<author>
<name>Mark Wielaard</name>
<email>mark@klomp.org</email>
</author>
<published>2018-06-08T19:13:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/mirrors/AOSP/platform_external_elfutils/commit/?id=b78a3336d9d720515b054f250f105600ddb2bd33'/>
<id>b78a3336d9d720515b054f250f105600ddb2bd33</id>
<content type='text'>
If the target of a DW_OP_GNU_parameter_ref isn't a DW_TAG_formal_parameter
that is bad data (which varlocs should error on). But it isn't an internal
consistency check (for which varlocs should assert).

Signed-off-by: Mark Wielaard &lt;mark@klomp.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If the target of a DW_OP_GNU_parameter_ref isn't a DW_TAG_formal_parameter
that is bad data (which varlocs should error on). But it isn't an internal
consistency check (for which varlocs should assert).

Signed-off-by: Mark Wielaard &lt;mark@klomp.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tests: Fix cfi_debug_bias assert in varlocs.</title>
<updated>2018-06-10T15:02:22+00:00</updated>
<author>
<name>Mark Wielaard</name>
<email>mark@klomp.org</email>
</author>
<published>2018-06-08T13:07:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/mirrors/AOSP/platform_external_elfutils/commit/?id=a1a3aa9460d2bbc5172c4eae1fd9c20b8a1a5eae'/>
<id>a1a3aa9460d2bbc5172c4eae1fd9c20b8a1a5eae</id>
<content type='text'>
It is only a consistency issue if we actually have an cfi_debug and the
cfi_debug_bias is not zero (because they come from the same file as the
other debug data).

Signed-off-by: Mark Wielaard &lt;mark@klomp.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It is only a consistency issue if we actually have an cfi_debug and the
cfi_debug_bias is not zero (because they come from the same file as the
other debug data).

Signed-off-by: Mark Wielaard &lt;mark@klomp.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tests: Use error, not assert, when trying to print a non-base type DIE.</title>
<updated>2018-06-08T10:03:14+00:00</updated>
<author>
<name>Mark Wielaard</name>
<email>mark@klomp.org</email>
</author>
<published>2018-06-06T21:35:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/mirrors/AOSP/platform_external_elfutils/commit/?id=07d2098890e9113079bae64f6fc7f4069f7b12cd'/>
<id>07d2098890e9113079bae64f6fc7f4069f7b12cd</id>
<content type='text'>
When using the varlocs test with a fuzzer using assert for internal
sanity checks is great to find issues. But when encountering bad data
using an assert is wrong. Just use error to show we handle the data
correctly (by reporting it is bad, instead of crashing).

Signed-off-by: Mark Wielaard &lt;mark@klomp.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When using the varlocs test with a fuzzer using assert for internal
sanity checks is great to find issues. But when encountering bad data
using an assert is wrong. Just use error to show we handle the data
correctly (by reporting it is bad, instead of crashing).

Signed-off-by: Mark Wielaard &lt;mark@klomp.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>libdw: Handle .debug_loclists in dwarf_getlocation.</title>
<updated>2018-05-29T22:16:15+00:00</updated>
<author>
<name>Mark Wielaard</name>
<email>mark@klomp.org</email>
</author>
<published>2018-04-07T21:48:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/mirrors/AOSP/platform_external_elfutils/commit/?id=4dc31fde711c69fed6acfe18e7e57dfd5665cebb'/>
<id>4dc31fde711c69fed6acfe18e7e57dfd5665cebb</id>
<content type='text'>
Handle all new DW_LLE opcodes in .debug_loclists in dwarf_getlocation.
__libdw_read_begin_end_pair_inc now also handles a default location
(which is simply the range [0,-1]). Since expression blocks can now
also come from the .debug_loclists section add a new fake_loclists_cu
necessary for checking bounds while parsing expression blocks.

Adapt varlocs test to handle debug-only files.
Test testfileranges5.debug and testfilesplitranges5.debug with it.

Signed-off-by: Mark Wielaard &lt;mark@klomp.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Handle all new DW_LLE opcodes in .debug_loclists in dwarf_getlocation.
__libdw_read_begin_end_pair_inc now also handles a default location
(which is simply the range [0,-1]). Since expression blocks can now
also come from the .debug_loclists section add a new fake_loclists_cu
necessary for checking bounds while parsing expression blocks.

Adapt varlocs test to handle debug-only files.
Test testfileranges5.debug and testfilesplitranges5.debug with it.

Signed-off-by: Mark Wielaard &lt;mark@klomp.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>libdw: Support DW_OP_addrx/constx and split DWARF addrx/constx support.</title>
<updated>2018-05-25T13:07:58+00:00</updated>
<author>
<name>Mark Wielaard</name>
<email>mark@klomp.org</email>
</author>
<published>2018-05-20T21:30:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/mirrors/AOSP/platform_external_elfutils/commit/?id=6e3d2521a2b5a3b436901f52cfb9785887a7c961'/>
<id>6e3d2521a2b5a3b436901f52cfb9785887a7c961</id>
<content type='text'>
DW_OP_addrx/constx and GNU DebugFission DW_OP_GNU_addr/const_index take
as argument an index into the .debug_addr section for the associated CU.
This index gets resolved through dwarf_getlocation_attr. A new fake addr
CU is created per Dwarf for use with this new attribute. For split DWARF
files, the IDX_debug_addr gets replaced with the skeleton section and the
addr base is resolved immediately when constructing the split DWARF CU.
Move __libdw_cu_addr_base to libdwP.h to share with eu-readelf. Also
make it possible to resolve addrx[1234]/GNU_addr_index also as constant
indexes to (also) show when displaying these attributes in eu-readelf.

A new varlocs tests is added to test the resolving for both the DWARF4
and DWARF5 DW_OP variants. And now that addrx forms are resolved in
split DWARF files add the new DIEs with "single ranges" (those DIEs that
have a lowpc/highpc attribute pair) to run-all-dwarf-ranges.sh.

Signed-off-by: Mark Wielaard &lt;mark@klomp.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
DW_OP_addrx/constx and GNU DebugFission DW_OP_GNU_addr/const_index take
as argument an index into the .debug_addr section for the associated CU.
This index gets resolved through dwarf_getlocation_attr. A new fake addr
CU is created per Dwarf for use with this new attribute. For split DWARF
files, the IDX_debug_addr gets replaced with the skeleton section and the
addr base is resolved immediately when constructing the split DWARF CU.
Move __libdw_cu_addr_base to libdwP.h to share with eu-readelf. Also
make it possible to resolve addrx[1234]/GNU_addr_index also as constant
indexes to (also) show when displaying these attributes in eu-readelf.

A new varlocs tests is added to test the resolving for both the DWARF4
and DWARF5 DW_OP variants. And now that addrx forms are resolved in
split DWARF files add the new DIEs with "single ranges" (those DIEs that
have a lowpc/highpc attribute pair) to run-all-dwarf-ranges.sh.

Signed-off-by: Mark Wielaard &lt;mark@klomp.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>libdw: Add new DWARF5 Dwarf expression operations.</title>
<updated>2018-03-11T15:34:02+00:00</updated>
<author>
<name>Mark Wielaard</name>
<email>mark@klomp.org</email>
</author>
<published>2017-11-15T11:13:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/mirrors/AOSP/platform_external_elfutils/commit/?id=86fbef9bcadb98272e247a005fdc8d7fd0701179'/>
<id>86fbef9bcadb98272e247a005fdc8d7fd0701179</id>
<content type='text'>
DW_OP_implicit_pointer, DW_OP_entry_value, DW_OP_const_type,
DW_OP_regval_type, DW_OP_deref_type, DW_OP_xderef_type,
DW_OP_convert and OP_reinterpret are implemented like their
pre-DWARF5 GNU variants.

DW_OP_xderef_type is implemented as a (non-CU relative) variant of
DW_OP_deref_type.

DW_OP_addrx and DW_OP_constx are recognized but not interpreted yet.

Signed-off-by: Mark Wielaard &lt;mark@klomp.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
DW_OP_implicit_pointer, DW_OP_entry_value, DW_OP_const_type,
DW_OP_regval_type, DW_OP_deref_type, DW_OP_xderef_type,
DW_OP_convert and OP_reinterpret are implemented like their
pre-DWARF5 GNU variants.

DW_OP_xderef_type is implemented as a (non-CU relative) variant of
DW_OP_deref_type.

DW_OP_addrx and DW_OP_constx are recognized but not interpreted yet.

Signed-off-by: Mark Wielaard &lt;mark@klomp.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tests: Fix cfi_debug =&gt; cfi_debug_bias typo in varlocs assert.</title>
<updated>2017-11-16T12:55:33+00:00</updated>
<author>
<name>Mark Wielaard</name>
<email>mark@klomp.org</email>
</author>
<published>2017-11-16T12:20:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/mirrors/AOSP/platform_external_elfutils/commit/?id=1af6c2b9e49f59ea2f01035738525e798bb4f645'/>
<id>1af6c2b9e49f59ea2f01035738525e798bb4f645</id>
<content type='text'>
We want to check whether the bias is zero, not whether we have dwarf
debug_frame cfi.

This triggered on a ppc64/ppc64le self-check since it has both
debug_frame and eh_frame cfi (other arches often only have eh_frame).

Signed-off-by: Mark Wielaard &lt;mark@klomp.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We want to check whether the bias is zero, not whether we have dwarf
debug_frame cfi.

This triggered on a ppc64/ppc64le self-check since it has both
debug_frame and eh_frame cfi (other arches often only have eh_frame).

Signed-off-by: Mark Wielaard &lt;mark@klomp.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tests: Add varlocs-self and exprlocs-self tests.</title>
<updated>2017-11-15T19:58:26+00:00</updated>
<author>
<name>Mark Wielaard</name>
<email>mark@klomp.org</email>
</author>
<published>2017-11-08T10:25:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/mirrors/AOSP/platform_external_elfutils/commit/?id=c0482a7f1f6696d5a203c8d960efe7c08e745742'/>
<id>c0482a7f1f6696d5a203c8d960efe7c08e745742</id>
<content type='text'>
Make sure the testcases (library functions they use) don't crash,
triggers self-check/asserts or leaks memory under valgrind. This
also helps making sure newer DWARF constructs are handled (when
building with -gdwarf-5).

Signed-off-by: Mark Wielaard &lt;mark@klomp.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Make sure the testcases (library functions they use) don't crash,
triggers self-check/asserts or leaks memory under valgrind. This
also helps making sure newer DWARF constructs are handled (when
building with -gdwarf-5).

Signed-off-by: Mark Wielaard &lt;mark@klomp.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
