Skip to content
Snippets Groups Projects
Commit 387a9af7 authored by Mattias Erlingsson's avatar Mattias Erlingsson
Browse files

added the text file with answers to debugging questions

parent 9ccaeb23
Branches
Tags
No related merge requests found
1. What is the macro corresponding to the syscall number in this case?
Since a wrapper will push 3 parameters to perform a systemcall, and the first is the number
of the systemcall refering to the macros in the pintos/src/lib/syscall-nr.h. From this we can tell that the number 9
refers to the macro write.
2.What is the second parameter related to and what does it mean in this case?
The second parameter is 1 which is the number of the file descriptor and in this case it means standard output.
3. What is the string that the third parameter refers to?
"You got it, use your debugging skills during the labs!\n"
p f-> esp + 8, gives us the memory address of the string corresponding to parameter 4.
It is then given a new pointer name, in our case "$5". To print the content we can now use,
x/s (char**) * $5, and it gives us the output.
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment