==[[Linux C gdbによるデバッグ]]==
[[Programming C]] | [[Linux]] |
以下の本からのメモ。良書。
*デバッグ対象のプログラム名とともに、gdb を起動
# gdb ./myhead
GNU gdb (GDB) Red Hat Enterprise [[Linux ]] (7.0.1-23.el5_5.2)
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTYWARR[[ANT]]Y, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i386-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading [[R]]eading symbols from /root/workspace/myhead/src/myhead...done.
(gdb)
|現在の関数のソースを表示
|-
|print EXPREXP[[R]]
|p
|式EXPRの値を表示式EXP[[R]]の値を表示
|-
|continue