| 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 (
dashpackage) See Debain Reference - GNU make (
makepackage) See Debain Reference - GNU C compiler (
gccpackage) *- See the
gccintropackage 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 (
gdbpackage) *gdb -tui: Run GDB with TUI (full screen mode)dddpackage: The Data Display Debugger, a graphical debugger frontend
- GNU assembler, linker and binary utilities (
binutilspackage) *readelf- Displays information about ELF files.objdump- Display information from object files.- Use this with
--demanglefor C++. - Use this with
--disassembleto disassemble code.
- Use this with
nm- List symbols from object files.- Use this with
--demanglefor 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-binpackage)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-basepackage) *- Remove cpp
#ifdeflines from files (unifdefpackage) *unifdef,unifdefall— Remove preprocessor conditionals from code- This is useful for avoiding distractions when studying code.
- Utility to list open files (
lsofpackage)lsof- List open files
- Utility for memory debugger
gccwith-fstack-protector- Stack smashing protector (SSP) *valgrindpackage - A suite of tools for debugging and profiling programsalleyooppackage - Valgrind memory checker front-end for GNOMEelectric-fencepackage - 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
dumapckage - A fork ofelectric-fencewith more features- a memory-usage debugger for C/C++ programs
LD_PRELOAD=/path/to/libefence.so.0.0 your-buggy-program
leaktracerpackage - Simple and efficient memory-leak tracer for C++ programsLeakCheckleak-analyze- A memory-usage debugger for C++ programsLD_PRELOAD=/path/to/LeakTracer.so your-buggy-program
libdmalloc-devpackage - Debug memory allocation library (development files and doc)- Drop in replacement for the system’s
malloc,realloc,calloc,freeand 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 |