forked from Hansimov/csapp
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GitBook: [master] 124 pages modified
- Loading branch information
1 parent
82c0fda
commit 38d3fba
Showing
4 changed files
with
94 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# 实验总览 | ||
|
||
## 参考资料 | ||
|
||
* 实验材料 | ||
* [http://csapp.cs.cmu.edu/3e/labs.html](http://csapp.cs.cmu.edu/3e/labs.html) | ||
* [https://github.com/Hansimov/csapp/tree/master/\_labs](https://github.com/Hansimov/csapp/tree/master/_labs) | ||
* 书中所有示例代码 | ||
* [http://csapp.cs.cmu.edu/3e/code.html](http://csapp.cs.cmu.edu/3e/code.html) | ||
* [https://github.com/Hansimov/csapp/tree/master/\_codes/code](https://github.com/Hansimov/csapp/tree/master/_codes/code) | ||
* 【读厚 CSAPP】实验概览 \| 小土刀 2.0 | ||
* [https://wdxtub.com/csapp/thick-csapp-lab-0/2016/04/16/](https://wdxtub.com/csapp/thick-csapp-lab-0/2016/04/16/) | ||
|
||
## 实验综述 | ||
|
||
所有 CS:APP 的实验都有如下共性: | ||
|
||
* **经历了 CMU 课堂的考验。**作者在 10 年时间里,在 150 ~ 250 名学生的课堂中开发和完善了这些实验。这门课得到了学生们的高度评价,他们通常认为这些实验是他们喜欢这门课的原因。 | ||
* **自动测试和评估驱动程序。**学生用 C 语言写解答,然后将其链接到 C 驱动程序中。驱动程序运行其解答,检查其正确性,并对解答进行定量评估。学生通过这些反馈逐步完善他们的解答。 | ||
* **解答。**为每位讲师提供了每个实验的完整解答。 | ||
* **自动评分器。**每个实验(Proxy Lab 除外)都有一个 Perl 自动评分器,为每个学生提交的文件运行驱动程序,并且打印一份 ASCII 成绩单。 | ||
* **完整的实验报告。**每个实验都有一份完整的报告(用 Latex 编写),其中包含环境(context)、分步说明和对评分标准的解释。 | ||
|
||
## 实验链接 | ||
|
||
{% page-ref page="../data-lab/" %} | ||
|
||
{% page-ref page="../bomb-lab.md" %} | ||
|
||
{% page-ref page="../attack-lab.md" %} | ||
|
||
{% page-ref page="../arch-lab.md" %} | ||
|
||
{% page-ref page="../cache-lab.md" %} | ||
|
||
{% page-ref page="../perf-lab.md" %} | ||
|
||
{% page-ref page="../shell-lab.md" %} | ||
|
||
{% page-ref page="../malloc-lab.md" %} | ||
|
||
{% page-ref page="../proxy-lab.md" %} | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# 常见问题 | ||
|
||
## gcc not found | ||
|
||
原因:机器没有安装 gcc。 | ||
|
||
方法:运行下列命令: | ||
|
||
运行: | ||
|
||
```c | ||
sudo apt-get install build-essential | ||
``` | ||
|
||
**参考链接:** | ||
|
||
* C compiler not found, Ubuntu - Stack Overflow | ||
* [https://stackoverflow.com/questions/22557029/c-compiler-not-found-ubuntu](https://stackoverflow.com/questions/22557029/c-compiler-not-found-ubuntu) | ||
|
||
## fatal error: bits/libc-header-start.h: No such file or directory | ||
|
||
原因:64 位机器的 gcc 只有 64 位的库,用 `-m32` 参数便会出错。 | ||
|
||
方法 1:删除 `-m32` 参数。但是这会导致许多依赖 32 位特性的代码错误。 | ||
|
||
方法 2**(推荐)**:安装 32 位的库: | ||
|
||
```c | ||
sudo apt-get install gcc-multilib | ||
``` | ||
|
||
**参考链接:** | ||
|
||
* c - "fatal error: bits/libc-header-start.h: No such file or directory" while compiling HTK - Stack Overflow | ||
* [https://stackoverflow.com/questions/54082459/fatal-error-bits-libc-header-start-h-no-such-file-or-directory-while-compili](https://stackoverflow.com/questions/54082459/fatal-error-bits-libc-header-start-h-no-such-file-or-directory-while-compili) | ||
* 32 bit - Trouble compiling a 32 bit binary on a 64 bit machine - Ask Ubuntu | ||
* [https://askubuntu.com/questions/91909/trouble-compiling-a-32-bit-binary-on-a-64-bit-machine](https://askubuntu.com/questions/91909/trouble-compiling-a-32-bit-binary-on-a-64-bit-machine) | ||
|
||
## 每次修改完代码,在 btest 前一定要重新 make | ||
|
||
建议写成: | ||
|
||
```c | ||
make && ./btest | ||
``` | ||
|