I am using pstack command in my c++ code and storing it in a string. The problem is it prints the stack upto last function and string becomes very heavy. Is there any way to print only last n lines of stack using pstack?
If it can't be done using pstack, then is there any other way to solve this purpose?