mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-03 01:38:30 +00:00
Fix ctrl-c in redbean on Windows
This commit is contained in:
parent
d458642790
commit
4bcb107cb0
12 changed files with 326 additions and 32 deletions
|
@ -107,7 +107,7 @@ static int PrintBacktraceUsingAddr2line(int fd, const struct StackFrame *bp) {
|
|||
}
|
||||
addr = frame->addr;
|
||||
#ifdef __x86_64__
|
||||
if (addr == (uintptr_t)_weaken(__gc)) {
|
||||
if (gi && addr == (uintptr_t)_weaken(__gc)) {
|
||||
do {
|
||||
--gi;
|
||||
} while ((addr = garbage->p[gi].ret) == (uintptr_t)_weaken(__gc));
|
||||
|
@ -116,7 +116,7 @@ static int PrintBacktraceUsingAddr2line(int fd, const struct StackFrame *bp) {
|
|||
argv[i++] = buf + j;
|
||||
buf[j++] = '0';
|
||||
buf[j++] = 'x';
|
||||
j += uint64toarray_radix16(addr - 1, buf + j) + 1;
|
||||
j += uint64toarray_radix16(addr, buf + j) + 1;
|
||||
}
|
||||
argv[i++] = NULL;
|
||||
if (sys_pipe2(pipefds, O_CLOEXEC) == -1) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue