[PULL 0/3] capstone update

Richard Henderson posted 3 patches 4 years, 3 months ago
Test FreeBSD passed
Test checkpatch passed
Test asan failed
Test docker-mingw@fedora passed
Test docker-clang@ubuntu failed
Test docker-quick@centos7 passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20200108042338.9082-1-richard.henderson@linaro.org
Maintainers: Cornelia Huck <cohuck@redhat.com>
Makefile           |  2 ++
disas.c            | 40 ++++++++++++++++++++++++++++++++++++++++
target/s390x/cpu.c |  4 ++++
capstone           |  2 +-
configure          |  2 +-
5 files changed, 48 insertions(+), 2 deletions(-)
[PULL 0/3] capstone update
Posted by Richard Henderson 4 years, 3 months ago
The following changes since commit 035eed4c0d257c905a556fa0f4865a0c077b4e7f:

  Merge remote-tracking branch 'remotes/vivier/tags/q800-for-5.0-pull-request' into staging (2020-01-07 17:08:21 +0000)

are available in the Git repository at:

  https://github.com/rth7680/qemu.git tags/pull-cap-20200108

for you to fetch changes up to 7cc3836eac04a3e358b2496fbca704b3ee5197ae:

  capstone: Add skipdata hook for s390x (2020-01-08 14:53:54 +1100)

----------------------------------------------------------------
Update capstone to next

----------------------------------------------------------------
Richard Henderson (3):
      capstone: Update to next
      capstone: Enable disassembly for s390x
      capstone: Add skipdata hook for s390x

 Makefile           |  2 ++
 disas.c            | 40 ++++++++++++++++++++++++++++++++++++++++
 target/s390x/cpu.c |  4 ++++
 capstone           |  2 +-
 configure          |  2 +-
 5 files changed, 48 insertions(+), 2 deletions(-)

Re: [PULL 0/3] capstone update
Posted by Peter Maydell 4 years, 3 months ago
On Wed, 8 Jan 2020 at 04:23, Richard Henderson
<richard.henderson@linaro.org> wrote:
>
> The following changes since commit 035eed4c0d257c905a556fa0f4865a0c077b4e7f:
>
>   Merge remote-tracking branch 'remotes/vivier/tags/q800-for-5.0-pull-request' into staging (2020-01-07 17:08:21 +0000)
>
> are available in the Git repository at:
>
>   https://github.com/rth7680/qemu.git tags/pull-cap-20200108
>
> for you to fetch changes up to 7cc3836eac04a3e358b2496fbca704b3ee5197ae:
>
>   capstone: Add skipdata hook for s390x (2020-01-08 14:53:54 +1100)
>
> ----------------------------------------------------------------
> Update capstone to next
>
> ----------------------------------------------------------------
> Richard Henderson (3):
>       capstone: Update to next
>       capstone: Enable disassembly for s390x
>       capstone: Add skipdata hook for s390x

Build failures:

  CC      aarch64-linux-user/disas.o
In file included from
/home/ubuntu/qemu/capstone/include/capstone/capstone.h:302:0,
                 from /home/ubuntu/qemu/include/disas/capstone.h:6,
                 from /home/ubuntu/qemu/disas.c:9:
/home/ubuntu/qemu/capstone/include/capstone/riscv.h:16:10: fatal
error: capstone/platform.h: No such file or directory
 #include "capstone/platform.h"
          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.

(same on most hosts)

aarch64 host had this complaint instead:

/home/pm/qemu/disas.c:187:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘cap_skipdata_s390x_cb’
 cap_skipdata_s390x_cb(const uint8_t *code, size_t code_size,
 ^~~~~~~~~~~~~~~~~~~~~
/home/pm/qemu/disas.c:211:17: error: ‘cap_skipdata_s390x_cb’
undeclared here (not in a function); did you mean
‘cap_skipdata_s390x’?
     .callback = cap_skipdata_s390x_cb
                 ^~~~~~~~~~~~~~~~~~~~~
                 cap_skipdata_s390x

thanks
-- PMM

Re: [PULL 0/3] capstone update
Posted by Peter Maydell 4 years, 3 months ago
On Fri, 10 Jan 2020 at 16:07, Peter Maydell <peter.maydell@linaro.org> wrote:
>
> On Wed, 8 Jan 2020 at 04:23, Richard Henderson
> <richard.henderson@linaro.org> wrote:
> >
> > The following changes since commit 035eed4c0d257c905a556fa0f4865a0c077b4e7f:
> >
> >   Merge remote-tracking branch 'remotes/vivier/tags/q800-for-5.0-pull-request' into staging (2020-01-07 17:08:21 +0000)
> >
> > are available in the Git repository at:
> >
> >   https://github.com/rth7680/qemu.git tags/pull-cap-20200108
> >
> > for you to fetch changes up to 7cc3836eac04a3e358b2496fbca704b3ee5197ae:
> >
> >   capstone: Add skipdata hook for s390x (2020-01-08 14:53:54 +1100)
> >
> > ----------------------------------------------------------------
> > Update capstone to next
> >
> > ----------------------------------------------------------------
> > Richard Henderson (3):
> >       capstone: Update to next
> >       capstone: Enable disassembly for s390x
> >       capstone: Add skipdata hook for s390x
>
> Build failures:
>
>   CC      aarch64-linux-user/disas.o
> In file included from
> /home/ubuntu/qemu/capstone/include/capstone/capstone.h:302:0,
>                  from /home/ubuntu/qemu/include/disas/capstone.h:6,
>                  from /home/ubuntu/qemu/disas.c:9:
> /home/ubuntu/qemu/capstone/include/capstone/riscv.h:16:10: fatal
> error: capstone/platform.h: No such file or directory
>  #include "capstone/platform.h"
>           ^~~~~~~~~~~~~~~~~~~~~
> compilation terminated.
>
> (same on most hosts)
>
> aarch64 host had this complaint instead:
>
> /home/pm/qemu/disas.c:187:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
> ‘__attribute__’ before ‘cap_skipdata_s390x_cb’
>  cap_skipdata_s390x_cb(const uint8_t *code, size_t code_size,
>  ^~~~~~~~~~~~~~~~~~~~~
> /home/pm/qemu/disas.c:211:17: error: ‘cap_skipdata_s390x_cb’
> undeclared here (not in a function); did you mean
> ‘cap_skipdata_s390x’?
>      .callback = cap_skipdata_s390x_cb
>                  ^~~~~~~~~~~~~~~~~~~~~
>                  cap_skipdata_s390x

...and applying this merge also did something that broke the
build directories such that rolling back to before the merge
to current trunk then failed to build with errors about
missing 'capstone.h'. I had to blow away the build trees and
recreate them.

thanks
-- PMM

Re: [PULL 0/3] capstone update
Posted by Richard Henderson 4 years, 3 months ago
On 1/10/20 6:07 AM, Peter Maydell wrote:
> On Wed, 8 Jan 2020 at 04:23, Richard Henderson
> <richard.henderson@linaro.org> wrote:
>>
>> The following changes since commit 035eed4c0d257c905a556fa0f4865a0c077b4e7f:
>>
>>   Merge remote-tracking branch 'remotes/vivier/tags/q800-for-5.0-pull-request' into staging (2020-01-07 17:08:21 +0000)
>>
>> are available in the Git repository at:
>>
>>   https://github.com/rth7680/qemu.git tags/pull-cap-20200108
>>
>> for you to fetch changes up to 7cc3836eac04a3e358b2496fbca704b3ee5197ae:
>>
>>   capstone: Add skipdata hook for s390x (2020-01-08 14:53:54 +1100)
>>
>> ----------------------------------------------------------------
>> Update capstone to next
>>
>> ----------------------------------------------------------------
>> Richard Henderson (3):
>>       capstone: Update to next
>>       capstone: Enable disassembly for s390x
>>       capstone: Add skipdata hook for s390x
> 
> Build failures:
> 
>   CC      aarch64-linux-user/disas.o
> In file included from
> /home/ubuntu/qemu/capstone/include/capstone/capstone.h:302:0,
>                  from /home/ubuntu/qemu/include/disas/capstone.h:6,
>                  from /home/ubuntu/qemu/disas.c:9:
> /home/ubuntu/qemu/capstone/include/capstone/riscv.h:16:10: fatal
> error: capstone/platform.h: No such file or directory
>  #include "capstone/platform.h"
>           ^~~~~~~~~~~~~~~~~~~~~
> compilation terminated.
> 
> (same on most hosts)

This comes from not re-running configure, which changes the CFLAGS for the
build of capstone from git.  Given that the source tree for capstone got
rearranged between 3.x and 4.0, I don't see how I can avoid this.

> aarch64 host had this complaint instead:
> 
> /home/pm/qemu/disas.c:187:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
> ‘__attribute__’ before ‘cap_skipdata_s390x_cb’
>  cap_skipdata_s390x_cb(const uint8_t *code, size_t code_size,
>  ^~~~~~~~~~~~~~~~~~~~~
> /home/pm/qemu/disas.c:211:17: error: ‘cap_skipdata_s390x_cb’
> undeclared here (not in a function); did you mean
> ‘cap_skipdata_s390x’?
>      .callback = cap_skipdata_s390x_cb
>                  ^~~~~~~~~~~~~~~~~~~~~
>                  cap_skipdata_s390x

Hmm.  Replicated on qemu-test.  There seems to have been an api change within
the 3.x series.


r~


Re: [PULL 0/3] capstone update
Posted by Peter Maydell 4 years, 3 months ago
On Mon, 13 Jan 2020 at 19:53, Richard Henderson
<richard.henderson@linaro.org> wrote:
>
> On 1/10/20 6:07 AM, Peter Maydell wrote:
> > On Wed, 8 Jan 2020 at 04:23, Richard Henderson
> > <richard.henderson@linaro.org> wrote:
> >>
> >> The following changes since commit 035eed4c0d257c905a556fa0f4865a0c077b4e7f:
> >>
> >>   Merge remote-tracking branch 'remotes/vivier/tags/q800-for-5.0-pull-request' into staging (2020-01-07 17:08:21 +0000)
> >>
> >> are available in the Git repository at:
> >>
> >>   https://github.com/rth7680/qemu.git tags/pull-cap-20200108
> >>
> >> for you to fetch changes up to 7cc3836eac04a3e358b2496fbca704b3ee5197ae:
> >>
> >>   capstone: Add skipdata hook for s390x (2020-01-08 14:53:54 +1100)
> >>
> >> ----------------------------------------------------------------
> >> Update capstone to next
> >>
> >> ----------------------------------------------------------------
> >> Richard Henderson (3):
> >>       capstone: Update to next
> >>       capstone: Enable disassembly for s390x
> >>       capstone: Add skipdata hook for s390x
> >
> > Build failures:
> >
> >   CC      aarch64-linux-user/disas.o
> > In file included from
> > /home/ubuntu/qemu/capstone/include/capstone/capstone.h:302:0,
> >                  from /home/ubuntu/qemu/include/disas/capstone.h:6,
> >                  from /home/ubuntu/qemu/disas.c:9:
> > /home/ubuntu/qemu/capstone/include/capstone/riscv.h:16:10: fatal
> > error: capstone/platform.h: No such file or directory
> >  #include "capstone/platform.h"
> >           ^~~~~~~~~~~~~~~~~~~~~
> > compilation terminated.
> >
> > (same on most hosts)
>
> This comes from not re-running configure, which changes the CFLAGS for the
> build of capstone from git.  Given that the source tree for capstone got
> rearranged between 3.x and 4.0, I don't see how I can avoid this.

Hmm, shouldn't the update to 'configure' in this merge cause Make
to rerun configure, though ?

thanks
-- PMM