Hi Wookey (and hi Petr, see below, this is a debian elfutils aarch64
backend bug report, see for full context http://bugs.debian.org/753552
but the below is probably all you'll need)
On Thu, 2014-07-03 at 17:32 +0100, Wookey wrote:
> (/lib/aarch64-linux-gnu/libc-2.19.so)
> round_away: /home/buildd/packages/elfutils-0.159/tests/funcretval:
> dwfl_module_return_value_location: cannot handle DWARF type
> description
OK. Next step is looking at the return type of round_away.
The DWARF debuginfo is located either
in /lib/aarch64-linux-gnu/libc-2.19.so or the separate debug file (I
assume the later). Could you use eu-readelf (or binutils readelf if you
like) to investigate a little. On my x86_64 fedora rawhide system things
look as follows:
$ eu-readelf
--debug-dump=info /usr/lib/debug/lib64/libc-2.19.90.so.debug
[ 75b5d] subprogram
name (strp) "round_away"
decl_file (data1) 4
decl_line (data1) 43
prototyped (flag_present) Yes
type (ref4) [ 75515]
inline (data1) inlined (1)
So the return type can be found in the DIE at offset 75515. Which is:
[ 75515] base_type
byte_size (data1) 1
encoding (data1) boolean (2)
name (strp) "_Bool"
aha. that is probably it... How odd none of the backends seem to handle
DW_ATE_boolean hmmm... The difference with the aarch64 backend is that
it explicitly returns -2 (weird type) if it encounters a boolean as
return value.
I think a boolean is just like other integral types and so the following
is probably the correct fix (but I CCed Petr who wrote the original
backend and probably knows for sure).
diff --git a/backends/aarch64_retval.c b/backends/aarch64_retval.c
index 0ed7d56..68de307 100644
--- a/backends/aarch64_retval.c
+++ b/backends/aarch64_retval.c
@@ -357,6 +357,7 @@ aarch64_return_value_location (Dwarf_Die
*functypedie, const Dwarf_Op **locp)
size of the argument is less than or equal to 8 bytes
[...] the argument is copied to the least significant
bits in x[NGRN]. */
+ case DW_ATE_boolean:
case DW_ATE_signed:
case DW_ATE_unsigned:
case DW_ATE_unsigned_char:
Would you be able to test with that?
Thanks,
Mark
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]