Skip Menu |

This queue is for tickets about the Parse-Readelf CPAN distribution.

Report information
The Basics
Id: 63778
Status: resolved
Priority: 0/
Queue: Parse-Readelf

People
Owner: td091116 [...] th-dorner.de
Requestors: Daniel.Hulme [...] arm.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Parse::Readelf::Debug::Info::structure_layout() documentation does not match code
Date: Thu, 9 Dec 2010 15:46:25 +0000
To: "bug-Parse-Readelf [...] rt.cpan.org" <bug-Parse-Readelf [...] rt.cpan.org>
From: Daniel Hulme <Daniel.Hulme [...] arm.com>
Thanks for creating and sharing this library, which is helping me to read structure layout from a program and present it in a different form. The documentation for structure_layout() describes the return value as an array where each element is "a quintuple containing (in that order) I<relative level>, I<name>, I<data type>, I<size> and I<offset>", and mentions two additional entries for bit-fields. The element is set up (on line 1067) as follows: @result = ([$level, $name, $type_name, $size, $location, $offset, @bit_data], @sub_layout); That is, each element is a sextuple, and the location (an arrayref containing TU number, file number, and line number) appears after the size and before the offset. This is a rather confusing mismatch. Since the module doesn't provide a way to find out which TU the TU number corresponds to, nor the name of the file the file number corresponds to, my preferred resolution would be to take $location out (i.e. make the code match the documented interface) rather than to change the documented interface to match the code. -- IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
I've introduced constants for the result tupel and fixed the documentation. (Changing the actual behaviour would break dependant code.)
It's solved in 0.14.