Add a common method to format backtrace to buffer, so it can be used by both mm, fs and other possoble modules. Signed-off-by: fangpeina <fangpeina@xiaomi.com>