projects
/
users
/
simon
/
postgres.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b72dd38
)
Add FreeBSD support for find_typedef, per request from Andrew.
author
Bruce Momjian
<bruce@momjian.us>
Thu, 11 Jun 2009 03:14:08 +0000
(
03:14
+0000)
committer
Bruce Momjian
<bruce@momjian.us>
Thu, 11 Jun 2009 03:14:08 +0000
(
03:14
+0000)
src/tools/find_typedef
patch
|
blob
|
blame
|
history
diff --git
a/src/tools/find_typedef
b/src/tools/find_typedef
index 06af031af65e169d1290d427c55fc731b755929c..5a849ecf7c030f2e069828bf3c9e497a5c3ec8b0 100755
(executable)
--- a/
src/tools/find_typedef
+++ b/
src/tools/find_typedef
@@
-47,6
+47,11
@@
do # if objdump -W is recognized, only one line of error should appear
objdump -W "$DIR"/* |
egrep -A3 'DW_TAG_typedef' |
awk ' $2 == "DW_AT_name" {print $NF}'
+ elif [ `readelf -w 2>&1 | wc -l` -gt 1 ]
+ then # FreeBSD, similar output to Linux
+ readelf -w "$DIR"/* |
+ egrep -A3 '\(DW_TAG_typedef\)' |
+ awk ' $1 == "DW_AT_name" {print $NF}'
else # BSD/OS
objdump --stabs "$DIR"/* |
awk ' $2 == "LSYM" && $7 ~ /:t/ {sub(":.*", "", $7); print $7}'