mbox series

[v2,0/8] Support the Capstone disassembler

Message ID 20170919150313.10833-1-richard.henderson@linaro.org
Headers show
Series Support the Capstone disassembler | expand

Message

Richard Henderson Sept. 19, 2017, 3:03 p.m. UTC
Changes since v1:
  * Don't silently ignore unknown insns.
  * Don't copy memory when dumping host insns.
  * More properly handle dumping from the monitor.
  * Drop enabling for s390x, sparc, mips.

    The s390x and sparc support in capstone is pretty poor.  It seems
    to only handle userland instructions -- at least that's the impression
    I get from the hordes of insns rendered as ".byte" within the first
    few TB of booting each machine.  I dropped the mips patch simply
    because there are too many capstone options and it probably needs
    more testing than I've given it.

    If there are any IBM folk paying attention, it would be awesome if
    some time could be found somewhere to improve capstone for zSeries.
    You're in the same boat that i386 is in -- namely that our ancient
    binutils gplv2 code is neigh useless for modern systems.  It would
    be really really nice to have a better disassembler for qemu.


r~


Cc: Christian Borntraeger <borntraeger@de.ibm.com>
Cc: Alexander Graf <agraf@suse.de>

Richard Henderson (8):
  target/i386: Convert to disas_set_info hook
  target/ppc: Convert to disas_set_info hook
  disas: Remove unused flags arguments
  disas: Support the Capstone disassembler library
  i386: Support Capstone in disas_set_info
  arm: Support Capstone in disas_set_info
  ppc: Support Capstone in disas_set_info
  disas: Remove monitor_disas_is_physical

 include/disas/bfd.h           |   4 +
 include/disas/capstone.h      |  38 ++++++
 include/disas/disas.h         |   4 +-
 include/exec/log.h            |   4 +-
 disas.c                       | 310 ++++++++++++++++++++++++++++++------------
 monitor.c                     |  29 +---
 target/alpha/translate.c      |   2 +-
 target/arm/cpu.c              |  21 ++-
 target/arm/translate-a64.c    |   3 +-
 target/arm/translate.c        |   3 +-
 target/cris/translate.c       |   3 +-
 target/hppa/translate.c       |   2 +-
 target/i386/cpu.c             |  19 +++
 target/i386/translate.c       |   8 +-
 target/lm32/translate.c       |   2 +-
 target/m68k/translate.c       |   2 +-
 target/microblaze/translate.c |   2 +-
 target/mips/translate.c       |   2 +-
 target/nios2/translate.c      |   2 +-
 target/openrisc/translate.c   |   2 +-
 target/ppc/translate.c        |   5 +-
 target/ppc/translate_init.c   |  27 ++++
 target/s390x/translate.c      |   2 +-
 target/sh4/translate.c        |   2 +-
 target/sparc/translate.c      |   2 +-
 target/tricore/translate.c    |   2 +-
 target/unicore32/translate.c  |   2 +-
 target/xtensa/translate.c     |   2 +-
 configure                     |  26 ++++
 29 files changed, 380 insertions(+), 152 deletions(-)
 create mode 100644 include/disas/capstone.h

-- 
2.13.5

Comments

no-reply@patchew.org Sept. 19, 2017, 4:06 p.m. UTC | #1
Hi,

This series seems to have some coding style problems. See output below for
more information:

Subject: [Qemu-devel] [PATCH v2 0/8] Support the Capstone disassembler
Message-id: 20170919150313.10833-1-richard.henderson@linaro.org
Type: series

=== TEST SCRIPT BEGIN ===
#!/bin/bash

BASE=base
n=1
total=$(git log --oneline $BASE.. | wc -l)
failed=0

git config --local diff.renamelimit 0
git config --local diff.renames True

commits="$(git log --format=%H --reverse $BASE..)"
for c in $commits; do
    echo "Checking PATCH $n/$total: $(git log -n 1 --format=%s $c)..."
    if ! git show $c --format=email | ./scripts/checkpatch.pl --mailback -; then
        failed=1
        echo
    fi
    n=$((n+1))
done

exit $failed
=== TEST SCRIPT END ===

Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
Switched to a new branch 'test'
d0f53bd2e1 disas: Remove monitor_disas_is_physical
580ad9f05d ppc: Support Capstone in disas_set_info
5095c70945 arm: Support Capstone in disas_set_info
c359a651d4 i386: Support Capstone in disas_set_info
d443254743 disas: Support the Capstone disassembler library
65d9c3bff6 disas: Remove unused flags arguments
120ceff655 target/ppc: Convert to disas_set_info hook
180c4f43c2 target/i386: Convert to disas_set_info hook

=== OUTPUT BEGIN ===
Checking PATCH 1/8: target/i386: Convert to disas_set_info hook...
Checking PATCH 2/8: target/ppc: Convert to disas_set_info hook...
Checking PATCH 3/8: disas: Remove unused flags arguments...
Checking PATCH 4/8: disas: Support the Capstone disassembler library...
Checking PATCH 5/8: i386: Support Capstone in disas_set_info...
Checking PATCH 6/8: arm: Support Capstone in disas_set_info...
Checking PATCH 7/8: ppc: Support Capstone in disas_set_info...
Checking PATCH 8/8: disas: Remove monitor_disas_is_physical...
ERROR: space prohibited between function name and open parenthesis '('
#27: FILE: disas.c:517:
+physical_read_memory (bfd_vma memaddr, bfd_byte *myaddr, int length,

total: 1 errors, 0 warnings, 32 lines checked

Your patch has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

=== OUTPUT END ===

Test command exited with code: 1


---
Email generated automatically by Patchew [http://patchew.org/].
Please send your feedback to patchew-devel@freelists.org