Changes between Version 5 and Version 6 of compile_all_old
- Timestamp:
- Jun 7, 2018, 2:22:42 PM (6 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
compile_all_old
v5 v6 15 15 16 16 If you have to debug surprising segfaults (you know what I mean, do you? :D ) you will need to compile your code in debug mode (see below). 17 Then you'll have to activate the core dump generation with17 Then you'll have to activate the core dump generation (in each terminal) with 18 18 {{{ 19 19 $ ulimit -c unlimited 20 20 }}} 21 Then when your program crashes, it will generate a "core" file. Use gdb with your binary as the first parameter (again, compiled in debug mode) and the core file as the second parameter. 21 To be sure that the kernel will generate those migthy core file you should issue this command 22 {{{ 23 echo core > /proc/sys/kernel/core_pattern (en sudo) 24 }}} 25 Then when your program crashes, it will generate a "core" file. Use gdb with your binary as the first parameter (again, compiled in debug mode) and the core file as the second parameter (use your cross compiled gdb in case of cross development, arm-poky...-gdb for instance to debug an arm code from your PC). 22 26 It should load your program symbols. Then the "bt" command will show the backtrace, which is the sequence of function calls that resulted in the crash, allowing you to know exactly where is the problem. 27 23 28 24 29 == Full framework ==