In .gdbinit
I call to function
call open("tmp/test",1)
Then I got return value
$15 = 1
I want to use $15
to the next operation.
How can I got this var to the .gdbinit
next line ?
You can simply assign the return value to a variable with a name of your choosing:
(gdb) call $ret = open("tmp/test", 1)
(gdb) print $ret
-1