I\'m wanting to set a breakpoint on a function parameter if it is greater than a certain value. Dummy code below:
int main(void)
{
uint64_t num = 123456;
from the gdb
prompt:
break "file.c":100 if (size=852479)
or
break "file.c":100 if (size>852479)
here i am assuming you want the conditional breakpoint on line 100 and your src file is file.c
i.e if you want to break on the line that calls calc
, then that would be line 100 - modify as appropriate (you would also have to substitute size
with other
in this instance)
if you used a line no. that was one of the 1st statements in the calc
function then you would stick with size