Set a one-time breakpoint with tbreak
Set a breakpoint that deletes itself after the first hit with tbreak, so a one-off stop never fires again on later passes.
tbreak creates a temporary breakpoint: it behaves like break, then deletes itself the first time it stops the program. It is the right tool when you want to get into a function once, look around, and not be interrupted again by the loop that calls it.
(gdb) tbreak handle_request
Temporary breakpoint 1 at 0x40125a: file server.c, line 52.
(gdb) run
Temporary breakpoint 1, handle_request (fd=4) at server.c:52
52 char buf[512];
(gdb) info breakpoints
No breakpoints or watchpoints.The Disp column of info breakpoints would have shown del instead of keep before the hit, and after it the table is simply empty. GDB's own start command is a tbreak main followed by run, which is why the stop in main never comes back.
tbreak takes the same location forms as break, including file:line, *address and if conditions, so tbreak server.c:70 if fd == 7 stops once, the first time the condition is true. It is one hit and gone: if the first hit is the wrong one, the breakpoint is already deleted and you must set it again. Documented in the GDB manual on breakpoints, written against GDB 16.