1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 12:38:12 +00:00

Kernel: Demangle userspace ELF symbols in backtraces

Turns out we can use abi::__cxa_demangle() for this, and all we need to
provide is sprintf(), realloc() and free(), so this patch exposes them.

We now have fully demangled C++ backtraces :^)
This commit is contained in:
Andreas Kling 2019-11-27 14:06:24 +01:00
parent 2d1bcce34a
commit 0adbacf59e
10 changed files with 44 additions and 9 deletions

View file

@ -10,7 +10,7 @@ SlavePTY::SlavePTY(MasterPTY& master, unsigned index)
, m_master(master)
, m_index(index)
{
ksprintf(m_tty_name, "/dev/pts/%u", m_index);
sprintf(m_tty_name, "/dev/pts/%u", m_index);
set_uid(current->process().uid());
set_gid(current->process().gid());
DevPtsFS::register_slave_pty(*this);