git://git.jankratochvil.net
/
nethome.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9ae5d12
)
GDB strace grepper of its ptraces.
author
lace
<>
Fri, 4 Jan 2008 22:40:50 +0000
(22:40 +0000)
committer
lace
<>
Fri, 4 Jan 2008 22:40:50 +0000
(22:40 +0000)
bin/ptracegrep
[new file with mode: 0755]
patch
|
blob
diff --git a/bin/ptracegrep
b/bin/ptracegrep
new file mode 100755
(executable)
index 0000000..
d4180fb
--- /dev/null
+++ b/
bin/ptracegrep
@@ -0,0
+1,8
@@
+#! /bin/sh
+# $Id$
+
+PID=$(sed -n 's/^ptrace *([^,]*, *\([0-9]*\),.*$/\1/p' "$1"|sort|uniq -c|sort -nr|head -n1|awk '{print $2}')
+echo >&2 "PID=$PID"
+grep $PID $1 \
+ | grep -v '^\(\(open\|read\) *(\|ptrace *( *PTRACE_\(PEEK\|POKE\)\)' \
+ | sed -e 's/\<'$PID'\>/PID/g' -e 's/0x[0-9a-f]\{5,\}/HEX/g'