Kun-Tian / call-stack-logger

Call Stack Logger uses function instrumentation to facilitate logging of every function call. Each nesting adds an ident, whereas returning from a function removes it. As the result call stack tree is produced at the runtime giving knowledge of the actual program's flow of execution.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Call Stack Logger

Call Stack Logger uses function instrumentation to facilitate logging of every function call. Each nesting adds an ident, whereas returning from a function removes it. As the result call stack tree is produced at the runtime giving knowledge of the actual program's flow of execution.

Call Stack logger capture

Requirements

GNU Binutils

It is required in order to get access to BFD (Binary File Descriptor library) necessary to get information about object files and manipulate them.

sudo apt-get install binutils-dev

Building and running

git clone https://github.com/TomaszAugustyn/call-stack-logger.git
cd call-stack-logger

# build with default logging
make
# or for extended logging you can play with these flags
make log_with_addr=1 log_not_demangled=1
# or to compile your application with disabled instrumentation (no logging)
make disable_instrumentation=1

make run

About

Call Stack Logger uses function instrumentation to facilitate logging of every function call. Each nesting adds an ident, whereas returning from a function removes it. As the result call stack tree is produced at the runtime giving knowledge of the actual program's flow of execution.


Languages

Language:C++ 92.0%Language:Makefile 8.0%