Horje
gdb get return value of function Code Example
gdb get return value of function
int fun() {
	return 42;
}

int main() {
	fun();
    return 0;
}

(gdb) break 2   // set breakpoint at line 2
(gdb) r

Breakpoint 1, fun () at test.c:2
2               return 42;

(gdb) finish   // $1 is the value the function returned.

Run till exit from #0  fun () at test.c:2
main () at test.c:7
7               return 0;
Value returned is $1 = 42   // we get the return value is 42




Cpp

Related
how to move your chrector in unity Code Example how to move your chrector in unity Code Example
cpp pass function with input to thread Code Example cpp pass function with input to thread Code Example
convert c++ to mips Code Example convert c++ to mips Code Example
c++ getline doesn't wait for input Code Example c++ getline doesn't wait for input Code Example
print float up to 3 decimal places in c++ Code Example print float up to 3 decimal places in c++ Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
8