|
|
楼主 |
发表于 2026-2-7 07:34:24
|
显示全部楼层
本帖最后由 zzz19760225 于 2026-5-5 14:56 编辑
1234567890
一2.2环境搭建:
模拟环境搭建:虚拟机bochs(qemu)
编译环境操作系统:原书使用是centos6,已有linuxmint22.2,软件信息代码所生成的空间体=操作系统平台
- ./bochs -f bochsrc.txt -q
- ========================================================================
- Bochs x86 Emulator 2.7
- Built from SVN snapshot on August 1, 2021
- Timestamp: Sun Aug 1 10:07:00 CEST 2021
- ========================================================================
- 00000000000i[ ] BXSHARE not set. using compile time default '/usr/local/share/bochs'
- 00000000000i[ ] reading configuration from bochsrc.txt
- 00000000000i[ ] Stopping on magic break points
- 00000000000i[ ] installing x module as the Bochs GUI
- 00000000000i[ ] using log file bochs.log
- Next at t=0
- (0) [0x0000fffffff0] f000:fff0 (unk. ctxt): jmpf 0xf000:e05b ; ea5be000f0
- <bochs:1> r
- eax: 0x00000000 0
- ebx: 0x00000000 0
- ecx: 0x00000000 0
- edx: 0x00000000 0
- esp: 0x00000000 0
- ebp: 0x00000000 0
- esi: 0x00000000 0
- edi: 0x00000000 0
- eip: 0x0000fff0
- eflags 0x00000002: id vip vif ac vm rf nt IOPL=0 of df if tf sf zf af pf cf
- <bochs:2> a
- :2: syntax error at 'a'
- <bochs:3> b
- Error: pbreak of this kind not implemented yet.
- <bochs:4> c
- ^CNext at t=2020966106
- (0) [0x000000007c29] 0000:7c29 (unk. ctxt): jmp .-2 (0x00007c29) ; ebfe
- <bochs:5> d
- :5: syntax error at '
- '
- <bochs:6> e
- :6: syntax error at 'e'
- <bochs:7> f
- :7: syntax error at 'f'
- <bochs:8> g
- :8: syntax error at 'g'
- <bochs:9> h
- h|help - show list of debugger commands
- h|help command - show short command description
- -*- Debugger control -*-
- help, q|quit|exit, set, instrument, show, trace, trace-reg,
- trace-mem, u|disasm, ldsym, slist
- -*- Execution control -*-
- c|cont|continue, s|step, p|n|next, modebp, vmexitbp
- -*- Breakpoint management -*-
- vb|vbreak, lb|lbreak, pb|pbreak|b|break, sb, sba, blist,
- bpe, bpd, d|del|delete, watch, unwatch
- -*- CPU and memory contents -*-
- x, xp, setpmem, writemem, crc, info,
- r|reg|regs|registers, fp|fpu, mmx, sse, sreg, dreg, creg,
- page, set, ptime, print-stack, ?|calc
- -*- Working with bochs param tree -*-
- show "param", restore
- <bochs:10> i
- :10: syntax error at 'i'
- <bochs:11> j
- :11: syntax error at 'j'
- <bochs:12> k
- :12: syntax error at 'k'
- <bochs:13> l
- :13: syntax error at 'l'
- <bochs:14> m
- :14: syntax error at 'm'
- <bochs:15> n
- Next at t=2020966107
- (0) [0x000000007c29] 0000:7c29 (unk. ctxt): jmp .-2 (0x00007c29) ; ebfe
- <bochs:16> o
- :16: syntax error at 'o'
- <bochs:17> p
- Next at t=2020966108
- (0) [0x000000007c29] 0000:7c29 (unk. ctxt): jmp .-2 (0x00007c29) ; ebfe
- <bochs:18> q
- (0).[2020966108] [0x000000007c29] 0000:7c29 (unk. ctxt): jmp .-2 (0x00007c29) ; ebfe
- (q会退出)
- <bochs:1> r
- eax: 0x00000000 0
- ebx: 0x00000000 0
- ecx: 0x00000000 0
- edx: 0x00000000 0
- esp: 0x00000000 0
- ebp: 0x00000000 0
- esi: 0x00000000 0
- edi: 0x00000000 0
- eip: 0x0000fff0
- eflags 0x00000002: id vip vif ac vm rf nt IOPL=0 of df if tf sf zf af pf cf
- <bochs:2> s
- Next at t=1
- (0) [0x0000000fe05b] f000:e05b (unk. ctxt): xor ax, ax ; 31c0
- <bochs:3> u
- 000fe05b: ( ): xor ax, ax ; 31c0
- <bochs:4> v
- :4: syntax error at 'v'
- <bochs:5> w
- :5: syntax error at 'w'
- <bochs:6> x
- [bochs]:
- 0x00000000 <bogus+ 0>: 0x00000000
- <bochs:7> y
- :7: syntax error at 'y'
- <bochs:8> z
- :8: syntax error at 'z'
- <bochs:9>
复制代码
10个有效字母为命令
- 1--2--3--4--5--6--7--8--9--10
- b,c,h,n,p,q,r,s,u,x,
- <bochs:3> b
- Error: pbreak of this kind not implemented yet.
- <bochs:4> c
- ^CNext at t=2020966106
- (0) [0x000000007c29] 0000:7c29 (unk. ctxt): jmp .-2 (0x00007c29) ; ebfe
- <bochs:9> h
- h|help - show list of debugger commands
- h|help command - show short command description
- -*- Debugger control -*-
- help, q|quit|exit, set, instrument, show, trace, trace-reg,
- trace-mem, u|disasm, ldsym, slist
- -*- Execution control -*-
- c|cont|continue, s|step, p|n|next, modebp, vmexitbp
- -*- Breakpoint management -*-
- vb|vbreak, lb|lbreak, pb|pbreak|b|break, sb, sba, blist,
- bpe, bpd, d|del|delete, watch, unwatch
- -*- CPU and memory contents -*-
- x, xp, setpmem, writemem, crc, info,
- r|reg|regs|registers, fp|fpu, mmx, sse, sreg, dreg, creg,
- page, set, ptime, print-stack, ?|calc
- -*- Working with bochs param tree -*-
- show "param", restore
- <bochs:15> n
- Next at t=2020966107
- (0) [0x000000007c29] 0000:7c29 (unk. ctxt): jmp .-2 (0x00007c29) ; ebfe
- <bochs:17> p
- Next at t=2020966108
- (0) [0x000000007c29] 0000:7c29 (unk. ctxt): jmp .-2 (0x00007c29) ; ebfe
- <bochs:18> q
- (0).[2020966108] [0x000000007c29] 0000:7c29 (unk. ctxt): jmp .-2 (0x00007c29) ; ebfe
- (q会退出)
- <bochs:1> r
- eax: 0x00000000 0
- ebx: 0x00000000 0
- ecx: 0x00000000 0
- edx: 0x00000000 0
- esp: 0x00000000 0
- ebp: 0x00000000 0
- esi: 0x00000000 0
- edi: 0x00000000 0
- eip: 0x0000fff0
- eflags 0x00000002: id vip vif ac vm rf nt IOPL=0 of df if tf sf zf af pf cf
- <bochs:2> s
- Next at t=1
- (0) [0x0000000fe05b] f000:e05b (unk. ctxt): xor ax, ax ; 31c0
- <bochs:3> u
- 000fe05b: ( ): xor ax, ax ; 31c0
- <bochs:6> x
- [bochs]:
- 0x00000000 <bogus+ 0>: 0x00000000
复制代码 |
|