Skip to content

Commit

Permalink
gen_abi.sh: filter out symbols not needed for ABI
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
abbra committed Sep 7, 2012
1 parent 6b2e7aa commit c63dcc9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion buildtools/scripts/abi_gen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c63dcc9

Please sign in to comment.