diff --git a/tool/abi_symbols b/tool/abi_symbols index 16e64f53f..1a0eace76 100755 --- a/tool/abi_symbols +++ b/tool/abi_symbols @@ -37,10 +37,14 @@ foreach line [split $symbols "\n"] { set type "U" # match undefined symbol - regexp {^(\w+) U\s*$} $line dummy name + if {![regexp {^(\w+) U\s*$} $line dummy name]} { - # match defined symbol, which does not always feature a size value - regexp {^([\w.]+) (\w) \w+ ?(\w*)$} $line dummy name type size_hex + # match defined symbol, which does not always feature a size value + if {![regexp {^([\w.]+) (\w) \w+ ?(\w*)$} $line dummy name type size_hex]} { + puts stderr "Error: unexpected format of line: $line" + exit -1 + } + } # decimal symbol size set size_dec [expr 0x0$size_hex]