rust-os.02 栈展开

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 #include <iostream>#include <string> void b() { throw std::exception(); } void a() { std::string str = "Oops"; b(); } int main() { try { a(); } catch(...) { } } 上面代码在堆栈展开过程中会发生以下情

rust-os.07 cpu异常

异常与函数调用非常相似:CPU跳转到被调用函数的第一条指令并执行它。 之后,CPU跳转到返回地址并继续执行父功能。 但是,异常和函数调用之间存在

rust-os学习集合

1 2 3 4 5 6 7 8 9 10 11 12 #安装xbuild用于交叉编译: cargo install cargo-xbuild cargo install bootimage --version "^0.7.7" rustup component add llvm-tools-preview #构建.bin文件 cargo bootimage qemu-system-x86_64 -drive format=raw,file=target/x86_64-blog_os/debug/bootimage-blog_os.bin #可以直接使用: cargo xrun 工具 1.readelf 用于读

socket端口复用

端口复用允许在一个应用程序可以把 n 个套接字绑在一个端口上而不出错。同时,这 n 个套接字发送信息都正常,没有问题。但是,这些套接字并不是所有都能