mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-05 02:38:31 +00:00
Add MODE=optlinux build mode (#141)
This commit is contained in:
parent
226aaf3547
commit
67b5200a0b
111 changed files with 934 additions and 854 deletions
|
@ -1,10 +1,18 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_LOG_BACKTRACE_H_
|
||||
#define COSMOPOLITAN_LIBC_LOG_BACKTRACE_H_
|
||||
#include "libc/nexgen32e/stackframe.h"
|
||||
#include "libc/runtime/memtrack.internal.h"
|
||||
#include "libc/runtime/symbols.internal.h"
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
|
||||
forceinline pureconst bool IsValidStackFramePointer(struct StackFrame *x) {
|
||||
return IsLegalPointer(x) && !((uintptr_t)x & 15) &&
|
||||
(IsStaticStackFrame((uintptr_t)x >> 16) ||
|
||||
IsSigAltStackFrame((uintptr_t)x >> 16) ||
|
||||
IsOldStackFrame((uintptr_t)x >> 16));
|
||||
}
|
||||
|
||||
void ShowBacktrace(int, const struct StackFrame *);
|
||||
int PrintBacktraceUsingSymbols(int, const struct StackFrame *,
|
||||
struct SymbolTable *);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue