[PATCH] llvm-objdump: Use the correct address when disassembling

Ahmed Bougacha ahmed.bougacha at gmail.com
Mon May 20 17:24:56 PDT 2013


Hi Kevin, Quentin,

I'm not sure that's actually testable: as far as I can tell, the
instruction address as given to MCDisassembler::getInstruction is only
used by the symbolization functions (tryAdding*) and isn't visible in
the objdump output:
functionally, unless a target's disassembler does something funny (and
broken) with it, this shouldn't change anything, as the tryAdding*
functions don't do much in objdump yet.

This is just something I noticed while working on the symbolizer;
maybe it's best to wait for that patch?

Thanks!
-- Ahmed Bougacha

On Mon, May 20, 2013 at 5:07 PM, Kevin Enderby <enderby at apple.com> wrote:
> A test case with a section not starting at zero too would be nice :)
>
> Kev
>
> On May 20, 2013, at 5:05 PM, Quentin Colombet <qcolombet at apple.com> wrote:
>
> Hi Ahmed,
>
> Could you add a test case?
>
> Other than that, LGTM.
>
> Thanks,
>
> -Quentin
>
> On May 20, 2013, at 4:56 PM, Ahmed Bougacha <ahmed.bougacha at gmail.com>
> wrote:
>
> Hi all,
>
> Subject says all: Fix objdump to use the correct address when
> disassembling, instead of the instruction's offset relative to the
> section start.
>
> Thanks,
>
> -- Ahmed Bougacha
> <objdump-disas-address.svndiff>_______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
>



More information about the llvm-commits mailing list