Simplify stack trace collection

Signed-off-by: Richard Yao <ryao@gentoo.org>