Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
disas: Fix printing of addresses in disassembly
In our disassembly code, the bfd_vma type is always 64 bits, even if the target's virtual address width is only 32 bits. This means that when we print out addresses we need to truncate them to 32 bits, to avoid odd output which has incorrectly sign-extended a value to 64 bits, for instance this ARM example: 0x80479a60: e59f4088 ldr r4, [pc, qemu#136] ; 0xffffffff80479a4f (It would also be possible to truncate before passing the address to info->print_address_func(), but truncating in the final print function is the same approach that binutils takes to this problem.) Signed-off-by: Peter Maydell <[email protected]> Reviewed-by: Andreas Färber <[email protected]> Signed-off-by: Blue Swirl <[email protected]>
- Loading branch information