diff --git a/notes b/notes index 4e66dfe..43aab7c 160000 --- a/notes +++ b/notes @@ -1 +1 @@ -Subproject commit 4e66dfe2c77f49c22e632e4fdb34a79ba5ede64a +Subproject commit 43aab7cccb79f70562570d2ac9d1d63b60945b3e diff --git a/source/_posts/gdb/gdb-memo.md b/source/_posts/gdb/gdb-memo.md index 284bb6a..7b82be5 100644 --- a/source/_posts/gdb/gdb-memo.md +++ b/source/_posts/gdb/gdb-memo.md @@ -1,9 +1,10 @@ --- date: 2023-10-02 +updated: 2023-11-05 title: gdb 常用操作记录 description: gdb 有一个配置文件 .gdbinit ,可以在里面修改 gdb 配置。我的配置: 禁止分页 tags: -- gdb +- gdbgdb categories: - [gdb] @@ -149,3 +150,15 @@ p func (gdb) p offstr(insn->sec, insn->offset) $13 = 0x555555ea0330 "mdscr_write+0x0" ``` + +### 多线程 + +- `info inferiors` 查看进程列表 +- `attach pid`绑定进程 id +- `inferior num` 切换到指定进程上进行调试 +- `print $_exitcode` 显示进程退出时的返回值 +- `set follow-fork-mode child` 追踪子进程 +- `set follow-fork-mode parent` 追踪父进程 +- `set detach-on-fork on fork` 调用时只追踪其中一个进程 +- `set detach-on-fork off fork` 调用时会同时追踪父子进程 +- `set schedule-multiple on` 调试某进程时,其他进程正常执行 diff --git a/source/_posts/linux/linux-aarch64-compile.md b/source/_posts/linux/linux-aarch64-compile.md index e47dc87..1a284a0 100644 --- a/source/_posts/linux/linux-aarch64-compile.md +++ b/source/_posts/linux/linux-aarch64-compile.md @@ -1,6 +1,6 @@ --- date: 2023-10-01 -updated: 2023-10-02 +updated: 2023-11-05 title: 关于交叉编译的一些记录 description: 编译的话文档有很多,这里记录一下自己交叉编译的一些命令。 tags: diff --git a/source/_posts/linux/linux-data-mig.md b/source/_posts/linux/linux-data-mig.md index 0dc21d9..718a2c6 100644 --- a/source/_posts/linux/linux-data-mig.md +++ b/source/_posts/linux/linux-data-mig.md @@ -1,6 +1,6 @@ --- date: 2023-06-22 -updated: 2023-10-02 +updated: 2023-11-05 title: linux 服务器数据迁移 description: 前段时间把社团服务器上的数据进行了迁移,这里记录一下大概的迁移方式。管道的妙用。ssh 配合 tar 直接将文件传到我本机电脑:附上 exclude.txt 文件: tags: diff --git a/source/_posts/linux/linux-emulate-aarch64.md b/source/_posts/linux/linux-emulate-aarch64.md index 5d4ac1f..4c4e91a 100644 --- a/source/_posts/linux/linux-emulate-aarch64.md +++ b/source/_posts/linux/linux-emulate-aarch64.md @@ -1,6 +1,6 @@ --- date: 2023-09-30 -updated: 2023-10-02 +updated: 2023-11-05 title: QEMU-aarch64 启动!(使用 QEMU 运行 aarch64 虚拟机) description: qemu-emulators-full 会提供支持架构的全系统模拟( 如 qemu-system-aarch64 或 qemu-x86_64 ) edk2-aarch64 提供 uefi 固件 tags: diff --git a/source/_posts/linux/linux-kernel-hashtable.md b/source/_posts/linux/linux-kernel-hashtable.md index 438865d..b64060b 100644 --- a/source/_posts/linux/linux-kernel-hashtable.md +++ b/source/_posts/linux/linux-kernel-hashtable.md @@ -1,6 +1,6 @@ --- date: 2023-08-17 -updated: 2023-10-02 +updated: 2023-11-05 title: linux kernel hashtable description: 记录一下自己对 linux kernel 中的 hashtable 实现的理解(当然是查的资料)。因为最近写的 objtool 就有很多地方用到 hashtable,不记录一下每次去看都很烦。 tags: diff --git a/source/_posts/linux/linux-nfs-vlc.md b/source/_posts/linux/linux-nfs-vlc.md index 6f4cbf8..f425c9c 100644 --- a/source/_posts/linux/linux-nfs-vlc.md +++ b/source/_posts/linux/linux-nfs-vlc.md @@ -1,6 +1,6 @@ --- date: 2023-08-31 -updated: 2023-10-02 +updated: 2023-11-05 title: vlc 使用 nfs 访问 linux description: 最近在 vlc 上将电脑的一些文件挂载到手机上,这样手机就可以看电脑上的番了。前置条件:下载安装 nfs-utils将 vlc 需要访问的文件挂载到 /srv/nfs/ 目录中:修改 /etv/exports 配置,以保证安全性,这里只允许读: tags: diff --git a/source/_posts/linux/linux-qemu-nbd.md b/source/_posts/linux/linux-qemu-nbd.md index b12c82c..9d2660b 100644 --- a/source/_posts/linux/linux-qemu-nbd.md +++ b/source/_posts/linux/linux-qemu-nbd.md @@ -1,6 +1,6 @@ --- date: 2023-08-17 -updated: 2023-10-02 +updated: 2023-11-05 title: 使用 qemu-nbd 对虚拟机进行扩容 description: 或者直接指定虚拟磁盘的大小的缩写:它是一种允许一台机器访问另一台机器上的块设备的协议。在 linux 中,这一功能由 nbd 模块实现,需要加载该模块: tags: diff --git a/source/_posts/linux/linux-vm-install-kernel.md b/source/_posts/linux/linux-vm-install-kernel.md index 19bf5d5..7eefa9c 100644 --- a/source/_posts/linux/linux-vm-install-kernel.md +++ b/source/_posts/linux/linux-vm-install-kernel.md @@ -1,6 +1,6 @@ --- date: 2023-09-30 -updated: 2023-10-02 +updated: 2023-11-05 title: 给虚拟机替换内核 description: 因为开源之夏项目写的是 arm64 架构上的内核,本机使用的是 x86 ,所以只能开虚拟机进行测试。我之前的笨方法安装是将所有 kernel 根目录的文件全都使用 rsync 同步到虚拟机,然后在虚拟机里面使用 make modules_install install 和 make install。简直不要太笨。每次修改代码都要 rsync 一次。后来问了一下开源之夏的导师,才想起来可以将虚拟机镜像挂载然后在本机安装内核进虚拟机镜像中。在这里记录一下步骤。挂载虚拟机镜像安装 module安装内核 tags: diff --git a/source/_posts/linux/stack-unwinding.md b/source/_posts/linux/stack-unwinding.md index 2c3b2ec..c7ab187 100644 --- a/source/_posts/linux/stack-unwinding.md +++ b/source/_posts/linux/stack-unwinding.md @@ -1,6 +1,6 @@ --- date: 2023-06-23 -updated: 2023-10-02 +updated: 2023-11-05 title: stack unwinding description: 将 linux 中的 stack unwinding 的一些概念进行梳理。 tags: diff --git a/source/_posts/linux/wayland-wemeet-screen-share.md b/source/_posts/linux/wayland-wemeet-screen-share.md index f1e00ab..1886653 100644 --- a/source/_posts/linux/wayland-wemeet-screen-share.md +++ b/source/_posts/linux/wayland-wemeet-screen-share.md @@ -1,6 +1,6 @@ --- date: 2023-08-31 -updated: 2023-10-02 +updated: 2023-11-05 title: wayland 腾讯会议共享屏幕 description: 前置条件:开启虚拟摄像头:在 obs 里面就可以打开虚拟摄像头录取屏幕然后在腾讯会议共享屏幕了。遇到开启虚拟摄像头 obs 卡住的话重启+重新创建虚拟摄像头。 tags: