I'm trying to use GDB to debug my C++ program.
I'm thinking if it's possible to pass arguments to a function while using GDB.
For example, I have such a program as below:
#include <iostream>
void func(int a)
{
std::cout << a << std::endl;
}
int main(int argc, char **argv)
{
func(2222);
return EXIT_SUCCESS;
}
I set a breakpoint at the line func(2222) in the function main. My question is: is it possible to set another argument to the function func, instead of 2222, while using GDB on this program?

