Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
lab0 doubly linked list
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Mattias Erlingsson
lab0 doubly linked list
Commits
387a9af7
Commit
387a9af7
authored
5 years ago
by
Mattias Erlingsson
Browse files
Options
Downloads
Patches
Plain Diff
added the text file with answers to debugging questions
parent
9ccaeb23
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
questions.txt
+16
-0
16 additions, 0 deletions
questions.txt
with
16 additions
and
0 deletions
questions.txt
0 → 100755
+
16
−
0
View file @
387a9af7
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
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment