List all predefined macros – gcc

Read more

CLion Linux Kernel Module Development

Define Makefile as shown: Finally, reload Makefile project via refresh button Read more

C++ Metaprogramming Tricks

Check that static method exists Things to remember for template type deduction Template Class Members Deducing Function Argument Type Feature Flags Iterating over variadic template arguments in function Read more

C++ Metaprogramming – Tuple

In this article I’m going to implement a custom Tuple implementation inspired by https://medium.com/@mortificador/implementing-std-tuple-in-c-17-3cc5c6da7277. Custom tuple-like structures are useful when implementing DSL on top of C++. Implementation Example Read more

C/C++ Useful Articles

Read more

Creating a JNI Class in Kotlin

In order to invoke a JNI we need to create a Kotlin class with extrenal method and a C function with specific signature for each external method in Kotlin. Let’s assume that we have the following class in Kotlin: For... Read more

Calling Conventions

ARM64 For this architecture functions arguments are passed via registers x0-x7. x0 is also a return value register. Read more

GDB tips&tricks

Common commands Remote Debug On machine serving port To attach Read more

CMake add element to a list

Things I often forget Define and/or add elements to a list Read more

Listing all variables in CMake build

To list all CMake variables in a build job, enter the following: Read more