qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] disas: Fix printing of addresses in disassembly


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH] disas: Fix printing of addresses in disassembly
Date: Mon, 9 Jul 2012 13:59:54 +0100

On 9 July 2012 13:45, Andreas Färber <address@hidden> wrote:
> Am 09.07.2012 12:27, schrieb Peter Maydell:
>> On 25 June 2012 15:55, Peter Maydell <address@hidden> wrote:
>>> 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, #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.)
>
> Is this bug fixed in binutils and didn't make it into QEMU due to GPLv3?
> Or is this in QEMU glue code?

In binutils it is handled in the specific implementation of the
"print a target address" callback function in objdump. That's
not part of the code we have borrowed from binutils; the functions
changed by this patch are all QEMU glue code AFAIK.

-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]