gen_abi.sh: filter out symbols not needed for ABI
authorAlexander Bokovoy <ab@samba.org>
Thu, 23 Aug 2012 15:45:54 +0000 (18:45 +0300)
committerAlexander Bokovoy <ab@samba.org>
Fri, 7 Sep 2012 10:31:42 +0000 (12:31 +0200)
gdb does not allow to print definitions of certain section names
and special symbols used for dynamic loading machinery:

__bss_start
_edata
_init
_fini
_end

Please note the space before the pattern, it is needed to avoid
hungry matches of valid symbols with these as substrings (foo_init,
for example).

Without this patch gdb on Fedora 18 breaks when attempting to print
function and struct signature.

buildtools/scripts/abi_gen.sh

index ed6f445519ed7118a06f49585a7fdee5f084534e..787718cb204ce6343036d420b680c2e43407f948 100755 (executable)
@@ -10,7 +10,7 @@ cat <<EOF
 set height 0
 set width 0
 EOF
-nm "$SHAREDLIB" | cut -d' ' -f2- | egrep '^[BDGTRVWS]' | grep -v @ | cut -c3- | sort | while read s; do
+nm "$SHAREDLIB" | cut -d' ' -f2- | egrep '^[BDGTRVWS]' | grep -v @ | egrep -v ' (__bss_start|_edata|_init|_fini|_end)' | cut -c3- | sort | while read s; do
     echo "echo $s: "
     echo p $s
 done