aboutsummaryrefslogtreecommitdiff
path: root/find
diff options
context:
space:
mode:
authorNiklas Baumstark <niklas.baumstark@gmail.com>2015-03-16 22:32:07 +0100
committerNiklas Baumstark <niklas.baumstark@gmail.com>2015-03-16 22:32:07 +0100
commit9616996dcd623a094bbe975f7e11118d33523afb (patch)
treef74a84eb8d47f67e29ac7431d42ee49d7cb7d269 /find
downloadlibc-database-9616996dcd623a094bbe975f7e11118d33523afb.tar.gz
libc-database-9616996dcd623a094bbe975f7e11118d33523afb.zip
initial commit
Diffstat (limited to 'find')
-rwxr-xr-xfind12
1 files changed, 12 insertions, 0 deletions
diff --git a/find b/find
new file mode 100755
index 0000000..ca49dae
--- /dev/null
+++ b/find
@@ -0,0 +1,12 @@
+#!/bin/bash
+if [[ $# != 2 ]]; then
+ echo >&2 "Usage: $0 name address"
+ exit 2
+fi
+name=$1
+address=$2
+addr_last12=`echo -n "$address" | tail -c 3`
+for id in `grep -e "$name .*$addr_last12" db/*.symbols \
+ | perl -n -e '/db\/(.*)\.symbols/ && print "$1\n"'`; do
+ echo "`cat db/${id}.info` (id $id)"
+done