Friday, March 3, 2017

[Note] GDB 一些指令功能速查

[Note] GDB 一些指令功能速查

前情提要

這篇主要是介紹gdb的一些常用功能,遇到的時候方便google。

常用功能

  • backtrace
  • breakpoint
  • watchpoint
  • stopwatch
  • dump register
  • dump variable
  • continue and stop
  • disasmmebly
  • return

指令速查

  • backtrace
    • bt
  • breakpoint
    • b
    • br
  • watchpoint
    • watch variable_name or watch variable_address
  • stopwatch
  • dump register
    • info r
  • dump variable
    • print variable_name
    • print &variable_name => get address
    • print *variable_address => get address contents
    • info display
  • continue and stop
    • c => continue
    • r= > run
    • stop => Ctrl+c
  • disasmmebly
    • disassemble (func…) link
    • layout asm
    • layout src
  • return
    • return (return this stack)

Written with StackEdit.

精選文章

使用Ardunio Atmega2560 連接 nRF24L01+

使用Ardunio Atmega2560 連接 nRF24L01+ 關於library 目前主流有 https://github.com/maniacbug/RF24 與 https://github.com/TMRh20/RF24 這兩個。 其中TMRh20大大做...