~ubuntu-branches/ubuntu/maverick/libpgjava/maverick

« back to all changes in this revision

Viewing changes to src/tools/find_typedef

  • Committer: Bazaar Package Importer
  • Author(s): Arnaud Vandyck
  • Date: 2006-04-25 00:07:07 UTC
  • mfrom: (1.3.1 upstream) (3.1.1 dapper)
  • Revision ID: james.westby@ubuntu.com-20060425000707-6lr2s0awuz4z48hm
* Drop support for the old jdbc2 driver (can be reverted if wanted)
  (closes: #358345).
* New upstream (thanks to Wolfgang Baer).

Show diffs side-by-side

added added

removed removed

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