Re: [問題] debugger
現在的X86 CPU執行模式可分為real mode, preotect mode
X86 CPU會有real mode是為了跟古早前8086/8088相容而設計出來。
所以古早的DOS還能在現代的X86系列PC上執行。
286之後而有portect mode,利用MMU實踐virtual memory及process間的獨立。
IA-32時代之後,protect mode下更細分為ring 0,1,2,3
就X86 PC版Linux而言,只要Linux一執行就已經進入protect mode。
一般AP於protect mode的ring3下執行,kernel mode於protect mode的ring 0下執行。
ring 1,2現在反而很少用(或者沒用到)。
以上是嘴砲講古,離我的記憶有些久遠,有錯誤煩請糾正。
至於要trace linux kernel,如果經濟上可以,建議:
還不如買個ARM系列的版子加上ICE,更可以輕鬆的了解Linux kernel。
※ 引述《n3oanderson (T. J.)》之銘言:
: I assume you are going to debug kernel, for GNU/ Linux is not 'real mode'
: only. User space programme runs in protected mode whereas kernel in real mode
: ( So far as I known). To debug kernel, there are several options you can
: choose, including kprobe, kgdb and kdb. Each has their own advantage. You can
: have a look it online.
: ※ 引述《SILee (打卡上班的日子)》之銘言:
: : 作者: SILee (打卡上班的日子) 看板: ASM
: : 標題: [問題] debugger
: : 時間: Thu Apr 10 22:38:57 2008
: : 請問在Linux下有支援real mode program的x86 debugger或emulator嗎?
: : GDB似乎無法run real mode program
: : 目前我都只能用VirtualBox看程式跑出來的結果對不對
: : 但是沒辦法直接看到register和memory的值實在很麻煩
: : thanks!!
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 203.73.175.18
→
05/03 01:38, , 1F
05/03 01:38, 1F
→
05/06 11:42, , 2F
05/06 11:42, 2F
推
05/15 15:26, , 3F
05/15 15:26, 3F
討論串 (同標題文章)
LinuxDev 近期熱門文章
PTT數位生活區 即時熱門文章