Run guest kernel with:
$qemu-system-x86_64 -enable-kvm -m 2048 -device virtio-blk,drive=virtio-blk -drive file=./image,id=virtio-blk,if=none -vnc :10 -S -gdb tcp::1234
Connect to guest kernel with:
$xtightvncviewer localhost:10
The guest kernel should not run this time.
Run gdb and connect to qemu's guest kernel:
$gdb vmlinux
(gdb) target remote :1234
(gdb) hb start_kernel (use hb if -enable-kvm)
(gdb) c
Guest kernel run until start_kernel.
If get this error: Remote 'g' packet reply is too long: 00000000000000000020e30100000000000000000000
Follow this blog.csdn.net/gdt_a20/article/details/7231652
gdb debug Linux kernel (run on qemu)
Related Posts:
ARMv8 64bit ArchitectureFrom: http://www.quepublishing.com/articles/article.aspx?p=1843892&seqNum=5 The definition of a 64-bit architecture is a bit fuzzy. Typically either supporting 64-bit pointers or having 64-bit registers is considered a… Read More
Dynamic vs static library 最想解出的問題就是dynamic library是load在process何處 被老大assign的工作: 他發現他跑程式,不同的process,只要是有同一個dynamic library,point到library的pointer位置都是一樣,我也覺得很好奇 Dynamic library vs static library: Static: Usually xxx.a. 整個library compile進執… Read More
About 64bit application & OS & processor最近在想kvm for ARMv8有什麼好處 想一想發現其實這就等同於ARMv8有什麼好處 我想最重要的一點就是64bit processor吧 由此又想到一堆關於32bit vs 64bit virtualization的問題 64bit guest OS run on 32bit host OS? 64bit guest OS run on 32bit processor? Linux program run on Windows and… Read More
Port screen to ARMv8 on ARM Foundation Model最近在看ARMv8的kvm hypervisor source code 依照open virtual system的guide可以用Foundation model開host跟guest OS 一個大問題就是把host的窗執行kvm tool開guest後就沒有host的窗了 因為不知道怎用ssh連進host, 只能用telnet localhost來連,一次只能開一個窗 後來想到可以用screen在host中開很多的窗,其中一個用來開gu… Read More
Difference between vitualization and emulationVirtualization let guest run its code directive on hardware. (privilege instruction will have some issue) Emulation let the emulator know what guest want to run and run by host. Reference: http://blog.tom.aratyn.name/post/… Read More
0 意見:
張貼留言