Level 1: The physical address of the mynext variable of Process No. 1
programming requirements
Find the answer through gdb and dbg debugging, and fill in the answer of the first level /data/workspace/myshixun/第一关.txt
.
- When process 1 calls the function output_char for the first time, what is the physical address of its mynext variable?
- When process 1 calls the function output_char for the second time, what is the physical address of its mynext variable?
The configuration environment version 1.3 kernel is the same as before. For details, please move to the following link~ Touge Operating System Classroom Exercise 4.1: Segmented Memory Management Answer_Blueberry Cream Dumpling Blog-CSDN Blog
Start the gdb debugger, type the code:
b 155
c
x/6i $eip
p/x current->ldt
Close the gdb debugger, start the dbg debugger, and type the code:
b 0x6969
c
c
b 0x6977
c
n
sreg
reg
x/38wx 0xffe000
xp/wx 0xffd7b0
The first level document answer:
Level 2: The physical address of the mynext variable of process 0
programming requirements
Find the answer through gdb and dbg debugging, and fill in the answer of the second level /data/workspace/myshixun/第二关.txt
.
- When process 0 calls the function output_char for the first time, what is the physical address of its mynext variable?
- When process 0 calls the function output_char for the second time, what is the physical address of its mynext variable?
Complete the code of the first level and fill in the answers of the second level document to directly evaluate~
The second level document answer: