mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-02-07 06:53:33 +00:00
Show file descriptors on crash on Windows
This commit is contained in:
parent
87a6669900
commit
8313dca982
2 changed files with 4 additions and 1 deletions
|
@ -20,6 +20,7 @@
|
|||
#include "libc/atomic.h"
|
||||
#include "libc/calls/blockcancel.internal.h"
|
||||
#include "libc/calls/calls.h"
|
||||
#include "libc/calls/internal.h"
|
||||
#include "libc/calls/state.internal.h"
|
||||
#include "libc/calls/struct/sigaction.h"
|
||||
#include "libc/calls/struct/siginfo.h"
|
||||
|
@ -242,6 +243,9 @@ static relegated void ShowCrashReport(int err, int sig, siginfo_t *si,
|
|||
}
|
||||
kprintf("\n");
|
||||
__print_maps(15);
|
||||
if (g_fds.n)
|
||||
kprintf("\n");
|
||||
__printfds(g_fds.p, g_fds.n);
|
||||
if (__argv)
|
||||
for (i = 0; i < __argc; ++i)
|
||||
kprintf("%s ", __argv[i]);
|
||||
|
|
|
@ -39,7 +39,6 @@ textwindows int sys_getsockopt_nt(struct Fd *fd, int level, int optname,
|
|||
uint64_t ms;
|
||||
uint32_t in_optlen;
|
||||
struct linger_nt linger;
|
||||
npassert(fd->kind == kFdSocket);
|
||||
|
||||
if (out_opt_optval && inout_optlen) {
|
||||
in_optlen = *inout_optlen;
|
||||
|
|
Loading…
Reference in a new issue