.gdbinit
来自「fsmlabs的real time linux的内核」· GDBINIT 代码 · 共 43 行
GDBINIT
43 行
# RTLinux Debugger macros# Michael Barabanov (baraban@fsmlabs.com)# Copyright (C) 2000, Finite State Machine Labs Inc.# Released under the terms of the GPLdefine didisassemble $pc $pc+40enddefine dbgtarget remote /dev/rtf10enddefine rdbgtarget remote myhost.mycompany.com:5000end# define modaddsym# shell if grep __insmod_`basename $arg0 .o`_S /proc/ksyms |grep -v rodata >.gdbtmp; then \# cat .gdbtmp|sed 's/_S/ /;s/_L.*$//' |sort| awk 'BEGIN {printf "add-symbol-file $arg0 "} {printf "-T%s 0x%s ", $3, $1}' >.gdbtmp2; \# else echo could not find address of `basename $arg0 .o`; exit 1; \# fi# so .gdbtmp2# shell rm -f .gdbtmp .gdbtmp2# enddefine modaddsymshell if grep __insmod_`basename $arg0 .o`_S.text /proc/ksyms >.gdbtmp; then \ awk '{printf "add-symbol-file $arg0 0x%s\n", $1}' <.gdbtmp >.gdbtmp2; \ else echo could not find address of `basename $arg0 .o`; exit 1; \ fiso .gdbtmp2shell rm -f .gdbtmp .gdbtmp2enddefine modaddschedshell awk '/RTL_DIR =/ { printf "modaddsym %s/modules/rtl_sched.o\n", $3 }' rtl.mk > .gdbtmp3so .gdbtmp3shell rm -f .gdbtmp3# modaddsym ../modules/rtl_sched.oend
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?