cont: 執行下去, 直到下一個中斷點或程式結束為止
<c>
next: 執行一行程式碼。不會跳進函式去執行
<n>
step: 執行一列程式碼, 但是如果遇到函數呼叫, 要跳進函數裡去一步一步執行, 不要把整個函數呼叫當做一步來執行.
<s>
print: 傾印變數內容
<p>
<p *> 若變數為pointer則使用加上 * 來觀看所指向的記憶體資料
break filename:linenum
(gdb) b AT_ChannelMgr.cpp:651
Breakpoint 1 at 0x65370c: file MainMenu/AT_ChannelMgr.cpp, line 651.
Breakpoint 1, ChangeLiveTVChannel (param=0x101094b8) at MainMenu/AT_ChannelMgr.cpp:651
651 curSrc = THIS->m_handles->GetSetupClass()->GetSource();
break [function]
(gdb) b UiMainAct::ChannelMgr_RC_UP_action
Breakpoint 2 at 0x6541bc: file MainMenu/AT_ChannelMgr.cpp, line 816.
Breakpoint 2, UiMainAct::ChannelMgr_RC_BLUE_action (this=0x101094b8, e=0x7fa21cc8) at MainMenu/AT_ChannelMgr.cpp:1649
1649 S_DEBUG("state HisenseChannelEdit, event RC_BLUE\n");
break [args] if [cond]
/************************************************************/
for (i=0; i<=defATVChNumMax; i++)
{
if (ChList->channel[i].mode != 0x00)
ChList->channel[i].chNum.userNum = i+1;
}
/************************************************************/
(gdb) b AT_ChannelMgr.cpp:1490 if i==20
Breakpoint 3 at 0x655e38: file MainMenu/AT_ChannelMgr.cpp, line 1490.
Breakpoint 3, UiMainAct::ChannelMgr_RC_RED_action (this=0x101094b8, e=0x7fa21cc8) at MainMenu/AT_ChannelMgr.cpp:1490
1490 if (ChList->channel[i].mode != 0x00)
disable <dis> (除能中斷點)
(後面不帶號碼表示全部除能)
enable <en> (致能中斷點)
(後面不帶號碼表示全部致能)
(gdb) list <l>
639 CMD_SM_TV_PLAYCH data;
640
641 EQ_EVENT displayEvent;
642 EqEventQ *queue;
643
644 UiMainAct* THIS = (UiMainAct *)param;
645
646 //Currently, if in no-TV source, we only set source back to TV
647 //It depends on customer request
648 SourceOption curSrc; //, targetSrc
(gdb) bt
#0 ChangeLiveTVChannel (param=0x101094b8) at MainMenu/AT_ChannelMgr.cpp:644
#1 0x00656384 in UiMainAct::ChannelMgr_RC_RED_action (this=0x101094b8, e=0x7fa21cc8) at MainMenu/AT_ChannelMgr.cpp:1573
#2 0x005b41c4 in UiMain::ChannelMgr (this=0x101093b0, e=0x7fa21cc8) at QS_ChannelMgr.cpp:54
#3 0x006aebfc in QHsm::dispatch (this=0x101093b0, e=0x7fa21cc8) at qhsm.cpp:117
#4 0x004064dc in ui_thread_ (param=0x10109388) at StateManager.cpp:165
#5 0x00405f7c in StateManager::Run (this=0x10109388) at StateManager.cpp:70
#6 0x00400778 in main (argc=1, argv=0x7fa21ed4) at main.cpp:69
display 運算式: 每次中斷就顯示這個運算式
<dis>
(gdb) disp idx
1: idx = 268435456
(gdb) n
689 m_handles->GetLiveTV()->GetChannelList(SRC_STATUS_ANALOG_TV|SRC_STATUS_DIGITAL_TV, 0, &RawChList);
1: idx = 268435456
info [command]
info break ->列出中斷點
info dis play ->列出顯示式
delete [command]
delete display 1 ->刪除顯示1
delete b 1 ->刪除中斷點1