I have made two bash scripts to cope with this problem. The first script helps you in finding a word (usually function names or symbols in assembler source code):
#!/bin/bash
#
# Script to find a word in an subversion checkout
#
#
SEARCH_PATH=""
WORD=""
if [ $# -ne 2 ]; then
echo "Usage: $(basename $0) path_to_search word"
exit 1;
fi
SEARCH_PATH=$1
WORD=$2
find ${SEARCH_PATH} -type f -name '*' -exec grep -nH "\<${WORD}\>" \{} \; | awk '$0 !~ /\.svn/ {print}'
The second script is used to find a string:
#!/bin/bash
#
# Script to find a string in an subversion checkout
#
#
SEARCH_PATH=""
WORD=""
if [ $# -ne 2 ]; then
echo "Usage: $(basename $0) path_to_search word"
exit 1;
fi
SEARCH_PATH=$1
WORD=$2
find ${SEARCH_PATH} -type f -name '*' -exec grep -nH "${WORD}" \{} \; | awk '$0 !~ /\.svn/ {print}'
What you need to run both of the previous scripts are find, grep, awk and a bash compatible shell.
Another trick is to search where the symbol/function-name in the compiled object file. More on that later.
Post a Comment
No comments:
Post a Comment