# gdb --args /path/to/httpd -f /path/to/httpd.conf -X [...] Reading symbols from bin/httpd...done. (gdb) break spool_reqbody_cl Function "spool_reqbody_cl" not defined. Make breakpoint pending on future shared library load? (y or [n]) y Breakpoint 1 (spool_reqbody_cl) pending. (gdb) run Starting program: /path/to/httpd -f /path/to/httpd.conf -X [...] # here httpd is waiting for input, run the from the browser or curl terminal Thread 5 "httpd" hit Breakpoint 1, spool_reqbody_cl (req=0x7fffe00044d0, bytes_spooled=0x7ffff59d9910) at mod_proxy_http.c:432 432 apr_pool_t *p = req->p; (gdb) break apr_file_mktemp Breakpoint 2 at 0x7ffff7ea1a7f: file file_io/unix/mktemp.c, line 182. (gdb) break file_cleanup Breakpoint 3 at 0x7ffff7ea1b8a: file file_io/unix/open.c, line 31. (gdb) continue Continuing. # the two first breakpoints are for another file for me, so I simply continue through them Thread 5 "httpd" hit Breakpoint 2, apr_file_mktemp (fp=0x7ffff59d9780, template=0x7fffe0006e38 "/tmp/apr-tmp.XXXXXX", flags=0, p=0x7fffe0002b98) at file_io/unix/mktemp.c:182 182 APR_FOPEN_DELONCLOSE : flags; (gdb) continue Continuing. Thread 5 "httpd" hit Breakpoint 3, file_cleanup (file=0x7fffe0006e50, is_child=0) at file_io/unix/open.c:31 31 apr_status_t rv = APR_SUCCESS; (gdb) print *file $6 = {pool = 0x7fffe0002b98, filedes = 13, fname = 0x7fffe0006ec8 "/tmp/apr-tmp.zmSk2p", flags = 2375, eof_hit = 0, is_pipe = 0, timeout = -1, buffered = 0, blocking = BLK_UNKNOWN, ungetchar = -1, buffer = 0x0, bufpos = 0, bufsize = 0, dataRead = 0, direction = 0, filePtr = 0, thlock = 0x0} (gdb) continue Continuing. # now the relevant file, let's continue until file cleanup Thread 5 "httpd" hit Breakpoint 2, apr_file_mktemp (fp=0x7ffff59d9868, template=0x7fffe0006f08 "/tmp/modproxy.tmp.XXXXXX", flags=0, p=0x7fffe0002b98) at file_io/unix/mktemp.c:182 182 APR_FOPEN_DELONCLOSE : flags; (gdb) continue Continuing. # here we are, step into the function with "next" Thread 5 "httpd" hit Breakpoint 3, file_cleanup (file=0x7fffe0006f28, is_child=0) at file_io/unix/open.c:31 31 apr_status_t rv = APR_SUCCESS; (gdb) print *file $7 = {pool = 0x7fffe0002b98, filedes = 13, fname = 0x7fffe0006fa0 "/tmp/modproxy.tmp.DB9KbL", flags = 2375, eof_hit = 0, is_pipe = 0, timeout = -1, buffered = 0, blocking = BLK_UNKNOWN, ungetchar = -1, buffer = 0x0, bufpos = 0, bufsize = 0, dataRead = 0, direction = 0, filePtr = 0, thlock = 0x0} (gdb) next 32 int fd = file->filedes; (gdb) next 37 file->filedes = -1; (gdb) next 39 if (close(fd) == 0) { (gdb) next 41 if (!is_child && (file->flags & APR_FOPEN_DELONCLOSE)) { (gdb) next 42 unlink(file->fname); # the above unlink() should delete the temporary file (gdb) next 45 if (file->thlock) { # so here "/tmp/modproxy.tmp.DB9KbL" shouldn't exist anymore # can you reach this point or something went wrong/elsewhere before? # don't care thereafter, so to leave... (gdb) quit