]>
git.saurik.com Git - redis.git/blob - utils/build-static-symbols.tcl
1 # Build a symbol table for static symbols of redis.c
2 # Useful to get stack traces on segfault without a debugger. See redis.c
3 # for more information.
5 # Copyright(C) 2009 Salvatore Sanfilippo, under the BSD license.
9 while {[gets $fd line
] != -1} {
10 if {[regexp {^static
+[A-z0-9
]+[ *]+([A-z0-9
]*)\(} $line - sym
]} {
14 set symlist
[lsort -unique $symlist]
15 puts "static struct redisFunctionSym symsTable\[\] = {"
16 foreach sym
$symlist {
17 puts "{\"$sym\",(unsigned long)$sym},"