radareorg / radare2-extras

Source graveyard and random candy for radare2
http://www.radare.org/
GNU Lesser General Public License v3.0
238 stars 114 forks source link

VC4 compilation error #325

Closed sylvainpelissier closed 4 months ago

sylvainpelissier commented 1 year ago

Environment

Wed 22 Mar 12:22:29 CET 2023
radare2 5.8.5 30291 @ linux-x86-64 git.4.2.1-6572-g7dd19cff68
commit: 7dd19cff683be93c7b386a43737c3b473f74dac8 build: 2023-03-22__11:35:40
Linux x86_64

Description

The VC4 plugin is not compatible with new arch plugin as it was done for blackfin: https://github.com/radareorg/radare2-extras/commit/77c8e9506106bb754b029a2c02b3e74d20911cd9

To reproduce:

$ r2pm -i vc4
...
asm_vc4.c:50:33: error: unknown type name ‘RAsmOp’; did you mean ‘RAsm’?
   50 | static int disassemble(RAsm *a, RAsmOp *op, const ut8 *buf, int len) {
      |                                 ^~~~~~
      |                                 RAsm
asm_vc4.c:80:1: error: unknown type name ‘RAsmPlugin’; did you mean ‘RAnalPlugin’?
   80 | RAsmPlugin r_asm_plugin_vc4 = {
      | ^~~~~~~~~~
      | RAnalPlugin
asm_vc4.c:81:9: error: field name not in record or union initializer
   81 |         .name = "vc4",
      |         ^
asm_vc4.c:81:9: note: (near initialization for ‘r_asm_plugin_vc4’)
asm_vc4.c:81:17: warning: initialization of ‘int’ from ‘char *’ makes integer from pointer without a cast [-Wint-conversion]
   81 |         .name = "vc4",
      |                 ^~~~~
trufae commented 4 months ago

Fixed