© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2023
D. VostokovFoundations of ARM64 Linux Debugging, Disassembling, and Reversinghttps://doi.org/10.1007/978-1-4842-9082-8_11

11. Function Parameters

Dmitry Vostokov1  
Dublin, Ireland

“FunctionParameters” Project

This chapter teaches how a caller function passes its parameters via registers and how a callee (the called function) accesses them. We use the following project that can be downloaded from this link:
Here is the project source code:
// FunctionParameters.cpp
int arithmetic (int a, int b);
int main(int argc, char* argv[])
      int result = arithmetic (1, 1);
return 0;
// Arithmetic.cpp ...

Get Foundations of ARM64 Linux Debugging, Disassembling, and Reversing: Analyze Code, Understand Stack Memory Usage, and Reconstruct Original C/C++ Code with ARM64 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.