Skip to content

Commit

Permalink
Update 2024-06-05-useful-command.md
Browse files Browse the repository at this point in the history
  • Loading branch information
ddwolf authored Jun 4, 2024
1 parent 0becea9 commit 4931321
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions _posts/2024-06-05-useful-command.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@ date: 2024-06-05

# gstack
`gdb -q -p $1 -iex 'set pagination off' -ex="set confirm off" -ex 't a a bt' -ex quit`

>> -q quiet 模式,不打印version
>> -p 进程id
>> -iex 在读取进程信息之前执行的命令
>> -ex 在读取进程信息之后执行的命令,可以指定多次,按顺序执行
>> set pagination off 关闭分页功能
>> set confirm off 关闭退出时的确认询问
>> t a a bt 是 thread apply all bt 的简写
>> quit 退出
```bash
-q quiet 模式,不打印version
-p 进程id
-iex 在读取进程信息之前执行的命令
-ex 在读取进程信息之后执行的命令,可以指定多次,按顺序执行
set pagination off 关闭分页功能
set confirm off 关闭退出时的确认询问
t a a bt 是 thread apply all bt 的简写
quit 退出
```

0 comments on commit 4931321

Please sign in to comment.