Skip to content

Instantly share code, notes, and snippets.


Block or report user

Report or block snoe925

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View zeitgit
git config core.repositoryformatversion >/dev/null
if [ $? -ne 0 ]; then
echo "Not a git repository" >&2
exit 1
if [ "$1" = "enable" ]; then
snoe925 / gist:b32beb6e6cf89ae3fa4368bc3fc271b3
Created Nov 8, 2018
Using -finstrument-functions to trace function calls with call-trace
View gist:b32beb6e6cf89ae3fa4368bc3fc271b3
Using the debugger or profiler to trace function calls can be a bit tedious.
This repository implements the call trace in the executable.
apt-get install -y binutils-dev libbfd-dev libiberty-dev
My install was missing the demangle.h header. I could not find the DMGL defines so I inlined them.
I was patching an existing C build. I just included the code in one of the C files.
Then compile and link with -finstrument-functions.
You can’t perform that action at this time.