mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-15 07:19:18 +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
|
@ -73,20 +73,7 @@ dontinstrument dontasan int PrintBacktraceUsingSymbols(
|
|||
}
|
||||
#endif
|
||||
if (addr) {
|
||||
if (
|
||||
#ifdef __x86_64__
|
||||
/*
|
||||
* we subtract one to handle the case of noreturn functions
|
||||
* with a call instruction at the end, since %rip in such
|
||||
* cases will point to the start of the next function.
|
||||
* generally %rip always points to the byte after the
|
||||
* instruction. one exception is in case like __restore_rt
|
||||
* where the kernel creates a stack frame that points to the
|
||||
* beginning of the function.
|
||||
*/
|
||||
(symbol = __get_symbol(st, addr - 1)) != -1 ||
|
||||
#endif
|
||||
(symbol = __get_symbol(st, addr)) != -1) {
|
||||
if ((symbol = __get_symbol(st, addr)) != -1) {
|
||||
addend = addr - st->addr_base;
|
||||
addend -= st->symbols[symbol].x;
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue