commit | 93579f6f908fa6010b141fd5da2974d878869c80 | [log] [tgz] |
---|---|---|
author | John Baldwin <jhb@FreeBSD.org> | Fri Nov 30 15:14:18 2018 -0800 |
committer | John Baldwin <jhb@FreeBSD.org> | Fri Nov 30 15:14:18 2018 -0800 |
tree | fad26e511d1d99c849f9042d0042faadce2d3c9f | |
parent | 4717cec4fe4cb3a086fb13161603112e8ded787e [diff] |
Use kinfo_getfile to implement fdwalk on FreeBSD. kinfo_getfile() requires a couple of system calls to fetch the list of open file descriptors. This can be much cheaper than invoking fstat on all of the values from 0 to the open file resource limit maximum. gdb/ChangeLog: * common/filestuff.c [HAVE_KINFO_GETFILE]: Include headers. (fdwalk) [HAVE_KINFO_GETFILE]: Use kinfo_getfile.