Skip to content

Support Windows ARM64 (aarch64-pc-windows-msvc) target #232

@Cdm2883

Description

@Cdm2883
cargo build --target aarch64-pc-windows-msvc

When trying to compile frida-gum for Windows ARM64 on Windows x86_64, the build fails.

full outputs
   Compiling frida-gum v0.17.1                                                                                                                                                                       
error[E0308]: mismatched types                                                                                                                                                                       
 --> <PATH_TO_RUST>\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\frida-gum-0.17.1\src\instruction_writer\aarch64\branch.rs:5:10
  |
5 |     Eq = gum_sys::arm64_cc_ARM64_CC_EQ,
  |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `u32`, found `i32`

error[E0308]: mismatched types
 --> <PATH_TO_RUST>\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\frida-gum-0.17.1\src\instruction_writer\aarch64\branch.rs:6:10
  |
6 |     Ne = gum_sys::arm64_cc_ARM64_CC_NE,
  |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `u32`, found `i32`

error[E0308]: mismatched types
 --> <PATH_TO_RUST>\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\frida-gum-0.17.1\src\instruction_writer\aarch64\branch.rs:7:10
  |
7 |     Hs = gum_sys::arm64_cc_ARM64_CC_HS,
  |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `u32`, found `i32`

error[E0308]: mismatched types
 --> <PATH_TO_RUST>\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\frida-gum-0.17.1\src\instruction_writer\aarch64\branch.rs:8:10
  |
8 |     Lo = gum_sys::arm64_cc_ARM64_CC_LO,
  |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `u32`, found `i32`

error[E0308]: mismatched types
 --> <PATH_TO_RUST>\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\frida-gum-0.17.1\src\instruction_writer\aarch64\branch.rs:9:10
  |
9 |     Mi = gum_sys::arm64_cc_ARM64_CC_MI,
  |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `u32`, found `i32`

error[E0308]: mismatched types
  --> <PATH_TO_RUST>\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\frida-gum-0.17.1\src\instruction_writer\aarch64\branch.rs:10:10
   |
10 |     Pl = gum_sys::arm64_cc_ARM64_CC_PL,
   |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `u32`, found `i32`

error[E0308]: mismatched types
  --> <PATH_TO_RUST>\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\frida-gum-0.17.1\src\instruction_writer\aarch64\branch.rs:11:10
   |
11 |     Vs = gum_sys::arm64_cc_ARM64_CC_VS,
   |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `u32`, found `i32`

error[E0308]: mismatched types
  --> <PATH_TO_RUST>\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\frida-gum-0.17.1\src\instruction_writer\aarch64\branch.rs:12:10
   |
12 |     Vc = gum_sys::arm64_cc_ARM64_CC_VC,
   |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `u32`, found `i32`

error[E0308]: mismatched types
  --> <PATH_TO_RUST>\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\frida-gum-0.17.1\src\instruction_writer\aarch64\branch.rs:13:10
   |
13 |     Hi = gum_sys::arm64_cc_ARM64_CC_HI,
   |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `u32`, found `i32`

error[E0308]: mismatched types
  --> <PATH_TO_RUST>\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\frida-gum-0.17.1\src\instruction_writer\aarch64\branch.rs:14:10
   |
14 |     Ls = gum_sys::arm64_cc_ARM64_CC_LS,
   |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `u32`, found `i32`

error[E0308]: mismatched types
  --> <PATH_TO_RUST>\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\frida-gum-0.17.1\src\instruction_writer\aarch64\branch.rs:15:10
   |
15 |     Ge = gum_sys::arm64_cc_ARM64_CC_GE,
   |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `u32`, found `i32`

error[E0308]: mismatched types
  --> <PATH_TO_RUST>\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\frida-gum-0.17.1\src\instruction_writer\aarch64\branch.rs:16:10
   |
16 |     Lt = gum_sys::arm64_cc_ARM64_CC_LT,
   |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `u32`, found `i32`

error[E0308]: mismatched types
  --> <PATH_TO_RUST>\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\frida-gum-0.17.1\src\instruction_writer\aarch64\branch.rs:17:10
   |
17 |     Gt = gum_sys::arm64_cc_ARM64_CC_GT,
   |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `u32`, found `i32`

error[E0308]: mismatched types
  --> <PATH_TO_RUST>\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\frida-gum-0.17.1\src\instruction_writer\aarch64\branch.rs:18:10
   |
18 |     Le = gum_sys::arm64_cc_ARM64_CC_LE,
   |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `u32`, found `i32`

error[E0308]: mismatched types
  --> <PATH_TO_RUST>\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\frida-gum-0.17.1\src\instruction_writer\aarch64\branch.rs:19:10
   |
19 |     Al = gum_sys::arm64_cc_ARM64_CC_AL,
   |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `u32`, found `i32`

error[E0308]: mismatched types
  --> <PATH_TO_RUST>\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\frida-gum-0.17.1\src\instruction_writer\aarch64\branch.rs:20:10
   |
20 |     Nv = gum_sys::arm64_cc_ARM64_CC_NV,
   |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `u32`, found `i32`

error[E0308]: mismatched types
 --> <PATH_TO_RUST>\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\frida-gum-0.17.1\src\instruction_writer\aarch64\index.rs:6:18
  |
6 |     PostAdjust = gum_sys::_GumArm64IndexMode_GUM_INDEX_POST_ADJUST,
  |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `u32`, found `i32`

error[E0308]: mismatched types
 --> <PATH_TO_RUST>\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\frida-gum-0.17.1\src\instruction_writer\aarch64\index.rs:7:20
  |
7 |     SignedOffset = gum_sys::_GumArm64IndexMode_GUM_INDEX_SIGNED_OFFSET,
  |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `u32`, found `i32`

error[E0308]: mismatched types
 --> <PATH_TO_RUST>\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\frida-gum-0.17.1\src\instruction_writer\aarch64\index.rs:8:17
  |
8 |     PreAdjust = gum_sys::_GumArm64IndexMode_GUM_INDEX_PRE_ADJUST,
  |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `u32`, found `i32`

error[E0308]: arguments to this function are incorrect                                                                                                                                               
     --> <PATH_TO_RUST>\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\frida-gum-0.17.1\src\instruction_writer\aarch64\writer.rs:105:13
      |
105   |             gum_sys::gum_arm64_writer_put_sub_reg_reg_imm(
      |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
106   |                 self.writer,
107   |                 dst_reg as u32,
      |                 -------------- expected `i32`, found `u32`
108   |                 left_reg as u32,
      |                 --------------- expected `i32`, found `u32`
      |
note: function defined here
     --> <PATH_TO_MY_PROJECT>\target\aarch64-pc-windows-msvc\debug\build\frida-gum-sys-3e780aa374fae721\out/bindings.rs:45755:12
      |
45755 |     pub fn gum_arm64_writer_put_sub_reg_reg_imm(
      |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: you can convert a `u32` to an `i32` and panic if the converted value doesn't fit
      |
107   |                 (dst_reg as u32).try_into().unwrap(),
      |                 +              +++++++++++++++++++++                                                                                                                                          
help: you can convert a `u32` to an `i32` and panic if the converted value doesn't fit
      |
108   |                 (left_reg as u32).try_into().unwrap(),
      |                 +               +++++++++++++++++++++                                                                                                                                         

error[E0308]: arguments to this function are incorrect
     --> <PATH_TO_RUST>\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\frida-gum-0.17.1\src\instruction_writer\aarch64\writer.rs:122:13
      |
122   |             gum_sys::gum_arm64_writer_put_add_reg_reg_imm(
      |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
123   |                 self.writer,
124   |                 dst_reg as u32,
      |                 -------------- expected `i32`, found `u32`
125   |                 left_reg as u32,
      |                 --------------- expected `i32`, found `u32`
      |
note: function defined here
     --> <PATH_TO_MY_PROJECT>\target\aarch64-pc-windows-msvc\debug\build\frida-gum-sys-3e780aa374fae721\out/bindings.rs:45739:12
      |
45739 |     pub fn gum_arm64_writer_put_add_reg_reg_imm(
      |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: you can convert a `u32` to an `i32` and panic if the converted value doesn't fit
      |
124   |                 (dst_reg as u32).try_into().unwrap(),
      |                 +              +++++++++++++++++++++                                                                                                                                          
help: you can convert a `u32` to an `i32` and panic if the converted value doesn't fit
      |
125   |                 (left_reg as u32).try_into().unwrap(),
      |                 +               +++++++++++++++++++++                                                                                                                                         

error[E0308]: arguments to this function are incorrect
     --> <PATH_TO_RUST>\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\frida-gum-0.17.1\src\instruction_writer\aarch64\writer.rs:139:13
      |
139   |             gum_sys::gum_arm64_writer_put_add_reg_reg_reg(
      |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
140   |                 self.writer,
141   |                 dst_reg as u32,
      |                 -------------- expected `i32`, found `u32`
142   |                 left_reg as u32,
      |                 --------------- expected `i32`, found `u32`
143   |                 right_reg as u32,
      |                 ---------------- expected `i32`, found `u32`
      |
note: function defined here
     --> <PATH_TO_MY_PROJECT>\target\aarch64-pc-windows-msvc\debug\build\frida-gum-sys-3e780aa374fae721\out/bindings.rs:45747:12
      |
45747 |     pub fn gum_arm64_writer_put_add_reg_reg_reg(
      |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: you can convert a `u32` to an `i32` and panic if the converted value doesn't fit
      |
141   |                 (dst_reg as u32).try_into().unwrap(),
      |                 +              +++++++++++++++++++++                                                                                                                                          
help: you can convert a `u32` to an `i32` and panic if the converted value doesn't fit
      |
142   |                 (left_reg as u32).try_into().unwrap(),
      |                 +               +++++++++++++++++++++                                                                                                                                         
help: you can convert a `u32` to an `i32` and panic if the converted value doesn't fit
      |
143   |                 (right_reg as u32).try_into().unwrap(),
      |                 +                +++++++++++++++++++++                                                                                                                                        

error[E0308]: arguments to this function are incorrect
     --> <PATH_TO_RUST>\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\frida-gum-0.17.1\src\instruction_writer\aarch64\writer.rs:151:13
      |
151   |             gum_sys::gum_arm64_writer_put_mov_reg_reg(self.writer, dst_reg as u32, src_reg as u32)
      |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^              --------------  -------------- expected `i32`, found `u32`
      |                                                                    |
      |                                                                    expected `i32`, found `u32`
      |
note: function defined here
     --> <PATH_TO_MY_PROJECT>\target\aarch64-pc-windows-msvc\debug\build\frida-gum-sys-3e780aa374fae721\out/bindings.rs:45719:12
      |
45719 |     pub fn gum_arm64_writer_put_mov_reg_reg(
      |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: you can convert a `u32` to an `i32` and panic if the converted value doesn't fit
      |
151   |             gum_sys::gum_arm64_writer_put_mov_reg_reg(self.writer, (dst_reg as u32).try_into().unwrap(), src_reg as u32)
      |                                                                    +              +++++++++++++++++++++                                                                                       
help: you can convert a `u32` to an `i32` and panic if the converted value doesn't fit
      |
151   |             gum_sys::gum_arm64_writer_put_mov_reg_reg(self.writer, dst_reg as u32, (src_reg as u32).try_into().unwrap())
      |                                                                                    +              +++++++++++++++++++++                                                                       

error[E0308]: arguments to this function are incorrect
     --> <PATH_TO_RUST>\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\frida-gum-0.17.1\src\instruction_writer\aarch64\writer.rs:166:13
      |
166   |             gum_sys::gum_arm64_writer_put_stp_reg_reg_reg_offset(
      |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
167   |                 self.writer,
168   |                 reg_a as u32,
      |                 ------------ expected `i32`, found `u32`
169   |                 reg_b as u32,
      |                 ------------ expected `i32`, found `u32`
170   |                 reg_dst as u32,
      |                 -------------- expected `i32`, found `u32`
      |
note: function defined here
     --> <PATH_TO_MY_PROJECT>\target\aarch64-pc-windows-msvc\debug\build\frida-gum-sys-3e780aa374fae721\out/bindings.rs:45709:12
      |
45709 |     pub fn gum_arm64_writer_put_stp_reg_reg_reg_offset(
      |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: you can convert a `u32` to an `i32` and panic if the converted value doesn't fit
      |
168   |                 (reg_a as u32).try_into().unwrap(),
      |                 +            +++++++++++++++++++++                                                                                                                                            
help: you can convert a `u32` to an `i32` and panic if the converted value doesn't fit
      |
169   |                 (reg_b as u32).try_into().unwrap(),
      |                 +            +++++++++++++++++++++                                                                                                                                            
help: you can convert a `u32` to an `i32` and panic if the converted value doesn't fit
      |
170   |                 (reg_dst as u32).try_into().unwrap(),
      |                 +              +++++++++++++++++++++                                                                                                                                          

error[E0308]: arguments to this function are incorrect
     --> <PATH_TO_RUST>\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\frida-gum-0.17.1\src\instruction_writer\aarch64\writer.rs:185:13
      |
185   |             gum_sys::gum_arm64_writer_put_ldr_reg_reg_offset(
      |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
186   |                 self.writer,
187   |                 reg_a as u32,
      |                 ------------ expected `i32`, found `u32`
188   |                 reg_src as u32,
      |                 -------------- expected `i32`, found `u32`
      |
note: function defined here
     --> <PATH_TO_MY_PROJECT>\target\aarch64-pc-windows-msvc\debug\build\frida-gum-sys-3e780aa374fae721\out/bindings.rs:45643:12
      |
45643 |     pub fn gum_arm64_writer_put_ldr_reg_reg_offset(
      |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: you can convert a `u32` to an `i32` and panic if the converted value doesn't fit
      |
187   |                 (reg_a as u32).try_into().unwrap(),
      |                 +            +++++++++++++++++++++                                                                                                                                            
help: you can convert a `u32` to an `i32` and panic if the converted value doesn't fit
      |
188   |                 (reg_src as u32).try_into().unwrap(),
      |                 +              +++++++++++++++++++++                                                                                                                                          

error[E0308]: arguments to this function are incorrect
     --> <PATH_TO_RUST>\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\frida-gum-0.17.1\src\instruction_writer\aarch64\writer.rs:201:13
      |
201   |             gum_sys::gum_arm64_writer_put_str_reg_reg_offset(
      |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
202   |                 self.writer,
203   |                 reg_src as u32,
      |                 -------------- expected `i32`, found `u32`
204   |                 reg_dst as u32,
      |                 -------------- expected `i32`, found `u32`
      |
note: function defined here
     --> <PATH_TO_MY_PROJECT>\target\aarch64-pc-windows-msvc\debug\build\frida-gum-sys-3e780aa374fae721\out/bindings.rs:45682:12
      |
45682 |     pub fn gum_arm64_writer_put_str_reg_reg_offset(
      |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: you can convert a `u32` to an `i32` and panic if the converted value doesn't fit
      |
203   |                 (reg_src as u32).try_into().unwrap(),
      |                 +              +++++++++++++++++++++                                                                                                                                          
help: you can convert a `u32` to an `i32` and panic if the converted value doesn't fit
      |
204   |                 (reg_dst as u32).try_into().unwrap(),
      |                 +              +++++++++++++++++++++                                                                                                                                          

error[E0308]: arguments to this function are incorrect
     --> <PATH_TO_RUST>\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\frida-gum-0.17.1\src\instruction_writer\aarch64\writer.rs:212:13
      |
212   |             gum_sys::gum_arm64_writer_put_cmp_reg_reg(self.writer, reg_a as u32, reg_b as u32) != 0
      |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^              ------------  ------------ expected `i32`, found `u32`
      |                                                                    |
      |                                                                    expected `i32`, found `u32`
      |
note: function defined here
     --> <PATH_TO_MY_PROJECT>\target\aarch64-pc-windows-msvc\debug\build\frida-gum-sys-3e780aa374fae721\out/bindings.rs:45819:12
      |
45819 |     pub fn gum_arm64_writer_put_cmp_reg_reg(
      |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: you can convert a `u32` to an `i32` and panic if the converted value doesn't fit
      |
212   |             gum_sys::gum_arm64_writer_put_cmp_reg_reg(self.writer, (reg_a as u32).try_into().unwrap(), reg_b as u32) != 0
      |                                                                    +            +++++++++++++++++++++                                                                                         
help: you can convert a `u32` to an `i32` and panic if the converted value doesn't fit
      |
212   |             gum_sys::gum_arm64_writer_put_cmp_reg_reg(self.writer, reg_a as u32, (reg_b as u32).try_into().unwrap()) != 0
      |                                                                                  +            +++++++++++++++++++++                                                                           

error[E0308]: arguments to this function are incorrect
     --> <PATH_TO_RUST>\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\frida-gum-0.17.1\src\instruction_writer\aarch64\writer.rs:226:13
      |
226   |             gum_sys::gum_arm64_writer_put_ldp_reg_reg_reg_offset(
      |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
227   |                 self.writer,
228   |                 reg_a as u32,
      |                 ------------ expected `i32`, found `u32`
229   |                 reg_b as u32,
      |                 ------------ expected `i32`, found `u32`
230   |                 reg_src as u32,
      |                 -------------- expected `i32`, found `u32`
      |
note: function defined here
     --> <PATH_TO_MY_PROJECT>\target\aarch64-pc-windows-msvc\debug\build\frida-gum-sys-3e780aa374fae721\out/bindings.rs:45699:12
      |
45699 |     pub fn gum_arm64_writer_put_ldp_reg_reg_reg_offset(
      |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: you can convert a `u32` to an `i32` and panic if the converted value doesn't fit
      |
228   |                 (reg_a as u32).try_into().unwrap(),
      |                 +            +++++++++++++++++++++                                                                                                                                            
help: you can convert a `u32` to an `i32` and panic if the converted value doesn't fit
      |
229   |                 (reg_b as u32).try_into().unwrap(),
      |                 +            +++++++++++++++++++++                                                                                                                                            
help: you can convert a `u32` to an `i32` and panic if the converted value doesn't fit
      |
230   |                 (reg_src as u32).try_into().unwrap(),
      |                 +              +++++++++++++++++++++                                                                                                                                          

error[E0308]: mismatched types
     --> <PATH_TO_RUST>\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\frida-gum-0.17.1\src\instruction_writer\aarch64\writer.rs:239:73
      |
239   |         unsafe { gum_sys::gum_arm64_writer_put_ldr_reg_u64(self.writer, reg as u32, address) != 0 }
      |                  -----------------------------------------              ^^^^^^^^^^ expected `i32`, found `u32`
      |                  |
      |                  arguments to this function are incorrect
      |
note: function defined here
     --> <PATH_TO_MY_PROJECT>\target\aarch64-pc-windows-msvc\debug\build\frida-gum-sys-3e780aa374fae721\out/bindings.rs:45602:12
      |
45602 |     pub fn gum_arm64_writer_put_ldr_reg_u64(
      |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: you can convert a `u32` to an `i32` and panic if the converted value doesn't fit
      |
239   |         unsafe { gum_sys::gum_arm64_writer_put_ldr_reg_u64(self.writer, (reg as u32).try_into().unwrap(), address) != 0 }
      |                                                                         +          +++++++++++++++++++++                                                                                      

error[E0308]: arguments to this function are incorrect
     --> <PATH_TO_RUST>\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\frida-gum-0.17.1\src\instruction_writer\aarch64\writer.rs:244:13
      |
244   |             gum_sys::gum_arm64_writer_put_push_reg_reg(self.writer, reg_a as u32, reg_b as u32) != 0
      |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^              ------------  ------------ expected `i32`, found `u32`
      |                                                                     |
      |                                                                     expected `i32`, found `u32`
      |
note: function defined here
     --> <PATH_TO_MY_PROJECT>\target\aarch64-pc-windows-msvc\debug\build\frida-gum-sys-3e780aa374fae721\out/bindings.rs:45562:12
      |
45562 |     pub fn gum_arm64_writer_put_push_reg_reg(
      |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: you can convert a `u32` to an `i32` and panic if the converted value doesn't fit
      |
244   |             gum_sys::gum_arm64_writer_put_push_reg_reg(self.writer, (reg_a as u32).try_into().unwrap(), reg_b as u32) != 0
      |                                                                     +            +++++++++++++++++++++                                                                                        
help: you can convert a `u32` to an `i32` and panic if the converted value doesn't fit
      |
244   |             gum_sys::gum_arm64_writer_put_push_reg_reg(self.writer, reg_a as u32, (reg_b as u32).try_into().unwrap()) != 0
      |                                                                                   +            +++++++++++++++++++++                                                                          

error[E0308]: arguments to this function are incorrect
     --> <PATH_TO_RUST>\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\frida-gum-0.17.1\src\instruction_writer\aarch64\writer.rs:249:13
      |
249   |             gum_sys::gum_arm64_writer_put_pop_reg_reg(self.writer, reg_a as u32, reg_b as u32) != 0
      |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^              ------------  ------------ expected `i32`, found `u32`
      |                                                                    |
      |                                                                    expected `i32`, found `u32`
      |
note: function defined here
     --> <PATH_TO_MY_PROJECT>\target\aarch64-pc-windows-msvc\debug\build\frida-gum-sys-3e780aa374fae721\out/bindings.rs:45569:12
      |
45569 |     pub fn gum_arm64_writer_put_pop_reg_reg(
      |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: you can convert a `u32` to an `i32` and panic if the converted value doesn't fit
      |
249   |             gum_sys::gum_arm64_writer_put_pop_reg_reg(self.writer, (reg_a as u32).try_into().unwrap(), reg_b as u32) != 0
      |                                                                    +            +++++++++++++++++++++                                                                                         
help: you can convert a `u32` to an `i32` and panic if the converted value doesn't fit
      |
249   |             gum_sys::gum_arm64_writer_put_pop_reg_reg(self.writer, reg_a as u32, (reg_b as u32).try_into().unwrap()) != 0
      |                                                                                  +            +++++++++++++++++++++                                                                           

error[E0308]: mismatched types
     --> <PATH_TO_RUST>\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\frida-gum-0.17.1\src\instruction_writer\aarch64\writer.rs:254:68
      |
254   |         unsafe { gum_sys::gum_arm64_writer_put_br_reg(self.writer, reg as u32) != 0 }
      |                  ------------------------------------              ^^^^^^^^^^ expected `i32`, found `u32`
      |                  |
      |                  arguments to this function are incorrect
      |
note: function defined here
     --> <PATH_TO_MY_PROJECT>\target\aarch64-pc-windows-msvc\debug\build\frida-gum-sys-3e780aa374fae721\out/bindings.rs:45469:12
      |
45469 |     pub fn gum_arm64_writer_put_br_reg(
      |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: you can convert a `u32` to an `i32` and panic if the converted value doesn't fit
      |
254   |         unsafe { gum_sys::gum_arm64_writer_put_br_reg(self.writer, (reg as u32).try_into().unwrap()) != 0 }
      |                                                                    +          +++++++++++++++++++++                                                                                           

error[E0308]: mismatched types
     --> <PATH_TO_RUST>\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\frida-gum-0.17.1\src\instruction_writer\aarch64\writer.rs:258:72
      |
258   |             gum_sys::gum_arm64_writer_put_ldr_reg_address(self.writer, reg as u32, address) != 0
      |             ---------------------------------------------              ^^^^^^^^^^ expected `i32`, found `u32`
      |             |
      |             arguments to this function are incorrect
      |
note: function defined here
     --> <PATH_TO_MY_PROJECT>\target\aarch64-pc-windows-msvc\debug\build\frida-gum-sys-3e780aa374fae721\out/bindings.rs:45588:12
      |
45588 |     pub fn gum_arm64_writer_put_ldr_reg_address(
      |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: you can convert a `u32` to an `i32` and panic if the converted value doesn't fit
      |
258   |             gum_sys::gum_arm64_writer_put_ldr_reg_address(self.writer, (reg as u32).try_into().unwrap(), address) != 0
      |                                                                        +          +++++++++++++++++++++                                                                                       

error[E0308]: mismatched types
     --> <PATH_TO_RUST>\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\frida-gum-0.17.1\src\instruction_writer\aarch64\writer.rs:263:73
      |
263   |             gum_sys::gum_arm64_writer_put_adrp_reg_address(self.writer, reg as u32, address) != 0
      |             ----------------------------------------------              ^^^^^^^^^^ expected `i32`, found `u32`
      |             |
      |             arguments to this function are incorrect
      |
note: function defined here
     --> <PATH_TO_MY_PROJECT>\target\aarch64-pc-windows-msvc\debug\build\frida-gum-sys-3e780aa374fae721\out/bindings.rs:45668:12
      |
45668 |     pub fn gum_arm64_writer_put_adrp_reg_address(
      |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: you can convert a `u32` to an `i32` and panic if the converted value doesn't fit
      |
263   |             gum_sys::gum_arm64_writer_put_adrp_reg_address(self.writer, (reg as u32).try_into().unwrap(), address) != 0
      |                                                                         +          +++++++++++++++++++++                                                                                      

error[E0308]: mismatched types
     --> <PATH_TO_RUST>\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\frida-gum-0.17.1\src\instruction_writer\aarch64\writer.rs:271:17
      |
269   |             gum_sys::gum_arm64_writer_put_b_cond_label(
      |             ------------------------------------------ arguments to this function are incorrect
270   |                 self.writer,
271   |                 branch_condition as u32,
      |                 ^^^^^^^^^^^^^^^^^^^^^^^ expected `i32`, found `u32`
      |
note: function defined here
     --> <PATH_TO_MY_PROJECT>\target\aarch64-pc-windows-msvc\debug\build\frida-gum-sys-3e780aa374fae721\out/bindings.rs:45450:12
      |
45450 |     pub fn gum_arm64_writer_put_b_cond_label(
      |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: you can convert a `u32` to an `i32` and panic if the converted value doesn't fit
      |
271   |                 (branch_condition as u32).try_into().unwrap(),
      |                 +                       +++++++++++++++++++++                                                                                                                                 

For more information about this error, try `rustc --explain E0308`.
error: could not compile `frida-gum` (lib) due to 35 previous errors
warning: build failed, waiting for other jobs to finish...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions