Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
61d416e3
Commit
61d416e3
authored
Mar 18, 2008
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add Linux support to find_typedefs, with help from Alvaro.
parent
0d49838d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
5 deletions
+13
-5
src/tools/find_typedef
src/tools/find_typedef
+13
-5
No files found.
src/tools/find_typedef
View file @
61d416e3
#!/bin/sh
#!/bin/sh
# $PostgreSQL: pgsql/src/tools/find_typedef,v 1.
8 2007/12/21 21:02:4
1 momjian Exp $
# $PostgreSQL: pgsql/src/tools/find_typedef,v 1.
9 2008/03/18 22:45:1
1 momjian Exp $
# This script attempts to find all typedef's in the postgres binaries
# This script attempts to find all typedef's in the postgres binaries
# by using 'nm' to report all typedef debugging symbols.
# by using 'nm' to report all typedef debugging symbols.
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
# For this program to work, you must have compiled all binaries with
# For this program to work, you must have compiled all binaries with
# debugging symbols.
# debugging symbols.
#
#
# This is run on BSD/OS 4.0, so you may need to make changes.
# This is run on BSD/OS 4.0
or Linux
, so you may need to make changes.
#
#
# Ignore the nm errors about a file not being a binary file.
# Ignore the nm errors about a file not being a binary file.
#
#
...
@@ -37,10 +37,18 @@ fi
...
@@ -37,10 +37,18 @@ fi
for
DIR
for
DIR
do
do
objdump
--stabs
"
$DIR
"
/
*
|
if
[
`
objdump
-W
2>&1 |
wc
-l
`
-eq
1
]
awk
' $2 == "LSYM" && $7 ~ /:[tT]/ {sub(":.*", "", $7); print $7}'
|
then
# Linux
grep
-v
' '
# some typedefs have spaces, remove them
# unfortunately the Linux version doesn't show unreferenced typedefs
objdump
-W
"
$DIR
"
/
*
|
egrep
-A3
'(DW_TAG_typedef|DW_TAG_structure_type|DW_TAG_union_type)'
|
awk
' $2 == "DW_AT_name" {print $NF}'
else
# BSD/OS
objdump
--stabs
"
$DIR
"
/
*
|
awk
' $2 == "LSYM" && $7 ~ /:[tT]/ {sub(":.*", "", $7); print $7}'
fi
done
|
done
|
grep
-v
' '
|
# some typedefs have spaces, remove them
sort
|
sort
|
uniq
|
uniq
|
# these are used both for typedefs and variable names
# these are used both for typedefs and variable names
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment