Skip to content

Instantly share code, notes, and snippets.

@mingnus
mingnus / gtags_files.sh
Created July 27, 2017 08:58
List files for gtags
#!/bin/bash
dir_list=("fs/*.h" "fs/*.c" "fs/ramfs" "mm" "lib" "include/linux" "drivers/md" "block" "fs/ceph" "net/ceph")
out_file="gtags.files"
rm ${out_file}
for dir in ${dir_list[@]}
do
find ${dir} -type f -name "*.c" -o -name "*.h" >> ${out_file}
done
@mingnus
mingnus / ceph_debug.diff
Last active September 22, 2017 10:28
CEPH debug
diff --git a/src/common/Thread.cc b/src/common/Thread.cc
index 3e8d343..d46baae 100644
--- a/src/common/Thread.cc
+++ b/src/common/Thread.cc
@@ -32,6 +32,7 @@
#ifdef HAVE_SCHED
#include <sched.h>
#endif
+#include <execinfo.h>
#!/usr/bin/python
# usage:
#
# import this script
# (gdb) python sys.path.insert(0, '<path_to_supertrace.py>'); import supertrace
# or alternatively, import this script by using supertrace.gdb
# $ gdb -x supertrace.gdb <debugee>
#
# then insert some breakpoints ...
@mingnus
mingnus / supertrace.gdb
Last active November 6, 2016 12:54 — forked from fcwu/supertrace.gdb
set pagination off
python
sys.path.insert(0, './')
import supertrace
end