Skip to contentSkip to conversation

disas: Replace straggling CS_ARCH_SYSZ

PATCH In review Eric Farman 4 participants 5 messages Aug 24 – Aug 26

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 disas: Replace straggling CS_ARCH_SYSZ

When updating to capstone v6, the define CS_ARCH_SYSZ was replaced with CS_ARCH_SYSTEMZ, except here. On systems without capstone-devel installed, this causes a compile error:

../disas/disas-host.c: In function ‘initialize_debug_host’:
../disas/disas-host.c:78:24: error: ‘CS_ARCH_SYSZ’ undeclared (first use in this function); did you mean ‘CS_ARCH_SH’?

     78 |     s->info.cap_arch = CS_ARCH_SYSZ;
        |                        ^~~~~~~~~~~~
        |                        CS_ARCH_SH

../disas/disas-host.c:78:24: note: each undeclared identifier is reported only once for each function it appears in

Rather than making capstone required, replace the constant with the same one used elsewhere after that change.

Fixes c8220a096f ("target/s390x: Update capstone disassembly to v6")
---
 disas/disas-host.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
disas/disas-host.c +1 -1
index d41235250a..799f5e86c4 100644
@@ -75,7 +75,7 @@ static void initialize_debug_host(CPUDebug *s)
 #elif defined(__m68k__)
     s->info.print_insn = print_insn_m68k;
 #elif defined(__s390x__)
-    s->info.cap_arch = CS_ARCH_SYSZ;
+    s->info.cap_arch = CS_ARCH_SYSTEMZ;
     s->info.cap_insn_unit = 2;
     s->info.cap_insn_split = 6;
 #elif defined(__hppa__)
Signature · 1 line
2.53.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 9 lines · Eric Farman

When updating to capstone v6, the define CS_ARCH_SYSZ was replaced with CS_ARCH_SYSTEMZ, except here. On systems without capstone-devel installed, this causes a compile error:

../disas/disas-host.c: In function ‘initialize_debug_host’:
../disas/disas-host.c:78:24: error: ‘CS_ARCH_SYSZ’ undeclared (first use in this function); did you mean ‘CS_ARCH_SH’?

     78 |     s->info.cap_arch = CS_ARCH_SYSZ;
        |                        ^~~~~~~~~~~~
        |                        CS_ARCH_SH
Quoted 7 lines

../disas/disas-host.c:78:24: note: each undeclared identifier is reported only once for each function it appears in

Rather than making capstone required, replace the constant with the same one used elsewhere after that change.

Fixes c8220a096f ("target/s390x: Update capstone disassembly to v6")

Thanks Eric, I just noticed the same compile error and this resolved it for me.

Reviewed-by on v1 1/1
#2 lore raw
In reply to Eric Farman
Quoted 11 lines · Eric Farman

When updating to capstone v6, the define CS_ARCH_SYSZ was replaced with CS_ARCH_SYSTEMZ, except here. On systems without capstone-devel installed, this causes a compile error:

../disas/disas-host.c: In function ‘initialize_debug_host’:
../disas/disas-host.c:78:24: error: ‘CS_ARCH_SYSZ’ undeclared (first use in this function); did you mean ‘CS_ARCH_SH’?

      78 |     s->info.cap_arch = CS_ARCH_SYSZ;
         |                        ^~~~~~~~~~~~
         |                        CS_ARCH_SH

../disas/disas-host.c:78:24: note: each undeclared identifier is reported only once for each function it appears in

Quoted 8 lines

Rather than making capstone required, replace the constant with the same one used elsewhere after that change.

Fixes c8220a096f ("target/s390x: Update capstone disassembly to v6")
---
  disas/disas-host.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by on v1 1/1
#3 lore raw
In reply to Eric Farman
Quoted 11 lines · Eric Farman

When updating to capstone v6, the define CS_ARCH_SYSZ was replaced with CS_ARCH_SYSTEMZ, except here. On systems without capstone-devel installed, this causes a compile error:

../disas/disas-host.c: In function ‘initialize_debug_host’:
../disas/disas-host.c:78:24: error: ‘CS_ARCH_SYSZ’ undeclared (first use in this function); did you mean ‘CS_ARCH_SH’?

      78 |     s->info.cap_arch = CS_ARCH_SYSZ;
         |                        ^~~~~~~~~~~~
         |                        CS_ARCH_SH

../disas/disas-host.c:78:24: note: each undeclared identifier is reported only once for each function it appears in

Quoted 8 lines

Rather than making capstone required, replace the constant with the same one used elsewhere after that change.

Fixes c8220a096f ("target/s390x: Update capstone disassembly to v6")
---
  disas/disas-host.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

Whoops, sorry about that.

r~

#4 lore raw
Quoted 21 lines · Richard Henderson
Quoted 11 lines · Eric Farman

When updating to capstone v6, the define CS_ARCH_SYSZ was replaced with CS_ARCH_SYSTEMZ, except here. On systems without capstone-devel installed, this causes a compile error:

   ../disas/disas-host.c: In function ‘initialize_debug_host’:
   ../disas/disas-host.c:78:24: error: ‘CS_ARCH_SYSZ’ undeclared (first use in this function); did you mean ‘CS_ARCH_SH’? 78 |     s->info.cap_arch = CS_ARCH_SYSZ;
         |                        ^~~~~~~~~~~~
         |                        CS_ARCH_SH
   ../disas/disas-host.c:78:24: note: each undeclared identifier is reported only once for each function it appears in

Quoted 8 lines

Rather than making capstone required, replace the constant with the same one used elsewhere after that change.

Fixes c8220a096f ("target/s390x: Update capstone disassembly to v6")

---
  disas/disas-host.c | 2 +-

  1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 5 lines

Whoops, sorry about that.

r~

Queued.

r~