3
* Be careful with gcc optimizations, they can cause strange effects
4
* Runnig with altered LD_LIBRARY_PATH (environment?)
5
LD_LIBRARY_PATH=./libopc/:./libds/ srv/opc-server
6
troubles gdb in finding function names, etc.
10
* Enter - repeats last command
11
for 'list' just continuing listing (paramters are not appended)
15
info files/target - Show information on currently loaded app
16
executable name, sections, entry point, ...
17
maintenance info sections <opt>- More information on sections
18
ALLOBJ - sections for all loaded object files (including shared libs)
19
sections - only named sections
20
flags - display only sections for which flags are true
21
ALLOC - Section will have space allocated in the process when loaded
22
LOAD - Section will be loaded from the file into the VM
23
RELOC - Section needs to be relocated before loading
25
CODE - Section contains executable code only
26
DATA - Section contains no executable code
27
ROM - Section will reside in ROM
28
CONSTRUCTOR - Section contains data for constructor/destructor lists
29
HAS_CONTENTS - Section is not empty
30
NEVER_LOAD - An instruction to the linker to not output the section
31
IS_COMMON - Section contains common symbols
32
COFF_SHARED_LIBRARY - contains COFF shared library information
34
info address <symbol> - Find address by symbol name
35
info symbol <address> - Find symbol by address
37
info files/target - Lists sections in executable files
40
file <app> - Load file
41
exec-file <app> - Load and run
43
info sharedlibrary - List of loaded shared libraries
44
sharedlibrary regex - Load shared library matching regex (only loads
45
libraries required by debugged application)
47
show auto-solib-add / set auto-solib-add <mode>
48
if on, symbols from all shared object libraries will be loaded automatically,
49
otherwise they must be loaded manually, using the sharedlibrary.
51
symbol-file <name> - Read symbol table from file
52
+ readnow - process all symbols at once, not on need
53
+ mapped - store symbol table in mmaped file
54
add-symbol-file <file> <addr> - Add additional symbols (for dynamicaly loaded
55
modules, addr specifies adress the module is
57
+ -s<section> <address> - to give an explicit section name and base address
60
file - Discard all information on app and symbols
61
symbol-file - Clear symbol information
67
ulimit -c unlimited - Allow core dumps (prior to run application)
68
core <core-dump-file-name> - Analys core dump i gdb
72
- Fully automatic mode:
73
gdb < cmds.txt > log.txt 2>&1
79
CFLAGS="-gdwarf-2 -g3" - For expanding macros
82
`-fomit-frame-pointer' - Generates functions without a stack frame