Skip to content

Instantly share code, notes, and snippets.

@crazyboycjr
Created August 23, 2022 02:00
Show Gist options
  • Save crazyboycjr/d5945e46210899ed80d1a96ceb309d1f to your computer and use it in GitHub Desktop.
Save crazyboycjr/d5945e46210899ed80d1a96ceb309d1f to your computer and use it in GitHub Desktop.
Display backtrace
#!/bin/bash
# Usage: scripts/display_backtrace.sh build/rpc-bench /tmp/stderr.log
if [ $# -ne 2 ]; then
echo "Usage: $0 <entry> <backtrace_file>"
exit 0
fi
ENTRY=$1
FILE=$2
addr2line -f -C -p -e $ENTRY `cat $FILE | egrep -o '\+0x[^)]+' | tr '\n' ' '`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment