[lkml]   [2002]   [Feb]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Improved ksymoops output

I like the idea very much. As I have to maintain a kernel tree for
various customers too, I think this could be a nice addition for the bug
reports (seldom luckily) I sometimes get.

> =================

[snipped rest of the bash script]

This can be improved a little bit:

# Meant to be run in top lever kernel source dir
# after kernel has been built
# Makes list of the form:
# symbol1 object_file_pathname1
# symbol2 object_file_pathname2
# symbol3 object_file_pathname3


find -name '*.c' | while read a; do
#nm: get symbols from .o
#grep: discard non-text symbols
#awk: remove './', add .o pathname
#cut: remove address and symbol type letter
test -e "${b}.o" && {
nm "${b}.o" \
| grep '\( T \)\|\( t \)' \
| awk "BEGIN { N=\" ${a:2}\" } { print \$0,N }" \
| cut -b12- \

This script compared to yours does (it's nitpicking):
o run faster (5%) ;)
o should never have problems when one day there will be a lot of *.c
files. In your approach LIST could someday not hold all entries
o simplifies the bash 'regexp' to snip away the '.c' and print the rest

I'm propably going to rewrite the python script in bash too, since I
don't run python on my distro (and I do not intend to use 2.5.x anytime

Best regards,
Roberto Nibali, ratz

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:24    [W:0.098 / U:6.444 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site