mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-23 22:02: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
|
@ -21,6 +21,12 @@
|
|||
|
||||
void __funcs_on_quick_exit(void);
|
||||
|
||||
/**
|
||||
* Exits process faster.
|
||||
*
|
||||
* @param exitcode is masked with 255
|
||||
* @noreturn
|
||||
*/
|
||||
wontreturn void quick_exit(int code) {
|
||||
if (_weaken(__funcs_on_quick_exit))
|
||||
_weaken(__funcs_on_quick_exit)();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue