Re: [問題] debugger

看板LinuxDev作者 (啊啊啊啊啊啊啊啊啊啊啊)時間17年前 (2008/05/02 21:19), 編輯推噓1(102)
留言3則, 3人參與, 最新討論串3/4 (看更多)
現在的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
有那麼輕鬆嗎!! XD
05/03 01:38, 1F

05/06 11:42, , 2F
這要很多銀彈才行啊..XD
05/06 11:42, 2F

05/15 15:26, , 3F
印象中386才有Protected mode,286好像不太完整。
05/15 15:26, 3F
文章代碼(AID): #186nJfck (LinuxDev)
討論串 (同標題文章)
本文引述了以下文章的的內容:
以下文章回應了本文
完整討論串 (本文為第 3 之 4 篇):
1
2
17年前, 04/10
1
3
文章代碼(AID): #186nJfck (LinuxDev)