Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit4e86efb

Browse files
committed
Add FreeBSD support for find_typedef, per request from Andrew.
1 parent0b7b908 commit4e86efb

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

‎src/tools/find_typedef

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/sh
22

3-
# $PostgreSQL: pgsql/src/tools/find_typedef,v 1.13 2009/06/10 15:13:45 momjian Exp $
3+
# $PostgreSQL: pgsql/src/tools/find_typedef,v 1.14 2009/06/11 03:14:08 momjian Exp $
44

55
# This script attempts to find all typedef's in the postgres binaries
66
# by using 'nm' to report all typedef debugging symbols.
@@ -47,6 +47,11 @@ do# if objdump -W is recognized, only one line of error should appear
4747
objdump -W"$DIR"/*|
4848
egrep -A3'DW_TAG_typedef'|
4949
awk' $2 == "DW_AT_name" {print $NF}'
50+
elif [`readelf -w2>&1| wc -l`-gt 1 ]
51+
then# FreeBSD, similar output to Linux
52+
readelf -w"$DIR"/*|
53+
egrep -A3'\(DW_TAG_typedef\)'|
54+
awk' $1 == "DW_AT_name" {print $NF}'
5055
else# BSD/OS
5156
objdump --stabs"$DIR"/*|
5257
awk' $2 == "LSYM" && $7 ~ /:t/ {sub(":.*", "", $7); print $7}'

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp