binutils-gdb/binutils/testsuite
Andrew Burgess 42bcef4ad6 objdump: Handle 32-bit base address in debug_ranges / debug_loc.
When the DWARF address size is 32-bit, but the host machine is 64-bit,
objdump fails to spot base addresses specified in the .debug_ranges and
.debug_loc lists.

As an example, here is the output when dumping an example .debug_ranges
section with the pre-patched objdump:

    Contents of the .debug_ranges section:

        Offset   Begin    End
        00000000 ffffffff 00000004 (start > end)
        00000000 00000000 00000004
        00000000 ffffffff 00000008 (start > end)
        00000000 00000000 00000004
        00000000 <End of list>

And this is what the same section looks like when dumped with the
patched version of objdump:

    Contents of the .debug_ranges section:

        Offset   Begin    End
        00000000 ffffffff 00000004 (base address)
        00000000 00000004 00000008
        00000000 ffffffff 00000008 (base address)
        00000000 00000008 0000000c
        00000000 <End of list>

binutils/ChangeLog:

	* dwarf.c (is_max_address): New function.
	(display_loc_list): Remove out of date comment, use
	is_max_address.
	(display_debug_ranges): Likewise.

binutils/testsuite/ChangeLog:

	* binutils-all/objdump.exp: Add test for .debug_ranges decode.
	* binutils-all/dw2-ranges.S: New file.
	* binutils-all/dw2-ranges.W: New file.
2015-11-30 13:28:26 +00:00
..
binutils-all objdump: Handle 32-bit base address in debug_ranges / debug_loc. 2015-11-30 13:28:26 +00:00
config ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
lib Handle symbolic link when copying source file 2015-09-30 10:50:36 -07:00
ChangeLog objdump: Handle 32-bit base address in debug_ranges / debug_loc. 2015-11-30 13:28:26 +00:00
ChangeLog-0411 Add copyright notices 2012-12-10 12:48:03 +00:00
ChangeLog-9303 Add copyright notices 2012-12-10 12:48:03 +00:00