728x90
Pintos Project, VScode Debugging Setting
📌 Extension 설치
Native Debug install
📌 .vscode/launch.json
Debug C/C++ File 클릭
.vscode/launch.json 생성되면, 수정
{
"configurations": [
{
"type": "gdb",
"request": "attach",
"name": "Attach to gdbserver : threads",
"executable": "${workspaceRoot}/vm/build/kernel.o",
"target": "localhost:1234",
"remote": true,
"cwd": "${workspaceRoot}",
"valuesFormatting": "parseText"
}
]
}
exeutable 부분 수정 만약, 내가 userprog쪽 test 하고 있다면,
"executable": "${workspaceRoot}/userprog/build/kernel.o",
해서 object code에 접근해 debugging하면 된다.
📌 .bashrc 수정
$ vim .bashrc
키보드 자판 [i] (insert) ".bashrc"에 코드에 추가
source /home/ubuntu/파일 이름/activate
현재 돌리고 있는 파일 이름을 넣어줘야 한다.
키보드 [Esc] + [:] [w](write) + [q](quit) 클릭
📌 install
$ sudo apt install -y gcc make qemu-system-x86 python3
$ sudo apt install -y gdb
📌 Debugging Test
$ pintos -v -k --gdb -m 20 --fs-disk=10 -p tests/vm/cow/cow-simple:cow-simple --swap-disk=4 -- -q -f run cow-simple
'CS(ComputerScience) > Pintos' 카테고리의 다른 글
Pintos, MM & Anon Page (feat. Page Fault Handling) (0) | 2023.05.16 |
---|---|
Pintos Project2. User Program (0) | 2023.05.09 |
Pintos, Priority Scheduling and Synchronization (2) | 2023.04.27 |
Pintos Alam Clock (0) | 2023.04.24 |