In this tutorial, compilation and remote debugging of a simple C program on a rooted Android with ARM 64-bit architecture is described. The computer's hostname is ArchLinux and the smartphone Asus Zenfone is running on Android 5.0.2:
Install a cross-compiler toolchain
Install Android NDK (Native Development Kit):