Debug

  • 注意
    1. debuginfo-install commnad --> yum install yum-utils
    

-- from source code . add log_stack_trace () ps: source3\lib\util.c

-- DDD

  1. on kernel 3.10.0-327.4.5.el7.x86_64, yum update gdb
  2. yum install ddd
  3. http://landley.net/kdocs/Documentation/DocBook/xhtml-nochunks/kgdb.html#quickKDBserial

yum install gdb-gdbserver

http://www.thegeekstuff.com/2014/04/gdbserver-example/

disalbe firewall and selinux

http://www.thegeekstuff.com/2014/04/gdbserver-example/

debugStub.hideBreakpoints=1

asm("int $3"); do_one_initcall

http://joseph.nlpweb.org/blog/2011/12/05/linux-kernel-dev-module-debugging-gdb-kdgb/ https://sysprogs.com/w/making-breakpoints-work-with-vmware-gdb-stub/

http://stackoverflow.com/questions/2606711/how-to-debug-problems-in-linux-kernel-module-init --> 算出 loaded address

http://darkdust.net/files/GDB%20Cheat%20Sheet.pdf --> gdb commands

https://sourceware.org/gdb/onlinedocs/gdb/Separate-Debug-Files.html -->external symbol

http://sysprogs.com/VisualKernel/documentation/kernelsymbols -->斷 module init 的方法

CONFIG_DEBUG_RODATA CONFIG_DEBUG_SET_MODULE_RONX -->這兩個設定 可能會影響debug.

./configure --enable-debug CFLAGS="-g -o0" --> for project source code

https://blackfin.uclinux.org/doku.php?id=linux-kernel:debug:kgdb, --> debug kernel over lan

results matching ""

    No results matching ""