Backtrace from corrupted core
12 April, 2013 - 1 min read
Steps to get the backtrace from the core file with the corrupted stack.
- Run the gdb with the core file
- execute 'x /512xg $sp'
- Capture all the output into 1.txt file.
- Copy the scipt.sh into folder which has 1.txt file.
- Run the script. It would generate the 2.txt file
- Open the 2.txt.
- Copy the 20 lines from the file and execute those in the gdb console.
- Repeat the step 7 for all the lines in 2.txt.
It will give the backtrace from the core.
script.sh --->
cat 1.txt | awk '/:/ {print $2 "\n" $3}' | sort | grep -v "0x00000000000*" | grep -v "0xff*" |awk '/0x/ {print "info line * " $0}' > 2.txt