mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-03 11:12:27 +00:00
Add C++ demangling to privileged runtime
Cosmo will now print C++ symbols correctly in --ftrace logs and backtraces. Doing this required reducing the memory requirement of the __demangle() function by 3x. This was accomplished using 16-bit indices and 16-bit malloc granularity. That puts a limit on the longest symbol we can successfully decode, which I think would be around 6553 characters long, given a 65536-byte buffer
This commit is contained in:
parent
dcd626edf8
commit
165c6b37e2
13 changed files with 727 additions and 284 deletions
|
@ -100,6 +100,10 @@ $(LIBC_STR_A_OBJS): private \
|
|||
-Wframe-larger-than=4096 \
|
||||
-Walloca-larger-than=4096
|
||||
|
||||
o/$(MODE)/libc/str/demangle.o: private \
|
||||
OVERRIDE_CFLAGS += \
|
||||
-ffreestanding
|
||||
|
||||
LIBC_STR_LIBS = $(foreach x,$(LIBC_STR_ARTIFACTS),$($(x)))
|
||||
LIBC_STR_SRCS = $(foreach x,$(LIBC_STR_ARTIFACTS),$($(x)_SRCS))
|
||||
LIBC_STR_HDRS = $(foreach x,$(LIBC_STR_ARTIFACTS),$($(x)_HDRS))
|
||||
|
|
4172
libc/str/demangle.c
4172
libc/str/demangle.c
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue