Previous Post | Top | Next Post |
TOC
This was originally written and created around 2013 and may require to be updated. (2021)
Utilities
Here is a list of basic utilities used for the programming.
You can find usage examples for the commands in this document if their lines are ending with *.
- POSIX shell (
dash
package) See Debain Reference - GNU make (
make
package) See Debain Reference - GNU C compiler (
gcc
package) *- See the
gccintro
package containing “Introduction to GCC by Brian J. Gough”:apt-get install gccintro
(non-free GFDL package)
- See the
- GNU C++ compiler (
g++
package) * - GNU Debugger (
gdb
package) *gdb -tui
: Run GDB with TUI (full screen mode)ddd
package: The Data Display Debugger, a graphical debugger frontend
- GNU assembler, linker and binary utilities (
binutils
package) *readelf
- Displays information about ELF files.objdump
- Display information from object files.- Use this with
--demangle
for C++. - Use this with
--disassemble
to disassemble code.
- Use this with
nm
- List symbols from object files.- Use this with
--demangle
for C++.
- Use this with
c++filt
- Demangle C++ and Java symbols. *- This is useful for studying compilation results in assembly codes or ELF binaries.
- Use
abi::__cxa_demangle()
in C++ source as http://gcc.gnu.org/onlinedocs/libstdc++/manual/ext_demangling.html[The GNU C++ Library Manual, Chapter 29. Demangling].
addr2line
- Convert addresses into file names and line numbers.ar
- Create, modify, and extract from archives.ranlib
- Generate index to archive.gprof
- Display call graph profile data.- Speed your code with the GNU profiler IBM DeveloperWorks (2006)
- HOWTO: using gprof with multithreaded applications
- Embedded GNU C Library: Binaries (
libc-bin
package)ldd
- Print shared library dependencies *iconv
- Convert encoding of given files from one encoding to another See Debain Reference
perf
- performance analysis tools for Linux (linux-base
package) *- Remove cpp
#ifdef
lines from files (unifdef
package) *unifdef
,unifdefall
— Remove preprocessor conditionals from code- This is useful for avoiding distractions when studying code.
- Utility to list open files (
lsof
package)lsof
- List open files
- Utility for memory debugger
gcc
with-fstack-protector
- Stack smashing protector (SSP) *valgrind
package - A suite of tools for debugging and profiling programsalleyoop
package - Valgrind memory checker front-end for GNOMEelectric-fence
package - Library to detect buffer overruns and under-runs- a memory-usage debugger for C programs
LD_PRELOAD=/path/to/libefence.so.0.0 your-buggy-program
duma
pckage - A fork ofelectric-fence
with more features- a memory-usage debugger for C/C++ programs
LD_PRELOAD=/path/to/libefence.so.0.0 your-buggy-program
leaktracer
package - Simple and efficient memory-leak tracer for C++ programsLeakCheck
leak-analyze
- A memory-usage debugger for C++ programsLD_PRELOAD=/path/to/LeakTracer.so your-buggy-program
libdmalloc-dev
package - Debug memory allocation library (development files and doc)- Drop in replacement for the system’s
malloc
,realloc
,calloc
,free
and other memory management routines.
- Drop in replacement for the system’s
- Utility to trace calls etc. like strace
strace
- Trace system calls and signals *ltrace
- A library call tracer *xtrace
- Trace communication between X11 client and server
- Utility to analyze code statically
pylint
- Python code static checkersplint
- A tool for statically checking C programscppcheck
- Tool for static C/C++ code analysis
Previous Post | Top | Next Post |