blob: 3017da5b70870f5d21b653416e7dcd0ab5534237 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
#!/bin/sh
# This script attempts to find all typedef's in the postgres binaries
# by using 'nm' to report all typedef debugging symbols.
#
# For this program to work, you must have compiled all binaries with
# debugging symbols.
#
# This is run on BSD/OS 3.0, so you may need to make changes for your
# version of nm.
#
# Ignore the nm errors about a file not being a binary file.
#
# Remember, debugging symbols are your friends.
#
if [ "$#" -ne 1 -o ! -d "$1" ]
then echo "Usage: $0 postgres_binary_directory" 1>&2
exit 1
fi
nm -a "$1"/* |
grep LSYM |
grep ':t' |
sed 's/^.*LSYM \([^:]*\):.*$/\1/' |
grep -v ' ' | # some typedefs have spaces, revove them
sort |
uniq
|