On success, the function returns str. If the end-of-file is encountered while attempting to read a character, the eof indicator is set (feof). If this happens before any characters could be read, the pointer returned is a null pointer (and the contents of str remain unchanged). If a read error occurs, the error indicator (ferror) is set and a null pointer is also returned (but the contents pointed by str may have changed).
gdb-peda$ b main Breakpoint 1 at 0x68d gdb-peda$ b func Breakpoint 2 at 0x632 gdb-peda$ info b Num Type Disp Enb Address What 1 breakpoint keep y 0x0000068d <main+3> 2 breakpoint keep y 0x00000632 <func+6>
Breakpoint 2, 0x56555632 in func () gdb-peda$ find 0xdeadbeef Searching for'0xdeadbeef'in: None ranges Found 3 results, display max 3 items: bof : 0x56555696 (<main+12>: out dx,eax) bof : 0x56556696 --> 0xdeadbeef [stack] : 0xffffced0 --> 0xdeadbeef gdb-peda$