参考beej的gdb教程1
gdb core dump
先生成coredump2,ubuntu 22.04的coredump在/var/lib/apport/coredump目录
gdb attach
gdb 21896
(gdb) file objs/nginx
gdb objs/nginx
gdb objs/nginx
(gdb) break ngx_log.c:ngx_log_error_core
(gdb) set args -p ./ -g 'daemon off;'
(gdb) r
https://www.recurse.com/blog/5-learning-c-with-gdb https://blogs.oracle.com/linux/post/the-ksplice-pointer-challenge https://interrupt.memfault.com/blog/advanced-gdb