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
36c9c968
Commit
36c9c968
authored
Aug 20, 1997
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add static finding script.
parent
4a132abf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
43 additions
and
0 deletions
+43
-0
src/FIND_STATIC
src/FIND_STATIC
+43
-0
No files found.
src/FIND_STATIC
0 → 100644
View file @
36c9c968
#!/bin/sh
trap
"rm -f /tmp/
$$
"
0 1 2 3 15
# This script finds functions that are either never called, or
# should be static.
# Some functions, like library functions and debug_print functions,
# should remain unchanged.
# Run on a compiled source tree, from the top of the source tree
# My nm utility has 9 characters of address which I strip, then a 'type'
# character, with T as a text function, and U as an undefined function
# symbol, then the function name.
find
.
-name
'[a-z]*.o'
-type
f
-print
|
while
read
FILE
do
nm
$FILE
|
cut
-c10-100
|awk
'{printf "%s\t%s\t%s\n", "'
"
$FILE
"
'",$1,$2}'
done
>
/tmp/
$$
destroydb debug
createdb debug
echo
"
create table debug (file text, scope char, func text);
copy debug from '/tmp/"
$$
"';
select *
into table debug2
from debug;
update debug2
set scope = '_'
from debug
where debug2.func = debug.func and
debug2.scope = 'T' and debug.scope = 'U';
delete from debug2
where scope = '_';
select *
from debug2
where scope = 'T';
"
|psql debug
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