- gdb
- [-help] [-nx] [-q] [-batch]
[-cd=dir] [-f] [-k] [-wcore]
[-b bps] [-tty=dev] [-s
symfile] [-e prog] [-se prog]
[-c core] [-x cmds] [-d dir]
[prog[core|procID]]
GDB
???Ϥ????Ȥ????ǥХå??ϡ??ץ??????ब?¹????⤷???ϥ????å??夷?????ˤ???
?ץ????????? ``????''
?Dz????Ԥʤ????Ƥ??뤫/?Ԥ????Ƥ???????Ĵ?٤??Τ?
???Ѥ????ޤ???
GDB ?ϡ?4 ?Ĥε?ǽ
(?ä??Ƥ??????ݡ??Ȥ??뵡ǽ)
?ˤ??ä?
?¹????˥Х??Ĥ??뤳?Ȥ??????????ޤ???
- •
- ?ץ?????????ư?????ܺ٤˻??ꤷ?ƥץ??????????¹Ԥ????롣
- •
- ???ꤷ???????ǥץ????????????ߤ????롣
- •
- ?ץ??????ब?ߤޤä????ˡ??????????ä???Ĵ?٤롣
- •
- ?Х??ˤ????????Ѥ??????????̤ΥХ???Ĵ?٤뤿???ץ????????ξ??֤??ѹ????롣
GDB ?Ǥ? C, C++, Modula-2
?ʤɤǽ줿?ץ????????ΥǥХå????Ԥʤ??ޤ???
GNU Fortran ?????ѥ??餬?????????? Fortran
?⥵?ݡ??Ȥ????ޤ???
GDB
?ϥ????륳?ޥ???gdb?ǵ?ư?????ޤ??????ä?????ư?????ȡ?GDB
???ޥ???quit???¹Ԥ??ƽ?λ?????ޤǡ?ü?????饳?ޥ??ɤ??ɤ?³???ޤ???
gdb?Υ????饤???إ??פ?(gdb??????)
help???ޥ??ɤ??¹Ԥ?????ɽ???????ޤ???
gdb
?ϰ????䥪?ץ?????̵???ǵ?ư?Ǥ??ޤ?????
?????Ƥ???1 ?Ĥ? 2
?Ĥΰ??????դ??Ƶ?ư???ޤ????¹ԥץ?????????
?????ˤ????????ϰʲ??Τ褦?ˤʤ??ޤ?:
gdb program
?ޤ??¹ԥץ????????? core
?ե???????ξ???????ꤹ?뤳?Ȥ??Ǥ??ޤ?:
gdb program core
?⤷?¹????Υץ??????ΥǥХå????Ԥʤ??????????ˤϡ?
?? 2 ?????Ȥ??? core ?????????˥ץ????? ID
?????ꤷ?ޤ?:
gdb program 1234
?????? GDB ???ץ????? ID 1234
?Υץ?????????³???ޤ?(???ΤȤ?`1234'?Ȥ???̾???Υե????뤬¸?ߤ??ƤϤ????ޤ?????
GDB ?Ϥޤ? core
?ե????????ǽ??˥????å????ˤ????????Ǥ?)??
?褯???Ѥ????? GDB
???ޥ??ɤˤϰʲ??Τ褦?ʤ??Τ??????ޤ?:
- break
[file:]function
- ?֥졼???ݥ????Ȥ? (file????)
function?????ꤷ?ޤ???
- run
[arglist]
- ?ץ????????μ¹ԤϤ??ޤ?(?⤷??????
arglist???????Ȥ???)??
- bt
- ?Хå??ȥ졼??:
?ץ????????Υ????å???ɽ?????ޤ???
- print
expr
- ?????ͤ?ɽ?????ޤ???
- c
- ?ץ????????μ¹Ԥ??Ƴ????ޤ???(???Ȥ??Х֥졼???ݥ????ȤǼ¹Ԥ????Ǥ???????)
- next
- ???Υץ????????Ԥ??¹Ԥ??ޤ???
???ι????????Ƥδؿ??? 1
???ƥåפǼ¹Ԥ????ޤ???
- step
- ???Υץ????????Ԥ??¹Ԥ??ޤ???
?⤷???ιԤ˴ؿ????ޤޤ??Ƥ????С????δؿ????ƥå¹Ԥ??Ƥ????ޤ???
- help [name]
- GDB ???ޥ???
name?ˤĤ??Ƥξ????䡢 GDB
???Ȥ????Ǥΰ???Ū?ʾ?????ɽ?????ޤ???
- quit
- GDB ????λ???ޤ???
GDB ?ξܺ٤ˤĤ??Ƥ?Using
GDB: A Guide to the GNU Source-Level Debugger, by Richard M. Stallman and
Roland H. Pesch. ?Ȥ??Ʋ???????
Ʊ???ƥ????Ȥϡ? info ?ץ???????????
gdb
?????ȥ꤫?饪???饤???ǻ??ȤǤ??ޤ???
???ץ??????ʳ??ΰ????ϡ??¹ԥե???????
core ?ե????? (?⤷???ϥץ????? ID)
??ɽ???ޤ????Ĥޤꥪ?ץ??????ե饰?Ǥ⥪?ץ??????ե饰?ΰ????Ǥ??ʤ??ǽ???
?????? `-se'
???ץ??????ǻ??ꤹ???ե???????Ʊ???ˤʤꡢ(?⤷??????)????
2 ???ܤΰ????? `-c'
???ץ??????ǻ??ꤹ???ե???????Ʊ???ˤʤ??ޤ???
???ץ???????¿???ϡ?Ĺ??ɽ??ˡ??û??ɽ??ˡ??ξ???ǻ??ꤹ?뤳?Ȥ??Ǥ???
???????????ǤϤ???ξ?????ޤ???
Ĺ??ɽ??ˡ?ϡ??ɤΥ??ץ??????Ǥ????Τ??????ΤǤ????С?û???ڤ??ͤ??Ƥ?
?????ޤ????? (???ߤˤ??? `-' ?????????? `+'
?????ѤǤ??ޤ??????????ǤϤ褯?Ѥ???????ɽ???ǵ????ޤ???)
???ƤΥ??ץ??????ȥ??ޥ??ɥ饤???????ϻ??ꤷ?????֤˽????????ޤ???
`-x'
???ץ??????Ѥ??????ȡ????ν??֤??Ѥ??äƤ??ޤ???
- -help
- -h
- û???????Ĥ??ǡ????ƤΥ??ץ???????ɽ?????ޤ???
- -s
file
- ?????ܥ??ơ??֥????ե?????
file?????ɤߤޤ???
- -e
file
- ?ե????? file
???¹Բ?ǽ?ե??????Ȥ??????Ѥ??ޤ???
core dump ??Ϣ?????? pure data
??Ĵ?٤??Τˤ??Ѥ??????ޤ???
- -se=file
- ?ե????? file
???饷???ܥ??ơ??֥????ɤߡ?Ʊ???ˤ??????¹Բ?ǽ?ե??????Ȥ??????Ѥ??ޤ???
- -c file
- ?ե????? file ?? core dump
?Ȥ??????Ѥ??ޤ???
- -x
file
- ?ե????? file???? GDB
?Υ??ޥ??ɤ??ɤ߹??ߡ??¹Ԥ??ޤ???
- -d
directory
- ???????ե???????õ?????????ѥ??? directory
???ɲä??ޤ???
- -nx
- -n
- ???????ե????? `.gdbinit'
???饳?ޥ??ɤ??ɤ߹??ߤޤ?????
?̾??ϡ?
???ƤΥ??ޥ??ɥ??ץ??????Ȱ????????????줿???ǡ?
???????ե????????Υ??ޥ??ɤ??¹Ԥ????ޤ???
- -quiet
- -q
- ??ư???Υ??å??????????? copyright
??ɽ?????ޤ?????
???????Υ??å??????ϥХå??⡼?ɤǤ??????????ޤ???
- -batch
- ?Хå??⡼?ɤ?ư??ޤ???`-x'
?ǻ??ꤷ???ե?????(?????ӡ?-nx ?? -n
???????????Ƥ??ʤ????? `.gdbinit')
???????ƤΥ??ޥ??ɤ?
?????????塢?????ͤȤ??? 0
???֤??ƽ?λ???ޤ???
???ޥ??ɥե????????? GDB
???ޥ??ɤμ¹????˥??顼?????????????ϡ?
0 ?ʳ????ͤǽ?λ???ޤ???
?Хå??⡼?ɤ? GDB
???ե??륿?Ȥ??Ƽ¹Ԥ??????硢
???Ȥ??Хץ????????????????????ɤ????̤Υ????ԥ塼?????Ǽ¹Ԥ????ꤹ??????
???????Ǥ??? ?ʲ??Υ??å?????
Program exited normally.(?ץ??????????????˽?λ???ޤ?????)
???̾GDB
??????ü?????Ǽ¹Ԥ??????ץ??????ब??λ???뤿?Ӥ?
???Ϥ????????ΤǤ?????
?Хå??⡼?ɤǤϤ??Τ褦?ʥ??å??????Ͻ??Ϥ????ޤ?????
- -cd=directory
- ???????ȥǥ??쥯?ȥ??????????? directory ??
GDB
?κ????ѥǥ??쥯?ȥ??Ȥ??Ƽ¹Ԥ??ޤ???
- -fullname
- -f
- Emacs ?? GDB
?֥ץ??????Ȥ??Ƽ¹Ԥ????ݤˤ??Υ??ץ????????ղä??ޤ???
???ΤȤ? GDB
?ϡ??????å??ե졼?बɽ??????????(?ץ??????ब???Ǥ????٤?
?ޤߤޤ?)?ˡ??????ʥե?????̾?ȹ??ֹ???ɸ??Ū??ǧ?????䤹????????ɽ?????ޤ???
????ɽ???? 2 ?Ĥ? ` 32'
ʸ?????ե?????̾?????????Ƕ??ڤ??줿???ֹ???ʸ?????֡????Ԥν??ˤʤ?
?Ƥ??ޤ????????? Emacs??GDB
???ե??????ץ????????ˤ????ơ?
?ե졼?????б????륽?????????ɤ?ɽ?????뤿????
2 ?Ĥ? ` 32'
ʸ?????Ȥ????ȤˤʤäƤ??뤫???Ǥ???
- -kernel
- -k
- gdb
???ͥ??ǥХå??⡼?ɤǻ??Ѥ??ޤ???
?ץ????ץȤ? ``(kgdb)'' ?ˤʤ??ޤ???
- -wcore
- ???Υ??ץ??????ϥ????ͥ??ǥХå??⡼?ɤ?
??ư?????Ρץ????ͥ????ǥХå????Ƥ??????Τ??Ѳ?ǽ?Ǥ??ꡢ
?????ե????? (/dev/mem)
?????߲?ǽ?ˤ??ޤ???
- -b bps
- ???⡼?ȥǥХå??Ѥ? GDB
?????Ѥ??륷?ꥢ?륤?ե???????ž??®?٤?
(?ܡ??졼?Ȥޤ??ϥӥå?/?ä?)???åȤ??ޤ???
- -tty=device
- ?ץ?????????ɸ???????Ϥ? device
?????Ѥ??ޤ???
info???? `gdb' ?????ȥ? ; Using GDB: A
Guide to the GNU Source-Level Debugger, Richard M. Stallman and Roland H.
Pesch, July 1991.
Copyright (c) 1991 Free Software Foundation, Inc.
Permission is granted to make and distribute verbatim copies of
this manual provided the copyright notice and this permission notice are
preserved on all copies.
Permission is granted to copy and distribute modified versions of
this manual under the conditions for verbatim copying, provided that the
entire resulting derived work is distributed under the terms of a permission
notice identical to this one.
Permission is granted to copy and distribute translations of this
manual into another language, under the above conditions for modified
versions, except that this permission notice may be included in translations
approved by the Free Software Foundation instead of in the original
English.